Class CommonPertinenceSortDefinition
- java.lang.Object
-
- org.ametys.web.frontoffice.search.metamodel.impl.DefaultSortDefinition
-
- org.ametys.web.frontoffice.search.metamodel.impl.CommonPertinenceSortDefinition
-
- All Implemented Interfaces:
SortDefinition
public class CommonPertinenceSortDefinition extends DefaultSortDefinition
SortDefinition
implementation for a sort on pertinence (Solr pseudo-field "score").
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
__ID
The id of the sort definition-
Fields inherited from class org.ametys.web.frontoffice.search.metamodel.impl.DefaultSortDefinition
_id, _label, _searchField, _searchFieldStr
-
-
Constructor Summary
Constructors Constructor Description CommonPertinenceSortDefinition()
Default constructor with default labelCommonPertinenceSortDefinition(I18nizableText label)
Constructor with a label
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Sort.Order[]
orders()
Gets the orders this sort supports.-
Methods inherited from class org.ametys.web.frontoffice.search.metamodel.impl.DefaultSortDefinition
getField, getId, getLabel
-
-
-
-
Field Detail
-
__ID
protected static final String __ID
The id of the sort definition- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CommonPertinenceSortDefinition
public CommonPertinenceSortDefinition()
Default constructor with default label
-
CommonPertinenceSortDefinition
public CommonPertinenceSortDefinition(I18nizableText label)
Constructor with a label- Parameters:
label
- The label
-
-
Method Detail
-
orders
public Sort.Order[] orders()
Description copied from interface:SortDefinition
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
-
-