public class SortCriteria extends Object
Modifier and Type | Class and Description |
---|---|
class |
SortCriteria.SortCriterion
A sort criterion.
|
Modifier and Type | Field and Description |
---|---|
private List<SortCriteria.SortCriterion> |
_criteria |
Constructor and Description |
---|
SortCriteria() |
Modifier and Type | Method and Description |
---|---|
void |
addCriterion(String metadataPath,
boolean ascending,
boolean normalize)
Add a sort criteria to the criteria list, using a metadata name.
|
void |
addJCRPropertyCriterion(String jcrProperty,
boolean ascending,
boolean normalize)
Add a sort criteria to the criteria list, using a JCR property name.
|
String |
build()
Build the criteria.
|
List<SortCriteria.SortCriterion> |
getCriteria()
Get the criteria.
|
private List<SortCriteria.SortCriterion> _criteria
public SortCriteria()
public void addCriterion(String metadataPath, boolean ascending, boolean normalize)
metadataPath
- The name of the metadata to sort, or the path to the metadata if compositeascending
- The order for sorting resultsnormalize
- true
to normalize string properties (remove accents and lower case)public void addJCRPropertyCriterion(String jcrProperty, boolean ascending, boolean normalize)
jcrProperty
- The name of the JCR property to sortascending
- The order for sorting resultsnormalize
- true
to normalize string properties (remove accents and lower case)public List<SortCriteria.SortCriterion> getCriteria()