public class DBCollectionUpdateOptions extends Object
Constructor | Description |
---|---|
DBCollectionUpdateOptions() |
Construct a new instance
|
Modifier and Type | Method | Description |
---|---|---|
DBCollectionUpdateOptions |
arrayFilters(List<? extends DBObject> arrayFilters) |
Sets the array filters option
|
DBCollectionUpdateOptions |
bypassDocumentValidation(Boolean bypassDocumentValidation) |
Sets the bypass document level validation flag.
|
DBCollectionUpdateOptions |
collation(Collation collation) |
Sets the collation
|
DBCollectionUpdateOptions |
encoder(DBEncoder encoder) |
Sets the encoder
|
List<? extends DBObject> |
getArrayFilters() |
Returns the array filters option
|
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 Boolean getBypassDocumentValidation()
public DBCollectionUpdateOptions bypassDocumentValidation(@Nullable 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 List<? extends DBObject> arrayFilters)
arrayFilters
- the array filters, which may be null@Nullable public List<? extends DBObject> getArrayFilters()
@Nullable public WriteConcern getWriteConcern()
public DBCollectionUpdateOptions writeConcern(@Nullable WriteConcern writeConcern)
writeConcern
- the write concernpublic DBCollectionUpdateOptions encoder(@Nullable DBEncoder encoder)
encoder
- the encoder