Class CompareCriteria

    • Constructor Detail

      • CompareCriteria

        public CompareCriteria()
        Constructs a default instance of this class.
      • CompareCriteria

        public CompareCriteria​(Expression leftExpression,
                               int operator,
                               Expression rightExpression)
        Constructs an instance of this class for a specific "operand operator operand" clause.
        Parameters:
        leftExpression - The variable being compared
        rightExpression - The value the variable is being compared to (literal or variable)
        operator - The operator representing how the variable and value are to be compared
    • Method Detail

      • set

        public void set​(Expression leftExpression,
                        int operator,
                        Expression rightExpression)
        Sets the operands and operator. The clause is of the form: <variable> <operator> <value>.
        Parameters:
        leftExpression - The left expression
        operator - The operator representing how the expressions are compared
        rightExpression - The right expression
      • setOptional

        public void setOptional​(Boolean isOptional)
        Set during planning to indicate that this criteria is no longer needed to correctly process a join
        Parameters:
        isOptional -
      • isOptional

        public boolean isOptional()
        Returns true if the compare criteria is used as join criteria, but not needed during processing.
        Returns:
      • getIsOptional

        public Boolean getIsOptional()
      • acceptVisitor

        public void acceptVisitor​(LanguageVisitor visitor)
        Description copied from interface: LanguageObject
        Method for accepting a visitor. It is the responsibility of the language object to call back on the visitor.
        Specified by:
        acceptVisitor in interface LanguageObject
        Parameters:
        visitor - Visitor being used
      • hashCode

        public int hashCode()
        Get hash code. WARNING: The hash code is based on data in the criteria. If data values are changed, the hash code will change - don't hash this object and change values.
        Overrides:
        hashCode in class Object
        Returns:
        Hash code
      • equals

        public boolean equals​(Object obj)
        Override equals() method.
        Overrides:
        equals in class Object
        Parameters:
        obj - Other object
        Returns:
        true if objects are equivalent
      • getReverseOperator

        public int getReverseOperator()