Class SQLFilter


  • public class SQLFilter
    extends Object
    • Field Detail

      • andOperator

        public static final SQLOperator andOperator
      • orOperator

        public static final SQLOperator orOperator
      • andregex

        public static final String andregex
      • orregex

        public static final String orregex
    • Constructor Detail

      • SQLFilter

        public SQLFilter()
        Instantiates a new SQL filter.
    • Method Detail

      • addExpression

        public void addExpression​(SQLExpression expression)
        Adds the expression.
        Parameters:
        expression - the expression
      • getExpressions

        public Iterator<SQLExpression> getExpressions()
        Gets the expressions.
        Returns:
        the expressions
      • getExpressionsCount

        public int getExpressionsCount()
        Gets the expressions count.
        Returns:
        the expressions count
      • fullToString

        public String fullToString()
        Full to string.
        Returns:
        the string
      • toStringTranslateSource

        public String toStringTranslateSource​(HashMap<String,​String> map,
                                              boolean ignoreMisTranslations)
        To string translate source.
        Parameters:
        map - the map
        ignoreMisTranslations - the ignore mis translations
        Returns:
        the string
      • getExpressionColumnNames

        public String[] getExpressionColumnNames()
        Gets the expression column names.
        Returns:
        the expression column names
      • getExpressionFromColumnName

        public String getExpressionFromColumnName​(String colname)
        Gets the expression from column name.
        Parameters:
        colname - the colname
        Returns:
        the expression from column name
      • containsKey

        public boolean containsKey​(String colname)
        Contains key.
        Parameters:
        colname - the colname
        Returns:
        true, if successful
      • getUniqueExpressionColumnNames

        public Object[] getUniqueExpressionColumnNames()
        Gets the unique expression column names.
        Returns:
        the unique expression column names
      • isOrOperatorUsed

        public boolean isOrOperatorUsed()
        Checks if is or operator used.
        Returns:
        true, if is or operator used
      • parseWhereClause

        public void parseWhereClause​(String whereclause)
                              throws SQLException
        Parses the where clause.
        Parameters:
        whereclause - the whereclause
        Throws:
        SQLException - the SQL exception
      • containsEqualityCondition

        public boolean containsEqualityCondition​(HashMap<String,​String> map,
                                                 String first,
                                                 String second)
        Contains equality condition.
        Parameters:
        map - the map
        first - the first
        second - the second
        Returns:
        true, if successful