Package org.dizitart.no2.collection
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 Summary
Constructors Constructor Description FindOptions()Instantiates a new FindOptions.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Collatorcollator()Specifies theCollator.FindOptionscollator(Collator collator)Specifies theCollator.booleandistinct()Indicates if the find operation should return distinct results.booleanequals(Object o)inthashCode()Longlimit()Gets the limit count.FindOptionslimit(Integer limit)Limit find options.FindOptionslimit(Long limit)Limit find options.static FindOptionslimitBy(long limit)Limit by find options.SortableFieldsorderBy()Gets theSortableFieldsfor sorting the find results.static FindOptionsorderBy(String fieldName, SortOrder sortOrder)Order by find options.Longskip()Gets the skip count.FindOptionsskip(Integer skip)Skip find options.FindOptionsskip(Long skip)Skip find options.static FindOptionsskipBy(long skip)Skip by find options.FindOptionsthenOrderBy(String fieldName, SortOrder sortOrder)Then order by find options.StringtoString()static FindOptionswithDistinct()Indicates if the find operation should return distinct results.FindOptionswithDistinct(boolean distinct)Indicates if the find operation should return distinct and unique results.
-
-
-
Method Detail
-
orderBy
public static FindOptions orderBy(String fieldName, SortOrder sortOrder)
Order by find options.- Parameters:
fieldName- the field namesortOrder- 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 namesortOrder- 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 theSortableFieldsfor 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 FindOptions collator(Collator collator)
Specifies theCollator.- Returns:
this.
-
-