Class SortingParams
- java.lang.Object
-
- com.inteliqua.rest.common.criteria.SortingParams
-
public class SortingParams extends Object
Represents the sorting parameters for a search request.This class is used to define the sorting configuration for search results, including the sorting field, the order (ascending or descending), and whether attribute-based sorting is enabled. It also supports custom sorting via
AttributeSortingParams.The sorting can be applied to specific fields (e.g., "ID") and in either ascending or descending order.
- Author:
- nikritikos
-
-
Constructor Summary
Constructors Constructor Description SortingParams()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeSortingParamsgetAttributeSortingParams()Gets the attribute sorting parameters.StringgetSortingField()Gets the sorting field.StringgetSortingOrder()Gets the sorting order.booleanisAttributeSorting()Checks if attribute sorting is enabled.voidsetAttributeSorting(boolean attributeSorting)Sets whether attribute sorting is enabled.voidsetAttributeSortingParams(AttributeSortingParams attributeSortingParams)Sets the attribute sorting parameters.voidsetSortingField(String sortingField)Sets the sorting field.voidsetSortingOrder(String sortingOrder)Sets the sorting order.
-
-
-
Method Detail
-
getSortingField
public String getSortingField()
Gets the sorting field.- Returns:
- The sorting field (e.g., "ID").
-
setSortingField
public void setSortingField(String sortingField)
Sets the sorting field.- Parameters:
sortingField- The sorting field to set (e.g., "ID").
-
getSortingOrder
public String getSortingOrder()
Gets the sorting order.- Returns:
- The sorting order (either "ASC" or "DESC").
-
setSortingOrder
public void setSortingOrder(String sortingOrder)
Sets the sorting order.- Parameters:
sortingOrder- The sorting order to set (either "ASC" or "DESC").
-
isAttributeSorting
public boolean isAttributeSorting()
Checks if attribute sorting is enabled.- Returns:
trueif attribute sorting is enabled,falseotherwise.
-
setAttributeSorting
public void setAttributeSorting(boolean attributeSorting)
Sets whether attribute sorting is enabled.- Parameters:
attributeSorting-trueto enable attribute sorting,falseto disable it.
-
getAttributeSortingParams
public AttributeSortingParams getAttributeSortingParams()
Gets the attribute sorting parameters.- Returns:
- The attribute sorting parameters, or
nullif attribute sorting is not enabled.
-
setAttributeSortingParams
public void setAttributeSortingParams(AttributeSortingParams attributeSortingParams)
Sets the attribute sorting parameters.- Parameters:
attributeSortingParams- The attribute sorting parameters to set.
-
-