public class CosmosItem extends Resource
| Constructor and Description |
|---|
CosmosItem()
Initialize a item object.
|
CosmosItem(String jsonString)
Initialize a CosmosItem object from json string.
|
CosmosItem(String jsonString,
com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Initialize an CosmosItem object from json string.
|
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<CosmosItemResponse> |
delete(CosmosItemRequestOptions options)
Deletes the item.
|
reactor.core.publisher.Mono<CosmosItemResponse> |
delete(Object partitionKey)
Deletes the item.
|
<T> T |
getObject(Class<?> klass) |
reactor.core.publisher.Mono<CosmosItemResponse> |
read(CosmosItemRequestOptions requestOptions)
Reads an item.
|
reactor.core.publisher.Mono<CosmosItemResponse> |
read(Object partitionKey)
Reads an item.
|
reactor.core.publisher.Mono<CosmosItemResponse> |
replace(Object item,
CosmosItemRequestOptions requestOptions)
Replaces an item with the passed in item.
|
reactor.core.publisher.Mono<CosmosItemResponse> |
replace(Object item,
Object partitionKey)
Replaces an item with the passed in item.
|
getETag, getId, getResourceId, getSelfLink, getTimestamp, setId, setResourceIdget, getBoolean, getCollection, getCollection, getDouble, getHashMap, getInt, getList, getLogger, getLong, getMapper, getObject, getObject, getObjectByPath, getString, has, remove, set, toJson, toJson, toObject, toStringpublic CosmosItem()
public CosmosItem(String jsonString)
jsonString - the json string that represents the document object.public CosmosItem(String jsonString, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
jsonString - the json string that represents the item object.objectMapper - the custom object mapperpublic reactor.core.publisher.Mono<CosmosItemResponse> read(Object partitionKey)
Mono upon successful completion will contain a cosmos item response with the read item
In case of failure the Mono will error.Mono containing the cosmos item response with the read item or an errorpublic reactor.core.publisher.Mono<CosmosItemResponse> read(CosmosItemRequestOptions requestOptions)
Mono upon successful completion will contain a cosmos item response with the read item
In case of failure the Mono will error.requestOptions - the request comosItemRequestOptionsMono containing the cosmos item response with the read item or an errorpublic reactor.core.publisher.Mono<CosmosItemResponse> replace(Object item, Object partitionKey)
Mono upon successful completion will contain a single cosmos item response with the replaced item.
In case of failure the Mono will error.item - the item to replace (containing the document id).partitionKey - the partition keyMono containing the cosmos item resource response with the replaced item or an error.public reactor.core.publisher.Mono<CosmosItemResponse> replace(Object item, CosmosItemRequestOptions requestOptions)
Mono upon successful completion will contain a single cosmos item response with the replaced item.
In case of failure the Mono will error.item - the item to replace (containing the document id).requestOptions - the request comosItemRequestOptionsMono containing the cosmos item resource response with the replaced item or an error.public reactor.core.publisher.Mono<CosmosItemResponse> delete(Object partitionKey)
Mono upon successful completion will contain a single cosmos item response with the replaced item.
In case of failure the Mono will error.partitionKey - Mono containing the cosmos item resource response.public reactor.core.publisher.Mono<CosmosItemResponse> delete(CosmosItemRequestOptions options)
Mono upon successful completion will contain a single cosmos item response with the replaced item.
In case of failure the Mono will error.options - the request optionsMono containing the cosmos item resource response.public <T> T getObject(Class<?> klass) throws IOException
IOExceptionCopyright © 2019. All rights reserved.