public final class DBCollectionFindAndModifyOptions extends Object
Constructor and Description |
---|
DBCollectionFindAndModifyOptions()
Construct a new instance
|
Modifier and Type | Method and Description |
---|---|
DBCollectionFindAndModifyOptions |
bypassDocumentValidation(Boolean bypassDocumentValidation)
Sets the bypassDocumentValidation
|
DBCollectionFindAndModifyOptions |
collation(Collation collation)
Sets the collation
|
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()
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 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 nullpublic WriteConcern getWriteConcern()
public DBCollectionFindAndModifyOptions writeConcern(WriteConcern writeConcern)
writeConcern
- the writeConcernpublic Collation getCollation()
public DBCollectionFindAndModifyOptions collation(Collation collation)
collation
- the collation