Package com.mongodb.client.model
Class DBCollectionDistinctOptions
java.lang.Object
com.mongodb.client.model.DBCollectionDistinctOptions
The options for a distinct operation.
- Since:
- 3.4
- MongoDB documentation
- Count
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionSets the collationSets the selection query to determine the subset of documents from which to retrieve the distinct values.Returns the collation optionsGets the selection query to determine the subset of documents from which to retrieve the distinct valuesReturns the readConcernReturns the readPreferencereadConcern(ReadConcern readConcern) Sets the readConcernreadPreference(ReadPreference readPreference) Sets the readPreference
- 
Constructor Details- 
DBCollectionDistinctOptionspublic DBCollectionDistinctOptions()Construct a new instance
 
- 
- 
Method Details- 
getFilterGets the selection query to determine the subset of documents from which to retrieve the distinct values- Returns:
- the query
 
- 
filterSets the selection query to determine the subset of documents from which to retrieve the distinct values.- Parameters:
- filter- the selection query to determine the subset of documents from which to retrieve the distinct values
- Returns:
- this
 
- 
getReadPreferenceReturns the readPreference- Returns:
- the readPreference
 
- 
readPreferenceSets the readPreference- Parameters:
- readPreference- the readPreference
- Returns:
- this
 
- 
getReadConcernReturns the readConcern- Returns:
- the readConcern
- Since server release
- 3.2
 
- 
readConcernSets the readConcern- Parameters:
- readConcern- the readConcern
- 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
 
 
-