Class 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 Detail

      • SortingParams

        public SortingParams()
    • 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:
        true if attribute sorting is enabled, false otherwise.
      • setAttributeSorting

        public void setAttributeSorting​(boolean attributeSorting)
        Sets whether attribute sorting is enabled.
        Parameters:
        attributeSorting - true to enable attribute sorting, false to disable it.
      • getAttributeSortingParams

        public AttributeSortingParams getAttributeSortingParams()
        Gets the attribute sorting parameters.
        Returns:
        The attribute sorting parameters, or null if attribute sorting is not enabled.
      • setAttributeSortingParams

        public void setAttributeSortingParams​(AttributeSortingParams attributeSortingParams)
        Sets the attribute sorting parameters.
        Parameters:
        attributeSortingParams - The attribute sorting parameters to set.