public class SortCriteria.SortCriterion extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
_ascending
True if the sort is made in ascending order, false otherwise.
|
protected String |
_jcrProperty
The JCR property.
|
protected String |
_metadataPath
The metadata path.
|
protected boolean |
_normalize
True to sort on normalized versions of the properties, false otherwise.
|
Constructor and Description |
---|
SortCriterion(String metadataPath,
String jcrProperty,
boolean ascending,
boolean normalize)
Build a sort criterion.
|
Modifier and Type | Method and Description |
---|---|
String |
build()
Build an XPath order string representing the criterion.
|
String |
getJcrProperty()
Get the jcrProperty.
|
String |
getMetadataPath()
Get the metadataPath.
|
boolean |
isAscending()
Test if the results are to be sorted in ascending order.
|
boolean |
isNormalizedSort()
Test if the results are to be sorted in normalized form.
|
void |
setAscending(boolean ascending)
Set the criterion to sort in ascending order.
|
void |
setJcrProperty(String jcrProperty)
Set the jcrProperty.
|
void |
setMetadataPath(String metadataPath)
Set the metadataPath.
|
void |
setNormalize(boolean normalize)
Set the criterion to sort in normalized form.
|
protected String _metadataPath
protected String _jcrProperty
protected boolean _ascending
protected boolean _normalize
public SortCriterion(String metadataPath, String jcrProperty, boolean ascending, boolean normalize)
metadataPath
- the metadata path (can be null if a JCR property is provided).jcrProperty
- the JCR property (can be null if a metadata path is provided).ascending
- true to sort in ascending order, false otherwise.normalize
- true to sort on normalized properties, false otherwise.public String getMetadataPath()
public void setMetadataPath(String metadataPath)
metadataPath
- the metadataPath to setpublic String getJcrProperty()
public void setJcrProperty(String jcrProperty)
jcrProperty
- the jcrProperty to setpublic boolean isAscending()
public void setAscending(boolean ascending)
ascending
- true to sort in ascending order, false otherwise.public boolean isNormalizedSort()
public void setNormalize(boolean normalize)
normalize
- true to sort in normalized form, false otherwise.