Class SortCriteria.SortCriterion
- java.lang.Object
-
- org.ametys.plugins.repository.query.SortCriteria.SortCriterion
-
- Enclosing class:
- SortCriteria
public class SortCriteria.SortCriterion extends Object
A sort criterion.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean_ascendingTrue if the sort is made in ascending order, false otherwise.protected String_jcrPropertyThe JCR property.protected String_metadataPathThe metadata path.protected boolean_normalizeTrue to sort on normalized versions of the properties, false otherwise.
-
Constructor Summary
Constructors Constructor Description SortCriterion(String metadataPath, String jcrProperty, boolean ascending, boolean normalize)Build a sort criterion.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringbuild()Build an XPath order string representing the criterion.StringgetJcrProperty()Get the jcrProperty.StringgetMetadataPath()Get the metadataPath.booleanisAscending()Test if the results are to be sorted in ascending order.booleanisNormalizedSort()Test if the results are to be sorted in normalized form.voidsetAscending(boolean ascending)Set the criterion to sort in ascending order.voidsetJcrProperty(String jcrProperty)Set the jcrProperty.voidsetMetadataPath(String metadataPath)Set the metadataPath.voidsetNormalize(boolean normalize)Set the criterion to sort in normalized form.
-
-
-
Field Detail
-
_metadataPath
protected String _metadataPath
The metadata path.
-
_jcrProperty
protected String _jcrProperty
The JCR property.
-
_ascending
protected boolean _ascending
True if the sort is made in ascending order, false otherwise.
-
_normalize
protected boolean _normalize
True to sort on normalized versions of the properties, false otherwise.
-
-
Constructor Detail
-
SortCriterion
public SortCriterion(String metadataPath, String jcrProperty, boolean ascending, boolean normalize)
Build a sort criterion.- Parameters:
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.
-
-
Method Detail
-
getMetadataPath
public String getMetadataPath()
Get the metadataPath.- Returns:
- the metadataPath
-
setMetadataPath
public void setMetadataPath(String metadataPath)
Set the metadataPath.- Parameters:
metadataPath- the metadataPath to set
-
getJcrProperty
public String getJcrProperty()
Get the jcrProperty.- Returns:
- the jcrProperty
-
setJcrProperty
public void setJcrProperty(String jcrProperty)
Set the jcrProperty.- Parameters:
jcrProperty- the jcrProperty to set
-
isAscending
public boolean isAscending()
Test if the results are to be sorted in ascending order.- Returns:
- true to sort in ascending order, false otherwise.
-
setAscending
public void setAscending(boolean ascending)
Set the criterion to sort in ascending order.- Parameters:
ascending- true to sort in ascending order, false otherwise.
-
isNormalizedSort
public boolean isNormalizedSort()
Test if the results are to be sorted in normalized form.- Returns:
- true to sort in normalized form, false otherwise.
-
setNormalize
public void setNormalize(boolean normalize)
Set the criterion to sort in normalized form.- Parameters:
normalize- true to sort in normalized form, false otherwise.
-
-