public class UpdateOptions
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.Boolean |
bypassDocumentValidation |
private Collation |
collation |
private boolean |
upsert |
Constructor and Description |
---|
UpdateOptions() |
Modifier and Type | Method and Description |
---|---|
UpdateOptions |
bypassDocumentValidation(java.lang.Boolean bypassDocumentValidation)
Sets the bypass document level validation flag.
|
UpdateOptions |
collation(Collation collation)
Sets the collation options
|
java.lang.Boolean |
getBypassDocumentValidation()
Gets the the bypass document level validation flag
|
Collation |
getCollation()
Returns the collation options
|
boolean |
isUpsert()
Returns true if a new document should be inserted if there are no matches to the query filter.
|
UpdateOptions |
upsert(boolean upsert)
Set to true if a new document should be inserted if there are no matches to the query filter.
|
private boolean upsert
private java.lang.Boolean bypassDocumentValidation
private Collation collation
public boolean isUpsert()
public UpdateOptions upsert(boolean upsert)
upsert
- true if a new document should be inserted if there are no matches to the query filterpublic java.lang.Boolean getBypassDocumentValidation()
public UpdateOptions bypassDocumentValidation(java.lang.Boolean bypassDocumentValidation)
bypassDocumentValidation
- If true, allows the write to opt-out of document level validation.public Collation getCollation()
public UpdateOptions collation(Collation collation)
A null value represents the server default.
collation
- the collation options to use