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.NegatableLanguageObject.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() |
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, setOperatorapplyDemorgan, combineCriteria, combineCriteria, combineCriteria, getType, separateCriteriaByAnd, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitgetLeftExpression, setLeftExpressionpublic CompareCriteria()
public CompareCriteria(Expression leftExpression, int operator, Expression rightExpression)
identifier - The variable being comparedvalue - 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 BinaryComparisonexpression - Right expressionpublic Expression getRightExpression()
getRightExpression in interface BinaryComparisonpublic 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)
LanguageObjectacceptVisitor in interface LanguageObjectvisitor - Visitor being usedpublic int hashCode()
public boolean equals(Object obj)
public Object clone()
clone in interface LanguageObjectclone in class PredicateCriteriaCopyright © 2018 JBoss by Red Hat. All rights reserved.