|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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:
| 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. |
Expression |
getRightExpression()
Get right expression. |
int |
hashCode()
Get hash code. |
void |
set(Expression leftExpression,
int operator,
Expression rightExpression)
Sets the operands and operator. |
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 compared| Method 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 acceptVisitor(LanguageVisitor visitor)
LanguageObject
visitor - Visitor being usedpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - Other object
public java.lang.Object clone()
clone in interface LanguageObjectclone in class PredicateCriteria
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||