Class SortCriteria.SortCriterion

    • Field Detail

      • _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

      • setMetadataPath

        public void setMetadataPath​(String metadataPath)
        Set the metadataPath.
        Parameters:
        metadataPath - the metadataPath to set
      • 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.
      • build

        public String build()
        Build an XPath order string representing the criterion.
        Returns:
        an XPath order string.