Class FindOptions


  • public class FindOptions
    extends Object
    The options for find operation.
    Since:
    1.0
    Author:
    Anindya Chatterjee
    • Constructor Detail

      • FindOptions

        public FindOptions()
        Instantiates a new FindOptions.
    • Method Detail

      • orderBy

        public static FindOptions orderBy​(String fieldName,
                                          SortOrder sortOrder)
        Order by find options.
        Parameters:
        fieldName - the field name
        sortOrder - the sort order
        Returns:
        the find options
      • skipBy

        public static FindOptions skipBy​(long skip)
        Skip by find options.
        Parameters:
        skip - the skip
        Returns:
        the find options
      • limitBy

        public static FindOptions limitBy​(long limit)
        Limit by find options.
        Parameters:
        limit - the limit
        Returns:
        the find options
      • withDistinct

        public static FindOptions withDistinct()
        Indicates if the find operation should return distinct results.
      • skip

        public FindOptions skip​(Long skip)
        Skip find options.
        Parameters:
        skip - the skip
        Returns:
        the find options
      • skip

        public FindOptions skip​(Integer skip)
        Skip find options.
        Parameters:
        skip - the skip
        Returns:
        the find options
      • limit

        public FindOptions limit​(Long limit)
        Limit find options.
        Parameters:
        limit - the limit
        Returns:
        the find options
      • limit

        public FindOptions limit​(Integer limit)
        Limit find options.
        Parameters:
        limit - the limit
        Returns:
        the find options
      • thenOrderBy

        public FindOptions thenOrderBy​(String fieldName,
                                       SortOrder sortOrder)
        Then order by find options.
        Parameters:
        fieldName - the field name
        sortOrder - the sort order
        Returns:
        the find options
      • withDistinct

        public FindOptions withDistinct​(boolean distinct)
        Indicates if the find operation should return distinct and unique results.
        Parameters:
        distinct - the distinct
        Returns:
        the find options
      • skip

        public Long skip()
        Gets the skip count.
      • limit

        public Long limit()
        Gets the limit count.
      • distinct

        public boolean distinct()
        Indicates if the find operation should return distinct results.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object