|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.metamatrix.query.sql.lang.Criteria com.metamatrix.query.sql.lang.PredicateCriteria com.metamatrix.query.sql.lang.AbstractCompareCriteria com.metamatrix.query.sql.lang.CompareCriteria
public class CompareCriteria
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:
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.metamatrix.query.sql.lang.PredicateCriteria |
---|
PredicateCriteria.Negatable |
Field Summary |
---|
Fields inherited from class com.metamatrix.query.sql.lang.AbstractCompareCriteria |
---|
EQ, GE, GT, LE, LT, NE |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
void |
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor. |
java.lang.Object |
clone()
Deep copy of object |
boolean |
equals(java.lang.Object obj)
Override equals() method. |
static int |
getInverseOperator(int op)
|
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 |
negate()
|
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. |
Methods inherited from class com.metamatrix.query.sql.lang.AbstractCompareCriteria |
---|
getLeftExpression, getOperator, getOperator, getOperatorAsString, setLeftExpression, setOperator |
Methods inherited from class com.metamatrix.query.sql.lang.Criteria |
---|
combineCriteria, combineCriteria, combineCriteria, separateCriteriaByAnd, toConjunctiveNormalForm, toDisjunctiveNormalForm, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public 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 comparedMethod Detail |
---|
public void setRightExpression(Expression expression)
expression
- Right expressionpublic Expression getRightExpression()
getRightExpression
in class AbstractCompareCriteria
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 void acceptVisitor(LanguageVisitor visitor)
LanguageObject
acceptVisitor
in interface LanguageObject
visitor
- Visitor being usedpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Other object
public java.lang.Object clone()
clone
in interface LanguageObject
clone
in class PredicateCriteria
public void negate()
negate
in interface PredicateCriteria.Negatable
public static int getInverseOperator(int op)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |