Class Criterion
java.lang.Object
com.helixframework.pagination.cursor.Criterion
- All Implemented Interfaces:
Serializable
A criterion used for sorting or filtering data during pagination.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetKey()Returns the key of the criterion.com.helixframework.pagination.sort.SortOrderReturns the sort order of the criterion.getValue()Retrieves the value of the criterion.inthashCode()static CriterionParses a string representation of a criterion and creates a new Criterion object.voidsetSortOrder(com.helixframework.pagination.sort.SortOrder sortOrder) Sets the sort order of the criterion.voidSets the value of the criterion.toString()
-
Constructor Details
-
Criterion
A criterion used for sorting or filtering data during pagination.- Parameters:
key- the key of the criterionvalue- the value of the criterion
-
Criterion
A criterion used for sorting or filtering data during pagination.- Parameters:
key- the key of the criterionvalue- the value of the criterionsortOrder- the sort order of the criterion
-
-
Method Details
-
parse
Parses a string representation of a criterion and creates a new Criterion object.- Parameters:
criterionStr- the string representation of the criterion- Returns:
- the parsed Criterion object
- Throws:
IllegalArgumentException- if the criterionStr does not match the expected format
-
getKey
Returns the key of the criterion.- Returns:
- the key of the criterion
-
getValue
Retrieves the value of the criterion.- Returns:
- the value of the criterion
-
getSortOrder
public com.helixframework.pagination.sort.SortOrder getSortOrder()Returns the sort order of the criterion.- Returns:
- the sort order of the criterion
-
setValue
Sets the value of the criterion.- Parameters:
value- the new value of the criterion
-
setSortOrder
public void setSortOrder(com.helixframework.pagination.sort.SortOrder sortOrder) Sets the sort order of the criterion.- Parameters:
sortOrder- the sort order to be set
-
toString
-
equals
-
hashCode
public int hashCode()
-