public final class DBCollectionFindAndModifyOptions extends Object
Constructor | Description |
---|---|
DBCollectionFindAndModifyOptions() |
Construct a new instance
|
Modifier and Type | Method | Description |
---|---|---|
DBCollectionFindAndModifyOptions |
arrayFilters(List<? extends DBObject> arrayFilters) |
Sets the array filters option
|
DBCollectionFindAndModifyOptions |
bypassDocumentValidation(Boolean bypassDocumentValidation) |
Sets the bypassDocumentValidation
|
DBCollectionFindAndModifyOptions |
collation(Collation collation) |
Sets the collation
|
List<? extends DBObject> |
getArrayFilters() |
Returns the array filters option
|
Boolean |
getBypassDocumentValidation() |
Returns the bypassDocumentValidation
|
Collation |
getCollation() |
Returns the collation options
|
long |
getMaxTime(TimeUnit timeUnit) |
Gets the maximum execution time on the server for this operation.
|
DBObject |
getProjection() |
Returns the projection
|
DBObject |
getSort() |
Returns the sort
|
DBObject |
getUpdate() |
Returns the update
|
WriteConcern |
getWriteConcern() |
Returns the writeConcern
|
boolean |
isRemove() |
Returns the remove
|
boolean |
isUpsert() |
Returns the upsert
|
DBCollectionFindAndModifyOptions |
maxTime(long maxTime,
TimeUnit timeUnit) |
Sets the maximum execution time on the server for this operation.
|
DBCollectionFindAndModifyOptions |
projection(DBObject projection) |
Sets the projection
|
DBCollectionFindAndModifyOptions |
remove(boolean remove) |
Sets the remove
|
boolean |
returnNew() |
Returns the returnNew
|
DBCollectionFindAndModifyOptions |
returnNew(boolean returnNew) |
Sets the returnNew
|
DBCollectionFindAndModifyOptions |
sort(DBObject sort) |
Sets the sort
|
DBCollectionFindAndModifyOptions |
update(DBObject update) |
Sets the update
|
DBCollectionFindAndModifyOptions |
upsert(boolean upsert) |
Sets the upsert
|
DBCollectionFindAndModifyOptions |
writeConcern(WriteConcern writeConcern) |
Sets the writeConcern
|
public DBCollectionFindAndModifyOptions()
@Nullable public DBObject getProjection()
public DBCollectionFindAndModifyOptions projection(@Nullable DBObject projection)
projection
- the projectionpublic DBCollectionFindAndModifyOptions sort(@Nullable DBObject sort)
sort
- the sortpublic boolean isRemove()
public DBCollectionFindAndModifyOptions remove(boolean remove)
remove
- the removepublic DBCollectionFindAndModifyOptions update(@Nullable DBObject update)
update
- the updatepublic boolean isUpsert()
public DBCollectionFindAndModifyOptions upsert(boolean upsert)
upsert
- the upsertpublic boolean returnNew()
public DBCollectionFindAndModifyOptions returnNew(boolean returnNew)
returnNew
- the returnNewpublic Boolean getBypassDocumentValidation()
public DBCollectionFindAndModifyOptions bypassDocumentValidation(Boolean bypassDocumentValidation)
bypassDocumentValidation
- the bypassDocumentValidationpublic long getMaxTime(TimeUnit timeUnit)
timeUnit
- the time unit to return the result inpublic DBCollectionFindAndModifyOptions maxTime(long maxTime, TimeUnit timeUnit)
maxTime
- the max timetimeUnit
- the time unit, which may not be null@Nullable public WriteConcern getWriteConcern()
public DBCollectionFindAndModifyOptions writeConcern(@Nullable WriteConcern writeConcern)
writeConcern
- the writeConcernpublic Collation getCollation()
public DBCollectionFindAndModifyOptions collation(Collation collation)
collation
- the collationpublic DBCollectionFindAndModifyOptions arrayFilters(List<? extends DBObject> arrayFilters)
arrayFilters
- the array filters, which may be null