Class SortCriteria.SortCriterion
java.lang.Object
org.ametys.plugins.repository.query.SortCriteria.SortCriterion
- Enclosing class:
- SortCriteria
A sort criterion.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSortCriterion
(String metadataPath, String jcrProperty, boolean ascending, boolean normalize) Build a sort criterion. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build an XPath order string representing the criterion.Get the jcrProperty.Get the metadataPath.boolean
Test if the results are to be sorted in ascending order.boolean
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.
-
Field Details
-
_metadataPath
The metadata path. -
_jcrProperty
The JCR property. -
_ascending
True if the sort is made in ascending order, false otherwise. -
_normalize
True to sort on normalized versions of the properties, false otherwise.
-
-
Constructor Details
-
SortCriterion
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 Details
-
getMetadataPath
Get the metadataPath.- Returns:
- the metadataPath
-
setMetadataPath
Set the metadataPath.- Parameters:
metadataPath
- the metadataPath to set
-
getJcrProperty
Get the jcrProperty.- Returns:
- the jcrProperty
-
setJcrProperty
Set the jcrProperty.- Parameters:
jcrProperty
- the jcrProperty to set
-
isAscending
Test if the results are to be sorted in ascending order.- Returns:
- true to sort in ascending order, false otherwise.
-
setAscending
Set the criterion to sort in ascending order.- Parameters:
ascending
- true to sort in ascending order, false otherwise.
-
isNormalizedSort
Test if the results are to be sorted in normalized form.- Returns:
- true to sort in normalized form, false otherwise.
-
setNormalize
Set the criterion to sort in normalized form.- Parameters:
normalize
- true to sort in normalized form, false otherwise.
-
build
Build an XPath order string representing the criterion.- Returns:
- an XPath order string.
-