Class Compare

  • All Implemented Interfaces:
    QueryObject

    public final class Compare
    extends Condition
    Compare 2 conditions with an operator.
    Version:
    $Revision$ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
    Author:
    Ahmad Hassan, Ralf Joachim
    • Constructor Detail

      • Compare

        public Compare​(Expression left,
                       CompareOperator operator,
                       Expression right)
        Constructor a compare condition that compares given left and rigth hand operand with given comparison operator.
        Parameters:
        left - Left operand of the comparison.
        operator - Operator of comparison.
        right - Right operand of the comparison.
    • Method Detail

      • leftExpression

        public Expression leftExpression()
        Returns left operand of the comparison.
        Returns:
        Left operand of the comparison.
      • operator

        public CompareOperator operator()
        Returns operator of comparison.
        Returns:
        Operator of comparison.
      • rightExpression

        public Expression rightExpression()
        Returns right operand of the comparison.
        Returns:
        right operand of the comparison.
      • not

        public Condition not()
        Description copied from class: Condition
        Builder method to invert a condition. A condition that evaluated to TRUE before calling this method will evaluate to FALSE thereafter.
        Specified by:
        not in class Condition
        Returns:
        Negated condition.
      • accept

        public void accept​(Visitor visitor)
        Accept method to handle incoming visitors.
        Parameters:
        visitor - Visitor to be handled.
      • toString

        public java.lang.String toString()
        Method constructing query string.
        Overrides:
        toString in class java.lang.Object
        Returns:
        Constructed query string.