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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description String
getField()
Gets the sort fieldString
getId()
Gets the id of the sort.I18nizableText
getLabel()
Gets the label of the sort.default Sort.Order[]
orders()
Gets the orders this sort supports.
-
-
-
Method Detail
-
getId
String getId()
Gets the id of the sort. It must be unique across all sort definitions- Returns:
- the unique id of the sort
-
getLabel
I18nizableText 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 toSort.Order.ASC
andSort.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
-
-