public class DBCollectionUpdateOptions
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.Boolean |
bypassDocumentValidation |
private Collation |
collation |
private DBEncoder |
encoder |
private boolean |
multi |
private boolean |
upsert |
private WriteConcern |
writeConcern |
Constructor and Description |
---|
DBCollectionUpdateOptions()
Construct a new instance
|
Modifier and Type | Method and Description |
---|---|
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.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
|
private boolean upsert
private java.lang.Boolean bypassDocumentValidation
private boolean multi
private Collation collation
private WriteConcern writeConcern
private DBEncoder encoder
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 WriteConcern getWriteConcern()
public DBCollectionUpdateOptions writeConcern(WriteConcern writeConcern)
writeConcern
- the write concernpublic DBEncoder getEncoder()
public DBCollectionUpdateOptions encoder(DBEncoder encoder)
encoder
- the encoder