Class IndexQueryUtils


  • public final class IndexQueryUtils
    extends Object
    Author:
    Fernando MiƱo - Geosolutions
    • Method Detail

      • getAttributesOnSort

        public static List<String> getAttributesOnSort​(Query query)
        Extracts List of Sort attributes names from Query
        Returns:
        List of Sort attributes names
      • getAttributesOnFilter

        public static List<String> getAttributesOnFilter​(Filter filter)
        Extracts List of attributes names from Filter
        Returns:
        List of attributes names
      • isExpressionEmpty

        public static boolean isExpressionEmpty​(Expression expression)
        Checks if Expression is empty or Null
      • equalsProperty

        public static boolean equalsProperty​(AttributeMapping mapping,
                                             String propertyName)
        Checks if property name is equals to source/identifier expression in attribute mapping
      • equalsPropertyExpression

        public static boolean equalsPropertyExpression​(Expression expression,
                                                       String propertyName)
        Compare if expression == propertyName
      • checkAllPropertiesIndexed

        public static boolean checkAllPropertiesIndexed​(List<String> properties,
                                                        FeatureTypeMapping mapping)
        Checks if all properties are indexed in mapping
      • buildIdInExpressionOr

        public static Filter buildIdInExpressionOr​(List<String> ids,
                                                   FeatureTypeMapping mapping)
        Builds an OR operator comparing Identifier with ids list
        Returns:
        Or Filter
      • buildIdInExpressionFunction

        public static Filter buildIdInExpressionFunction​(List<String> ids,
                                                         FeatureTypeMapping mapping)
        Builds a mapping->identifier IN (ids...) like function/clause
        Returns:
        Filter IN function
      • buildIdInExpression

        public static Filter buildIdInExpression​(List<String> ids,
                                                 FeatureTypeMapping mapping)
        Builds a mapping->identifier IN (ids...) like function/clause
        Returns:
        Filter IN function