public class CompareCriteria extends AbstractCompareCriteria implements BinaryComparison
A criteria which represents a simple operator relationship between two expressions. There are 6 operator types. Each side of the comparison may be an expression, which could be an element, a constant, or a function.
Some examples are:
PredicateCriteria.Negatable
LanguageObject.Util
Constructor and Description |
---|
CompareCriteria()
Constructs a default instance of this class.
|
CompareCriteria(Expression leftExpression,
int operator,
Expression rightExpression)
Constructs an instance of this class for a specific "operand operator
operand" clause.
|
Modifier and Type | Method and Description |
---|---|
void |
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor.
|
Object |
clone()
Deep copy of object
|
boolean |
equals(Object obj)
Override equals() method.
|
Boolean |
getIsOptional() |
int |
getReverseOperator() |
Expression |
getRightExpression()
Get right expression.
|
int |
hashCode()
Get hash code.
|
boolean |
isOptional()
Returns true if the compare criteria is used as join criteria, but not needed
during processing.
|
void |
set(Expression leftExpression,
int operator,
Expression rightExpression)
Sets the operands and operator.
|
void |
setOptional(Boolean isOptional)
Set during planning to indicate that this criteria is no longer needed
to correctly process a join
|
void |
setRightExpression(Expression expression)
Set right expression.
|
getInverseOperator, getLeftExpression, getOperator, getOperator, getOperatorAsString, negate, setLeftExpression, setOperator
applyDemorgan, combineCriteria, combineCriteria, combineCriteria, getType, separateCriteriaByAnd, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
getLeftExpression, setLeftExpression
public CompareCriteria()
public CompareCriteria(Expression leftExpression, int operator, Expression rightExpression)
leftExpression
- The variable being comparedrightExpression
- The value the variable is being compared to (literal or variable)operator
- The operator representing how the variable and value are to
be comparedpublic void setRightExpression(Expression expression)
setRightExpression
in interface BinaryComparison
expression
- Right expressionpublic Expression getRightExpression()
getRightExpression
in interface BinaryComparison
public void set(Expression leftExpression, int operator, Expression rightExpression)
leftExpression
- The left expressionoperator
- The operator representing how the expressions are comparedrightExpression
- The right expressionpublic void setOptional(Boolean isOptional)
isOptional
- public boolean isOptional()
public Boolean getIsOptional()
public void acceptVisitor(LanguageVisitor visitor)
LanguageObject
acceptVisitor
in interface LanguageObject
visitor
- Visitor being usedpublic int hashCode()
public boolean equals(Object obj)
public Object clone()
clone
in interface LanguageObject
clone
in class PredicateCriteria
public int getReverseOperator()
Copyright © 2019. All rights reserved.