Class FindOptions

java.lang.Object
org.dizitart.no2.collection.FindOptions

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

    • FindOptions

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

    • 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
    • orderBy

      public SortableFields orderBy()
      Gets the SortableFields for sorting the find results.
    • 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.
    • collator

      public Collator collator()
      Specifies the Collator.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • collator

      public FindOptions collator(Collator collator)
      Specifies the Collator.
      Returns:
      this.