Class DefaultSortDefinition
- java.lang.Object
-
- org.ametys.web.frontoffice.search.metamodel.impl.DefaultSortDefinition
-
- All Implemented Interfaces:
SortDefinition
- Direct Known Subclasses:
CommonPertinenceSortDefinition
,CommonTitleSortDefinition
public class DefaultSortDefinition extends Object implements SortDefinition
Default implementation ofSortDefinition
.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) String
_id
(package private) I18nizableText
_label
(package private) SearchField
_searchField
(package private) String
_searchFieldStr
-
Constructor Summary
Constructors Modifier Constructor Description private
DefaultSortDefinition(String id, I18nizableText label)
DefaultSortDefinition(String id, I18nizableText label, String searchFieldString)
Default constructor with aString
DefaultSortDefinition(String id, I18nizableText label, SearchField searchField)
Default constructor with aSearchField
-
Method Summary
All Methods Instance Methods Concrete 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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.web.frontoffice.search.metamodel.SortDefinition
orders
-
-
-
-
Field Detail
-
_label
I18nizableText _label
-
_searchFieldStr
String _searchFieldStr
-
_searchField
SearchField _searchField
-
-
Constructor Detail
-
DefaultSortDefinition
public DefaultSortDefinition(String id, I18nizableText label, SearchField searchField)
Default constructor with aSearchField
- Parameters:
id
- The idlabel
- The labelsearchField
- The search field
-
DefaultSortDefinition
public DefaultSortDefinition(String id, I18nizableText label, String searchFieldString)
Default constructor with aString
- Parameters:
id
- The idlabel
- The labelsearchFieldString
- The search field as a string
-
DefaultSortDefinition
private DefaultSortDefinition(String id, I18nizableText label)
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:SortDefinition
Gets the id of the sort. It must be unique across all sort definitions- Specified by:
getId
in interfaceSortDefinition
- Returns:
- the unique id of the sort
-
getLabel
public I18nizableText getLabel()
Description copied from interface:SortDefinition
Gets the label of the sort.- Specified by:
getLabel
in interfaceSortDefinition
- Returns:
- the label of the sort.
-
getField
public String getField()
Description copied from interface:SortDefinition
Gets the sort field- Specified by:
getField
in interfaceSortDefinition
- Returns:
- the sort field
-
-