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.
|
java.lang.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 java.lang.Boolean getBypassDocumentValidation()
public UpdateOptions bypassDocumentValidation(@Nullable java.lang.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 java.util.List<? extends Bson> arrayFilters)
arrayFilters
- the array filters, which may be null@Nullable public java.util.List<? extends Bson> getArrayFilters()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2010 - 2020 Adobe. All Rights Reserved