public class UpdateOptions extends Object
| Constructor and Description |
|---|
UpdateOptions() |
| Modifier and Type | Method and Description |
|---|---|
UpdateOptions |
arrayFilters(List<? extends Bson> arrayFilters)
Sets the array filters option
|
UpdateOptions |
bypassDocumentValidation(Boolean bypassDocumentValidation)
Sets the bypass document level validation flag.
|
UpdateOptions |
collation(Collation collation)
Sets the collation options
|
List<? extends Bson> |
getArrayFilters()
Returns the array filters option
|
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.
|
String |
toString() |
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 filter@Nullable public Boolean getBypassDocumentValidation()
public UpdateOptions bypassDocumentValidation(@Nullable Boolean bypassDocumentValidation)
bypassDocumentValidation - If true, allows the write to opt-out of document level validation.@Nullable public Collation getCollation()
public UpdateOptions collation(@Nullable Collation collation)
A null value represents the server default.
collation - the collation options to usepublic UpdateOptions arrayFilters(@Nullable List<? extends Bson> arrayFilters)
arrayFilters - the array filters, which may be null@Nullable public List<? extends Bson> getArrayFilters()
Copyright © 2010 - 2020 Adobe. All Rights Reserved