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 Summary
Modifier and TypeMethodDescriptiongetField()Gets the sort fieldgetId()Gets the id of the sort.getLabel()Gets the label of the sort.default Sort.Order[]orders()Gets the orders this sort supports.
-
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
Gets the orders this sort supports.
By default toSort.Order.ASCandSort.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
-