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 Collator
collator()
Specifies theCollator
.FindOptions
collator(Collator collator)
Specifies theCollator
.boolean
distinct()
Indicates if the find operation should return distinct results.boolean
equals(Object o)
int
hashCode()
Long
limit()
Gets the limit count.FindOptions
limit(Integer limit)
Limit find options.FindOptions
limit(Long limit)
Limit find options.static FindOptions
limitBy(long limit)
Limit by find options.SortableFields
orderBy()
Gets theSortableFields
for sorting the find results.static FindOptions
orderBy(String fieldName, SortOrder sortOrder)
Order by find options.Long
skip()
Gets the skip count.FindOptions
skip(Integer skip)
Skip find options.FindOptions
skip(Long skip)
Skip find options.static FindOptions
skipBy(long skip)
Skip by find options.FindOptions
thenOrderBy(String fieldName, SortOrder sortOrder)
Then order by find options.String
toString()
static FindOptions
withDistinct()
Indicates if the find operation should return distinct results.FindOptions
withDistinct(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 theSortableFields
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 FindOptions collator(Collator collator)
Specifies theCollator
.- Returns:
this
.
-
-