Class CosmosItemRequestOptions


  • public class CosmosItemRequestOptions
    extends Object
    Encapsulates options that can be specified for a request issued to cosmos Item.
    • Constructor Detail

      • CosmosItemRequestOptions

        public CosmosItemRequestOptions()
        Constructor
      • CosmosItemRequestOptions

        public CosmosItemRequestOptions​(Object partitionKey)
        Constructor
        Parameters:
        partitionKey - the partition key
    • Method Detail

      • accessCondition

        public AccessCondition accessCondition()
        Gets the conditions associated with the request.
        Returns:
        the access condition.
      • accessCondition

        public CosmosItemRequestOptions accessCondition​(AccessCondition accessCondition)
        Sets the conditions associated with the request.
        Parameters:
        accessCondition - the access condition.
        Returns:
        the current request options
      • consistencyLevel

        public ConsistencyLevel consistencyLevel()
        Gets the consistency level required for the request.
        Returns:
        the consistency level.
      • consistencyLevel

        public CosmosItemRequestOptions consistencyLevel​(ConsistencyLevel consistencyLevel)
        Sets the consistency level required for the request.
        Parameters:
        consistencyLevel - the consistency level.
        Returns:
        the CosmosItemRequestOptions.
      • indexingDirective

        public IndexingDirective indexingDirective()
        Gets the indexing directive (index, do not index etc).
        Returns:
        the indexing directive.
      • indexingDirective

        public CosmosItemRequestOptions indexingDirective​(IndexingDirective indexingDirective)
        Sets the indexing directive (index, do not index etc).
        Parameters:
        indexingDirective - the indexing directive.
        Returns:
        the CosmosItemRequestOptions.
      • preTriggerInclude

        public List<String> preTriggerInclude()
        Gets the triggers to be invoked before the operation.
        Returns:
        the triggers to be invoked before the operation.
      • preTriggerInclude

        public CosmosItemRequestOptions preTriggerInclude​(List<String> preTriggerInclude)
        Sets the triggers to be invoked before the operation.
        Parameters:
        preTriggerInclude - the triggers to be invoked before the operation.
        Returns:
        the CosmosItemRequestOptions.
      • postTriggerInclude

        public List<String> postTriggerInclude()
        Gets the triggers to be invoked after the operation.
        Returns:
        the triggers to be invoked after the operation.
      • postTriggerInclude

        public CosmosItemRequestOptions postTriggerInclude​(List<String> postTriggerInclude)
        Sets the triggers to be invoked after the operation.
        Parameters:
        postTriggerInclude - the triggers to be invoked after the operation.
        Returns:
        the CosmosItemRequestOptions.
      • sessionToken

        public String sessionToken()
        Gets the token for use with session consistency.
        Returns:
        the session token.
      • sessionToken

        public CosmosItemRequestOptions sessionToken​(String sessionToken)
        Sets the token for use with session consistency.
        Parameters:
        sessionToken - the session token.
        Returns:
        the CosmosItemRequestOptions.
      • partitionKey

        public CosmosItemRequestOptions partitionKey​(PartitionKey partitionKey)
        Sets the partition key
        Parameters:
        partitionKey - the partition key
        Returns:
        the CosmosItemRequestOptions.
      • partitionKey

        public PartitionKey partitionKey()
        Gets the partition key
        Returns:
        the partition key