Package com.arangodb.model
Class DocumentCreateOptions
- java.lang.Object
-
- com.arangodb.model.DocumentCreateOptions
-
public final class DocumentCreateOptions extends Object
- Author:
- Mark Vollmary, Michele Rastelli
- See Also:
- API Documentation
-
-
Constructor Summary
Constructors Constructor Description DocumentCreateOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Boolean
getKeepNull()
Boolean
getMergeObjects()
OverwriteMode
getOverwriteMode()
Boolean
getRefillIndexCaches()
Boolean
getReturnNew()
Boolean
getReturnOld()
Boolean
getSilent()
String
getStreamTransactionId()
Boolean
getWaitForSync()
DocumentCreateOptions
keepNull(Boolean keepNull)
DocumentCreateOptions
mergeObjects(Boolean mergeObjects)
Only considered ifoverwriteMode(OverwriteMode)
is set toOverwriteMode.update
DocumentCreateOptions
overwriteMode(OverwriteMode overwriteMode)
DocumentCreateOptions
refillIndexCaches(Boolean refillIndexCaches)
DocumentCreateOptions
returnNew(Boolean returnNew)
DocumentCreateOptions
returnOld(Boolean returnOld)
DocumentCreateOptions
silent(Boolean silent)
DocumentCreateOptions
streamTransactionId(String streamTransactionId)
DocumentCreateOptions
waitForSync(Boolean waitForSync)
-
-
-
Method Detail
-
getWaitForSync
public Boolean getWaitForSync()
-
waitForSync
public DocumentCreateOptions waitForSync(Boolean waitForSync)
- Parameters:
waitForSync
- Wait until document has been synced to disk.- Returns:
- options
-
getReturnNew
public Boolean getReturnNew()
-
returnNew
public DocumentCreateOptions 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 DocumentCreateOptions returnOld(Boolean returnOld)
- Parameters:
returnOld
- Additionally return the complete old document under the attribute old in the result.- Returns:
- options
- Since:
- ArangoDB 3.4
-
getOverwriteMode
public OverwriteMode getOverwriteMode()
-
overwriteMode
public DocumentCreateOptions overwriteMode(OverwriteMode overwriteMode)
- Parameters:
overwriteMode
- This parameter can be set to replace or update. If given it sets implicitly the overwrite flag. In case it is set to update, the replace-insert becomes an update-insert. Otherwise this option follows the rules of the overwrite parameter.- Returns:
- options
- Since:
- ArangoDB 3.7
-
getSilent
public Boolean getSilent()
-
silent
public DocumentCreateOptions 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 DocumentCreateOptions streamTransactionId(String streamTransactionId)
- Parameters:
streamTransactionId
- If set, the operation will be executed within the transaction.- Returns:
- options
- Since:
- ArangoDB 3.5.0
-
getMergeObjects
public Boolean getMergeObjects()
-
mergeObjects
public DocumentCreateOptions mergeObjects(Boolean mergeObjects)
Only considered ifoverwriteMode(OverwriteMode)
is set toOverwriteMode.update
- 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
- Since:
- ArangoDB 3.7
-
getKeepNull
public Boolean getKeepNull()
-
keepNull
public DocumentCreateOptions keepNull(Boolean keepNull)
- Parameters:
keepNull
- If the intention is to delete existing attributes with the update-insert 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. This option controls the update-insert behavior only.- Returns:
- options
- Since:
- ArangoDB 3.7
-
getRefillIndexCaches
public Boolean getRefillIndexCaches()
-
refillIndexCaches
public DocumentCreateOptions refillIndexCaches(Boolean refillIndexCaches)
- Parameters:
refillIndexCaches
- Whether to add a new entry to the in-memory edge cache if an edge document is inserted.- Returns:
- options
- Since:
- ArangoDB 3.11
-
-