Class CountOptions


  • @Deprecated(since="2021-05-27")
    public class CountOptions
    extends java.lang.Object
    Deprecated.
    Usage of this API is not supported in AEM as a Cloud Service.
    The options for a count operation.
    Since:
    3.0
    • Constructor Summary

      Constructors 
      Constructor Description
      CountOptions()
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      CountOptions collation​(Collation collation)
      Deprecated.
      Sets the collation options
      Collation getCollation()
      Deprecated.
      Returns the collation options
      Bson getHint()
      Deprecated.
      Gets the hint to apply.
      java.lang.String getHintString()
      Deprecated.
      Gets the hint string to apply.
      int getLimit()
      Deprecated.
      Gets the limit to apply.
      long getMaxTime​(java.util.concurrent.TimeUnit timeUnit)
      Deprecated.
      Gets the maximum execution time on the server for this operation.
      int getSkip()
      Deprecated.
      Gets the number of documents to skip.
      CountOptions hint​(Bson hint)
      Deprecated.
      Sets the hint to apply.
      CountOptions hintString​(java.lang.String hint)
      Deprecated.
      Sets the hint to apply.
      CountOptions limit​(int limit)
      Deprecated.
      Sets the limit to apply.
      CountOptions maxTime​(long maxTime, java.util.concurrent.TimeUnit timeUnit)
      Deprecated.
      Sets the maximum execution time on the server for this operation.
      CountOptions skip​(int skip)
      Deprecated.
      Sets the number of documents to skip.
      java.lang.String toString()
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CountOptions

        public CountOptions()
        Deprecated.
    • Method Detail

      • getHint

        @Nullable
        public Bson getHint()
        Deprecated.
        Gets the hint to apply.
        Returns:
        the hint, which should describe an existing
      • getHintString

        @Nullable
        public java.lang.String getHintString()
        Deprecated.
        Gets the hint string to apply.
        Returns:
        the hint string, which should be the name of an existing index
      • hint

        public CountOptions hint​(@Nullable
                                 Bson hint)
        Deprecated.
        Sets the hint to apply.
        Parameters:
        hint - a document describing the index which should be used for this operation.
        Returns:
        this
      • hintString

        public CountOptions hintString​(@Nullable
                                       java.lang.String hint)
        Deprecated.
        Sets the hint to apply.

        Note: If hint(Bson) is set that will be used instead of any hint string.

        Parameters:
        hint - the name of the index which should be used for the operation
        Returns:
        this
      • getLimit

        public int getLimit()
        Deprecated.
        Gets the limit to apply. The default is 0, which means there is no limit.
        Returns:
        the limit
      • limit

        public CountOptions limit​(int limit)
        Deprecated.
        Sets the limit to apply.
        Parameters:
        limit - the limit
        Returns:
        this
      • getSkip

        public int getSkip()
        Deprecated.
        Gets the number of documents to skip. The default is 0.
        Returns:
        the number of documents to skip
      • skip

        public CountOptions skip​(int skip)
        Deprecated.
        Sets the number of documents to skip.
        Parameters:
        skip - the number of documents to skip
        Returns:
        this
      • getMaxTime

        public long getMaxTime​(java.util.concurrent.TimeUnit timeUnit)
        Deprecated.
        Gets 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
      • maxTime

        public CountOptions maxTime​(long maxTime,
                                    java.util.concurrent.TimeUnit timeUnit)
        Deprecated.
        Sets 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
      • getCollation

        @Nullable
        public Collation getCollation()
        Deprecated.
        Returns the collation options
        Returns:
        the collation options
        Since:
        3.4
      • collation

        public CountOptions collation​(@Nullable
                                      Collation collation)
        Deprecated.
        Sets the collation options

        A null value represents the server default.

        Parameters:
        collation - the collation options to use
        Returns:
        this
        Since:
        3.4
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object