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 filterpublic java.lang.Boolean getBypassDocumentValidation()
public DBCollectionUpdateOptions bypassDocumentValidation(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()
public Collation getCollation()
public DBCollectionUpdateOptions collation(Collation collation)
collation
- the collationpublic DBCollectionUpdateOptions arrayFilters(java.util.List<? extends DBObject> arrayFilters)
arrayFilters
- the array filters, which may be nullpublic java.util.List<? extends DBObject> getArrayFilters()
public WriteConcern getWriteConcern()
public DBCollectionUpdateOptions writeConcern(WriteConcern writeConcern)
writeConcern
- the write concernpublic DBEncoder getEncoder()
public DBCollectionUpdateOptions encoder(DBEncoder encoder)
encoder
- the encoder