Class DocumentUpdateOptions


  • public final class DocumentUpdateOptions
    extends Object
    Author:
    Mark Vollmary, Michele Rastelli
    See Also:
    API Documentation
    • Constructor Detail

      • DocumentUpdateOptions

        public DocumentUpdateOptions()
    • Method Detail

      • getKeepNull

        public Boolean getKeepNull()
      • keepNull

        public DocumentUpdateOptions keepNull​(Boolean keepNull)
        Parameters:
        keepNull - If the intention is to delete existing attributes with the patch command, the URL query parameter keepNull can be used with a value of false. This will modify the behavior of the patch command to remove any attributes from the existing document that are contained in the patch document with an attribute value of null.
        Returns:
        options
      • getMergeObjects

        public Boolean getMergeObjects()
      • mergeObjects

        public DocumentUpdateOptions mergeObjects​(Boolean mergeObjects)
        Parameters:
        mergeObjects - Controls whether objects (not arrays) will be merged if present in both the existing and the patch document. If set to false, the value in the patch document will overwrite the existing document's value. If set to true, objects will be merged. The default is true.
        Returns:
        options
      • getWaitForSync

        public Boolean getWaitForSync()
      • waitForSync

        public DocumentUpdateOptions waitForSync​(Boolean waitForSync)
        Parameters:
        waitForSync - Wait until document has been synced to disk.
        Returns:
        options
      • getIgnoreRevs

        public Boolean getIgnoreRevs()
      • ignoreRevs

        public DocumentUpdateOptions ignoreRevs​(Boolean ignoreRevs)
        Parameters:
        ignoreRevs - By default, or if this is set to true, the _rev attributes in the given document is ignored. If this is set to false, then the _rev attribute given in the body document is taken as a precondition. The document is only updated if the current revision is the one specified.
        Returns:
        options
      • getIfMatch

        public String getIfMatch()
      • ifMatch

        public DocumentUpdateOptions ifMatch​(String ifMatch)
        Parameters:
        ifMatch - update a document based on target revision
        Returns:
        options
      • getReturnNew

        public Boolean getReturnNew()
      • returnNew

        public DocumentUpdateOptions returnNew​(Boolean returnNew)
        Parameters:
        returnNew - Return additionally the complete new document under the attribute new in the result.
        Returns:
        options
      • getReturnOld

        public Boolean getReturnOld()
      • returnOld

        public DocumentUpdateOptions returnOld​(Boolean returnOld)
        Parameters:
        returnOld - Return additionally the complete previous revision of the changed document under the attribute old in the result.
        Returns:
        options
      • getSilent

        public Boolean getSilent()
      • silent

        public DocumentUpdateOptions silent​(Boolean silent)
        Parameters:
        silent - If set to true, an empty object will be returned as response. No meta-data will be returned for the created document. This option can be used to save some network traffic.
        Returns:
        options
      • getStreamTransactionId

        public String getStreamTransactionId()
      • streamTransactionId

        public DocumentUpdateOptions streamTransactionId​(String streamTransactionId)
        Parameters:
        streamTransactionId - If set, the operation will be executed within the transaction.
        Returns:
        options
        Since:
        ArangoDB 3.5.0