Interface SortDefinition

All Known Implementing Classes:
CommonPertinenceSortDefinition, CommonSystemPropertyBasedSortDefinition, CommonTitleSortDefinition, DefaultSortDefinition

public interface SortDefinition
A potential sort proposed to the creator of an instance of search service.
  • Method Details

    • getId

      Gets the id of the sort. It must be unique across all sort definitions
      Returns:
      the unique id of the sort
    • getLabel

      Gets the label of the sort.
      Returns:
      the label of the sort.
    • orders

      default Sort.Order[] orders()
      Gets the orders this sort supports.
      By default to Sort.Order.ASC and Sort.Order.DESC.
      Override this method to restrict to only one of them, if the other is irrelevant for instance.
      Returns:
      the orders this sort supports
    • getField

      Gets the sort field
      Returns:
      the sort field