Package com.mongodb.client.model
Class DBCollectionFindAndModifyOptions
java.lang.Object
com.mongodb.client.model.DBCollectionFindAndModifyOptions
The oprtions for find and modify operations.
- Since:
- 3.4
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionarrayFilters(List<? extends DBObject> arrayFilters) Sets the array filters optionbypassDocumentValidation(Boolean bypassDocumentValidation) Sets the bypassDocumentValidationSets the collationReturns the array filters optionReturns the bypassDocumentValidationReturns the collation optionslonggetMaxTime(TimeUnit timeUnit) Gets the maximum execution time on the server for this operation.Returns the projectiongetSort()Returns the sortReturns the updateReturns the writeConcernbooleanisRemove()Returns the removebooleanisUpsert()Returns the upsertSets the maximum execution time on the server for this operation.projection(DBObject projection) Sets the projectionremove(boolean remove) Sets the removebooleanReturns the returnNewreturnNew(boolean returnNew) Sets the returnNewSets the sortSets the updateupsert(boolean upsert) Sets the upsertwriteConcern(WriteConcern writeConcern) Sets the writeConcern
- 
Constructor Details- 
DBCollectionFindAndModifyOptionspublic DBCollectionFindAndModifyOptions()Construct a new instance
 
- 
- 
Method Details- 
getProjectionReturns the projection- Returns:
- the projection
 
- 
projectionSets the projection- Parameters:
- projection- the projection
- Returns:
- this
 
- 
getSortReturns the sort- Returns:
- the sort
 
- 
sortSets the sort- Parameters:
- sort- the sort
- Returns:
- this
 
- 
isRemovepublic boolean isRemove()Returns the remove- Returns:
- the remove
 
- 
removeSets the remove- Parameters:
- remove- the remove
- Returns:
- this
 
- 
getUpdateReturns the update- Returns:
- the update
 
- 
updateSets the update- Parameters:
- update- the update
- Returns:
- this
 
- 
isUpsertpublic boolean isUpsert()Returns the upsert- Returns:
- the upsert
 
- 
upsertSets the upsert- Parameters:
- upsert- the upsert
- Returns:
- this
 
- 
returnNewpublic boolean returnNew()Returns the returnNew- Returns:
- the returnNew
 
- 
returnNewSets the returnNew- Parameters:
- returnNew- the returnNew
- Returns:
- this
 
- 
getBypassDocumentValidationReturns the bypassDocumentValidation- Returns:
- the bypassDocumentValidation
 
- 
bypassDocumentValidationSets the bypassDocumentValidation- Parameters:
- bypassDocumentValidation- the bypassDocumentValidation
- Returns:
- this
 
- 
getMaxTimeGets the maximum execution time on the server for this operation. The default is 0, which places no limit on the execution time.- Parameters:
- timeUnit- the time unit to return the result in
- Returns:
- the maximum execution time in the given time unit
- MongoDB documentation
- Max Time
 
- 
maxTimeSets the maximum execution time on the server for this operation.- Parameters:
- maxTime- the max time
- timeUnit- the time unit, which may not be null
- Returns:
- this
- MongoDB documentation
- Max Time
 
- 
getWriteConcernReturns the writeConcern- Returns:
- the writeConcern
- Since server release
- 3.2
 
- 
writeConcernSets the writeConcern- Parameters:
- writeConcern- the writeConcern
- Returns:
- this
- Since server release
- 3.2
 
- 
getCollationReturns the collation options- Returns:
- the collation options
- Since server release
- 3.4
 
- 
collationSets the collation- Parameters:
- collation- the collation
- Returns:
- this
- Since server release
- 3.4
 
- 
arrayFiltersSets the array filters option- Parameters:
- arrayFilters- the array filters, which may be null
- Returns:
- this
- Since:
- 3.6
- Since server release
- 3.6
 
- 
getArrayFiltersReturns the array filters option- Returns:
- the array filters, which may be null
- Since:
- 3.6
- Since server release
- 3.6
 
 
-