public class CommonSystemPropertyBasedSortDefinition extends Object implements SortDefinition
SortDefinition
(for all Returnable
s) on
fields such as last validation date, first validation date, last modification date, last major validation date, etc.
SystemProperty
.
SystemProperty
mechanism, the sort field is already indexed for Content
s.
Page
for PageReturnable
, Resource
for ResourceReturnable
, etc.),
the corresponding sort fields must be manually indexed.Modifier and Type | Field and Description |
---|---|
protected static String |
__PREFIX_ID
The prefix id of the sort definition
|
private I18nizableText |
_label |
private Sort.Order[] |
_orders |
private SystemProperty |
_systemProperty |
Constructor and Description |
---|
CommonSystemPropertyBasedSortDefinition(SystemProperty systemProperty,
I18nizableText label,
Sort.Order[] orders)
Default constructor
|
CommonSystemPropertyBasedSortDefinition(SystemProperty systemProperty,
Sort.Order[] orders)
Default constructor with the label of the given
SystemProperty |
Modifier and Type | Method and Description |
---|---|
String |
getField()
Gets the sort field
|
String |
getId()
Gets the id of the sort.
|
I18nizableText |
getLabel()
Gets the label of the sort.
|
Sort.Order[] |
orders()
Gets the orders this sort supports.
|
protected static final String __PREFIX_ID
private SystemProperty _systemProperty
private I18nizableText _label
private Sort.Order[] _orders
public CommonSystemPropertyBasedSortDefinition(SystemProperty systemProperty, Sort.Order[] orders)
SystemProperty
systemProperty
- The SystemProperty
this SortDefinition
is based on.orders
- The orders allowed for this SortDefinition
public CommonSystemPropertyBasedSortDefinition(SystemProperty systemProperty, I18nizableText label, Sort.Order[] orders)
systemProperty
- The SystemProperty
this SortDefinition
is based on.label
- The labelorders
- The orders allowed for this SortDefinition
public String getId()
SortDefinition
getId
in interface SortDefinition
public I18nizableText getLabel()
SortDefinition
getLabel
in interface SortDefinition
public Sort.Order[] orders()
SortDefinition
Sort.Order.ASC
and Sort.Order.DESC
.
orders
in interface SortDefinition
public String getField()
SortDefinition
getField
in interface SortDefinition