public final class DBCollectionFindAndModifyOptions
extends java.lang.Object
Constructor and Description |
---|
DBCollectionFindAndModifyOptions()
Construct a new instance
|
Modifier and Type | Method and Description |
---|---|
DBCollectionFindAndModifyOptions |
arrayFilters(java.util.List<? extends DBObject> arrayFilters)
Sets the array filters option
|
DBCollectionFindAndModifyOptions |
bypassDocumentValidation(java.lang.Boolean bypassDocumentValidation)
Sets the bypassDocumentValidation
|
DBCollectionFindAndModifyOptions |
collation(Collation collation)
Sets the collation
|
java.util.List<? extends DBObject> |
getArrayFilters()
Returns the array filters option
|
java.lang.Boolean |
getBypassDocumentValidation()
Returns the bypassDocumentValidation
|
Collation |
getCollation()
Returns the collation options
|
long |
getMaxTime(java.util.concurrent.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,
java.util.concurrent.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()
public DBObject getProjection()
public DBCollectionFindAndModifyOptions projection(DBObject projection)
projection
- the projectionpublic DBObject getSort()
public DBCollectionFindAndModifyOptions sort(DBObject sort)
sort
- the sortpublic boolean isRemove()
public DBCollectionFindAndModifyOptions remove(boolean remove)
remove
- the removepublic DBObject getUpdate()
public DBCollectionFindAndModifyOptions update(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 java.lang.Boolean getBypassDocumentValidation()
public DBCollectionFindAndModifyOptions bypassDocumentValidation(java.lang.Boolean bypassDocumentValidation)
bypassDocumentValidation
- the bypassDocumentValidationpublic long getMaxTime(java.util.concurrent.TimeUnit timeUnit)
timeUnit
- the time unit to return the result inpublic DBCollectionFindAndModifyOptions maxTime(long maxTime, java.util.concurrent.TimeUnit timeUnit)
maxTime
- the max timetimeUnit
- the time unit, which may not be nullpublic WriteConcern getWriteConcern()
public DBCollectionFindAndModifyOptions writeConcern(WriteConcern writeConcern)
writeConcern
- the writeConcernpublic Collation getCollation()
public DBCollectionFindAndModifyOptions collation(Collation collation)
collation
- the collationpublic DBCollectionFindAndModifyOptions arrayFilters(java.util.List<? extends DBObject> arrayFilters)
arrayFilters
- the array filters, which may be null