Class BooleanTerm

    • Method Detail

      • not

        public static BooleanExpression not​(boolean value)
        Unary NOT of boolean value.
        Parameters:
        value - value to invert
        Returns:
        inverted value
      • not

        public static BooleanExpression not​(BooleanExpression expression)
        Unary NOT of boolean expression.
        Parameters:
        expression - expression that should be inverted
        Returns:
        inverted epression
      • and

        public static BooleanExpression and​(boolean... values)
        Logical AND combination of boolean values.
        Parameters:
        values - values to combine
        Returns:
        logical AND combination
      • and

        public static BooleanExpression and​(BooleanExpression expression,
                                            boolean value)
        Logical AND combination of boolean expression and value.
        Parameters:
        expression - boolean expression
        value - boolean value
        Returns:
        logical AND combination
      • and

        public static BooleanExpression and​(boolean value,
                                            BooleanExpression expression)
        Logical AND combination of boolean value and expression.
        Parameters:
        value - boolean value
        expression - boolean expression
        Returns:
        logical AND combination
      • and

        public static BooleanExpression and​(BooleanExpression... expressions)
        Logical AND combination of boolean expressions.
        Parameters:
        expressions - boolean expressions
        Returns:
        logical AND combination
      • or

        public static BooleanExpression or​(boolean... values)
        Logical OR combination of boolean values.
        Parameters:
        values - boolean values
        Returns:
        logical OR combination
      • or

        public static BooleanExpression or​(BooleanExpression expression,
                                           boolean value)
        Logical OR combination of boolean expression and value.
        Parameters:
        expression - boolean expression
        value - boolean values
        Returns:
        logical OR combination
      • or

        public static BooleanExpression or​(boolean value,
                                           BooleanExpression expression)
        Logical OR combination of boolean value and expression.
        Parameters:
        value - boolean values
        expression - boolean expression
        Returns:
        logical OR combination
      • or

        public static BooleanExpression or​(BooleanExpression... expressions)
        Logical OR combination of boolean expressions.
        Parameters:
        expressions - boolean values
        Returns:
        logical OR combination
      • like

        public static BooleanExpression like​(ValueExpression left,
                                             ValueExpression right,
                                             char escape)
        Comparison with LIKE operator.
        Parameters:
        left - left operand
        right - right operand
        escape - escape character
        Returns:
        LIKE comparison
      • notLike

        public static BooleanExpression notLike​(ValueExpression left,
                                                ValueExpression right,
                                                char escape)
        Comparison with inverted LIKE operator.
        Parameters:
        left - left operand
        right - right operand
        escape - escape character
        Returns:
        inverted LIKE comparison
      • compare

        public static BooleanExpression compare​(ValueExpression left,
                                                String operatorSymbol,
                                                ValueExpression right)
        General comparison with operator as string.
        Parameters:
        left - left operand
        operatorSymbol - operator
        right - right operand
        Returns:
        comparison
      • isNull

        public static BooleanExpression isNull​(ValueExpression operand)
        Check for null.
        Parameters:
        operand - operand to be checked for null value
        Returns:
        null check
      • isNotNull

        public static BooleanExpression isNotNull​(ValueExpression operand)
        Check for not null.
        Parameters:
        operand - operand to be checked for not null
        Returns:
        not-null check
      • in

        public static BooleanExpression in​(ValueExpression toFind,
                                           ValueExpression... inList)
        Check for value in list.
        Parameters:
        toFind - operand to find in list
        inList - list to search the first operand in
        Returns:
        in-list search
      • notIn

        public static BooleanExpression notIn​(ValueExpression toFind,
                                              ValueExpression... inList)
        Check if value not in list.
        Parameters:
        toFind - operand to find in list
        inList - list to search the first operand in
        Returns:
        not-in-list search
      • in

        public static BooleanExpression in​(ValueExpression operand,
                                           Select select)
        Check for value sub-select.
        Parameters:
        operand - operand to find in list
        select - sub-select to search the operand in
        Returns:
        in-sub-select search
      • notIn

        public static BooleanExpression notIn​(ValueExpression operand,
                                              Select select)
        Check if value not in sub-select.
        Parameters:
        operand - operand to find in list
        select - sub-select to search the operand in
        Returns:
        not-in-sub-select search
      • exists

        public static BooleanExpression exists​(Select select)
        Check if the sub-select has any result.
        Parameters:
        select - sub-select
        Returns:
        exists-check
      • operation

        public static BooleanExpression operation​(String operator,
                                                  BooleanExpression... expressions)
        Create a logical operation from an operator name and a list of operands
        Parameters:
        operator - name of the operator
        expressions - operands
        Returns:
        instance of either And, Or or Not
        Throws:
        IllegalArgumentException - if the operator is unknown or null