Package org.dizitart.no2.collection
Class FindOptions
java.lang.Object
org.dizitart.no2.collection.FindOptions
The options for find operation.
- Since:
- 1.0
- Author:
- Anindya Chatterjee
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncollator()Specifies theCollator.Specifies theCollator.booleandistinct()Indicates if the find operation should return distinct results.booleaninthashCode()limit()Gets the limit count.Limit find options.Limit find options.static FindOptionslimitBy(long limit) Limit by find options.orderBy()Gets theSortableFieldsfor sorting the find results.static FindOptionsOrder by find options.skip()Gets the skip count.Skip find options.Skip find options.static FindOptionsskipBy(long skip) Skip by find options.thenOrderBy(String fieldName, SortOrder sortOrder) Then order by find options.toString()static FindOptionsIndicates if the find operation should return distinct results.withDistinct(boolean distinct) Indicates if the find operation should return distinct and unique results.
-
Constructor Details
-
FindOptions
public FindOptions()Instantiates a new FindOptions.
-
-
Method Details
-
orderBy
Order by find options.- Parameters:
fieldName- the field namesortOrder- the sort order- Returns:
- the find options
-
skipBy
Skip by find options.- Parameters:
skip- the skip- Returns:
- the find options
-
limitBy
Limit by find options.- Parameters:
limit- the limit- Returns:
- the find options
-
withDistinct
Indicates if the find operation should return distinct results. -
skip
Skip find options.- Parameters:
skip- the skip- Returns:
- the find options
-
skip
Skip find options.- Parameters:
skip- the skip- Returns:
- the find options
-
limit
Limit find options.- Parameters:
limit- the limit- Returns:
- the find options
-
limit
Limit find options.- Parameters:
limit- the limit- Returns:
- the find options
-
thenOrderBy
Then order by find options.- Parameters:
fieldName- the field namesortOrder- the sort order- Returns:
- the find options
-
withDistinct
Indicates if the find operation should return distinct and unique results.- Parameters:
distinct- the distinct- Returns:
- the find options
-
orderBy
Gets theSortableFieldsfor sorting the find results. -
skip
Gets the skip count. -
limit
Gets the limit count. -
distinct
public boolean distinct()Indicates if the find operation should return distinct results. -
collator
Specifies theCollator. -
equals
-
hashCode
public int hashCode() -
toString
-
collator
Specifies theCollator.- Returns:
this.
-