Class CountOptions


  • public class CountOptions
    extends Object
    • Constructor Detail

      • CountOptions

        public CountOptions()
      • CountOptions

        public CountOptions​(CountOptions countOptions)
      • CountOptions

        public CountOptions​(JsonObject json)
    • Method Detail

      • toMongoDriverObject

        public com.mongodb.client.model.CountOptions toMongoDriverObject()
        Returns the mongo-java-driver specific object.
        Returns:
        com.mongodb.client.model.CountOptions
      • getHint

        public JsonObject getHint()
        Gets the hint to apply.
        Returns:
        the hint, which should describe an existing
      • setHint

        public CountOptions setHint​(JsonObject hint)
        Optional. The index to use. Specify either the index name as a string or the index specification document.
        Parameters:
        hint -
        Returns:
        CountOptions
      • getHintString

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

        public CountOptions setHintString​(String hint)
        Sets the hint to apply. Note: If hint 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:
        CountOptions
      • getLimit

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

        public CountOptions setLimit​(Integer limit)
        Sets the limit to apply.
        Parameters:
        limit - the limit
        Returns:
        CountOptions
      • getSkip

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

        public CountOptions setSkip​(Integer skip)
        Optional. The number of matching documents to skip before returning results.
        Parameters:
        skip -
        Returns:
      • getMaxTime

        public Long getMaxTime()
        Gets the maximum execution time (in ms) on the server for this operation. The default is 0, which places no limit on the execution time.
        Returns:
        the maximum execution time in milliseconds
      • setMaxTime

        public CountOptions setMaxTime​(Long maxTime)
        Sets the maximum execution time (in ms) on the server for this operation.
        Parameters:
        maxTime - the max time (in ms)
        Returns:
        CountOptions
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object