public class DBCollectionUpdateOptions
extends java.lang.Object
Constructor and Description |
---|
DBCollectionUpdateOptions()
Construct a new instance
|
Modifier and Type | Method and Description |
---|---|
DBCollectionUpdateOptions |
arrayFilters(java.util.List<? extends DBObject> arrayFilters)
Sets the array filters option
|
DBCollectionUpdateOptions |
bypassDocumentValidation(java.lang.Boolean bypassDocumentValidation)
Sets the bypass document level validation flag.
|
DBCollectionUpdateOptions |
collation(Collation collation)
Sets the collation
|
DBCollectionUpdateOptions |
encoder(DBEncoder encoder)
Sets the encoder
|
java.util.List<? extends DBObject> |
getArrayFilters()
Returns the array filters option
|
java.lang.Boolean |
getBypassDocumentValidation()
Gets the the bypass document level validation flag
|
Collation |
getCollation()
Returns the collation options
|
DBEncoder |
getEncoder()
Returns the encoder
|
WriteConcern |
getWriteConcern()
The write concern to use for the insertion.
|
boolean |
isMulti()
Gets whether all documents matching the query filter will be removed.
|
boolean |
isUpsert()
Returns true if a new document should be inserted if there are no matches to the query filter.
|
DBCollectionUpdateOptions |
multi(boolean multi)
Sets whether all documents matching the query filter will be removed.
|
DBCollectionUpdateOptions |
upsert(boolean isUpsert)
Set to true if a new document should be inserted if there are no matches to the query filter.
|
DBCollectionUpdateOptions |
writeConcern(WriteConcern writeConcern)
Sets the write concern
|
public DBCollectionUpdateOptions()
public boolean isUpsert()
public DBCollectionUpdateOptions upsert(boolean isUpsert)
isUpsert
- true if a new document should be inserted if there are no matches to the query filter@Nullable public java.lang.Boolean getBypassDocumentValidation()
public DBCollectionUpdateOptions bypassDocumentValidation(@Nullable java.lang.Boolean bypassDocumentValidation)
bypassDocumentValidation
- If true, allows the write to opt-out of document level validation.public DBCollectionUpdateOptions multi(boolean multi)
multi
- true if all documents matching the query filter will be removedpublic boolean isMulti()
@Nullable public Collation getCollation()
public DBCollectionUpdateOptions collation(@Nullable Collation collation)
collation
- the collationpublic DBCollectionUpdateOptions arrayFilters(@Nullable java.util.List<? extends DBObject> arrayFilters)
arrayFilters
- the array filters, which may be null@Nullable public java.util.List<? extends DBObject> getArrayFilters()
@Nullable public WriteConcern getWriteConcern()
public DBCollectionUpdateOptions writeConcern(@Nullable WriteConcern writeConcern)
writeConcern
- the write concern@Nullable public DBEncoder getEncoder()
public DBCollectionUpdateOptions encoder(@Nullable DBEncoder encoder)
encoder
- the encoderCopyright © 2010 - 2020 Adobe. All Rights Reserved