Class DBCollectionDistinctOptions


  • public class DBCollectionDistinctOptions
    extends Object
    The options for a distinct operation.
    Since:
    3.4
    MongoDB documentation
    Count
    • Constructor Detail

      • DBCollectionDistinctOptions

        public DBCollectionDistinctOptions()
        Construct a new instance
    • 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
      • getReadConcern

        @Nullable
        public ReadConcern getReadConcern()
        Returns the readConcern
        Returns:
        the readConcern
        Since server release
        3.2
      • getCollation

        @Nullable
        public Collation getCollation()
        Returns the collation options
        Returns:
        the collation options
        Since server release
        3.4