Class CosmosItem


  • public class CosmosItem
    extends Object
    • Method Detail

      • read

        public Mono<CosmosItemResponse> read()
        Reads an item. After subscription the operation will be performed. The Mono upon successful completion will contain a cosmos item response with the read item In case of failure the Mono will error.
        Returns:
        an Mono containing the cosmos item response with the read item or an error
      • read

        public Mono<CosmosItemResponse> read​(CosmosItemRequestOptions options)
        Reads an item. After subscription the operation will be performed. The Mono upon successful completion will contain a cosmos item response with the read item In case of failure the Mono will error.
        Parameters:
        options - the request comosItemRequestOptions
        Returns:
        an Mono containing the cosmos item response with the read item or an error
      • replace

        public Mono<CosmosItemResponse> replace​(Object item)
        Replaces an item with the passed in item. After subscription the operation will be performed. The Mono upon successful completion will contain a single cosmos item response with the replaced item. In case of failure the Mono will error.
        Parameters:
        item - the item to replace (containing the document id).
        Returns:
        an Mono containing the cosmos item resource response with the replaced item or an error.
      • replace

        public Mono<CosmosItemResponse> replace​(Object item,
                                                CosmosItemRequestOptions options)
        Replaces an item with the passed in item. After subscription the operation will be performed. The Mono upon successful completion will contain a single cosmos item response with the replaced item. In case of failure the Mono will error.
        Parameters:
        item - the item to replace (containing the document id).
        options - the request comosItemRequestOptions
        Returns:
        an Mono containing the cosmos item resource response with the replaced item or an error.
      • delete

        public Mono<CosmosItemResponse> delete()
        Deletes the item. After subscription the operation will be performed. The Mono upon successful completion will contain a single cosmos item response with the replaced item. In case of failure the Mono will error.
        Returns:
        an Mono containing the cosmos item resource response.
      • delete

        public Mono<CosmosItemResponse> delete​(CosmosItemRequestOptions options)
        Deletes the item. After subscription the operation will be performed. The Mono upon successful completion will contain a single cosmos item response with the replaced item. In case of failure the Mono will error.
        Parameters:
        options - the request options
        Returns:
        an Mono containing the cosmos item resource response.