public class UpdateOptions
extends java.lang.Object
Constructor and Description |
---|
UpdateOptions() |
Modifier and Type | Method and Description |
---|---|
UpdateOptions |
arrayFilters(java.util.List<? extends Bson> arrayFilters)
Sets the array filters option
|
UpdateOptions |
bypassDocumentValidation(java.lang.Boolean bypassDocumentValidation)
Sets the bypass document level validation flag.
|
UpdateOptions |
collation(Collation collation)
Sets the collation options
|
java.util.List<? extends Bson> |
getArrayFilters()
Returns the array filters option
|
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.
|
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 usepublic UpdateOptions arrayFilters(java.util.List<? extends Bson> arrayFilters)
arrayFilters
- the array filters, which may be null