public class UpdateOptions extends Object
Constructor and Description |
---|
UpdateOptions() |
Modifier and Type | Method and Description |
---|---|
UpdateOptions | bypassDocumentValidation(Boolean bypassDocumentValidation) Sets the bypass document level validation flag. |
UpdateOptions | collation(Collation collation) Sets the collation options |
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. |
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 Boolean getBypassDocumentValidation()
public UpdateOptions bypassDocumentValidation(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