Package com.mongodb.client.model
Class DBCollectionDistinctOptions
- java.lang.Object
-
- com.mongodb.client.model.DBCollectionDistinctOptions
-
-
Constructor Summary
Constructors Constructor Description DBCollectionDistinctOptions()
Construct a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DBCollectionDistinctOptions
collation(Collation collation)
Sets the collationDBCollectionDistinctOptions
filter(DBObject filter)
Sets the selection query to determine the subset of documents from which to retrieve the distinct values.Collation
getCollation()
Returns the collation optionsDBObject
getFilter()
Gets the selection query to determine the subset of documents from which to retrieve the distinct valuesReadConcern
getReadConcern()
Returns the readConcernReadPreference
getReadPreference()
Returns the readPreferenceDBCollectionDistinctOptions
readConcern(ReadConcern readConcern)
Sets the readConcernDBCollectionDistinctOptions
readPreference(ReadPreference readPreference)
Sets the readPreference
-
-
-
Method Detail
-
getFilter
@Nullable public DBObject getFilter()
Gets the selection query to determine the subset of documents from which to retrieve the distinct values- Returns:
- the query
-
filter
public DBCollectionDistinctOptions filter(@Nullable DBObject filter)
Sets 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
-
getReadPreference
@Nullable public ReadPreference getReadPreference()
Returns the readPreference- Returns:
- the readPreference
-
readPreference
public DBCollectionDistinctOptions readPreference(@Nullable ReadPreference readPreference)
Sets the readPreference- Parameters:
readPreference
- the readPreference- Returns:
- this
-
getReadConcern
@Nullable public ReadConcern getReadConcern()
Returns the readConcern- Returns:
- the readConcern
- Since server release
- 3.2
-
readConcern
public DBCollectionDistinctOptions readConcern(@Nullable ReadConcern readConcern)
Sets the readConcern- Parameters:
readConcern
- the readConcern- Returns:
- this
- Since server release
- 3.2
-
getCollation
@Nullable public Collation getCollation()
Returns the collation options- Returns:
- the collation options
- Since server release
- 3.4
-
collation
public DBCollectionDistinctOptions collation(@Nullable Collation collation)
Sets the collation- Parameters:
collation
- the collation- Returns:
- this
- Since server release
- 3.4
-
-