Package org.teiid.query.sql.lang
Class AbstractCompareCriteria
- java.lang.Object
-
- org.teiid.query.sql.lang.Criteria
-
- org.teiid.query.sql.lang.PredicateCriteria
-
- org.teiid.query.sql.lang.AbstractCompareCriteria
-
- All Implemented Interfaces:
Cloneable
,PredicateCriteria.Negatable
,LanguageObject
,Expression
- Direct Known Subclasses:
CompareCriteria
,SubqueryCompareCriteria
public abstract class AbstractCompareCriteria extends PredicateCriteria implements PredicateCriteria.Negatable
The common functionality of a
CompareCriteria
and aSubqueryCompareCriteria
. The comparison operators are defined here.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.teiid.query.sql.lang.PredicateCriteria
PredicateCriteria.Negatable
-
Nested classes/interfaces inherited from interface org.teiid.query.sql.LanguageObject
LanguageObject.Util
-
-
Field Summary
Fields Modifier and Type Field Description static int
EQ
Constant indicating the two operands are equal.static int
GE
Constant indicating the first operand is greater than or equal to the second.static int
GT
Constant indicating the first operand is greater than the second.static int
LE
Constant indicating the first operand is less than or equal to the second.static int
LT
Constant indicating the first operand is less than the second.static int
NE
Constant indicating the two operands are not equal.
-
Constructor Summary
Constructors Constructor Description AbstractCompareCriteria()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
getInverseOperator(int op)
Expression
getLeftExpression()
Get left expression.int
getOperator()
Returns the operator.static int
getOperator(String op)
Gets the operator constant given the string versionString
getOperatorAsString()
Returns the operator as a string.void
negate()
void
setLeftExpression(Expression expression)
Set left expression.void
setOperator(int operator)
Sets the operator.-
Methods inherited from class org.teiid.query.sql.lang.PredicateCriteria
clone
-
Methods inherited from class org.teiid.query.sql.lang.Criteria
applyDemorgan, combineCriteria, combineCriteria, combineCriteria, getType, separateCriteriaByAnd, toString
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.teiid.query.sql.LanguageObject
acceptVisitor
-
-
-
-
Field Detail
-
EQ
public static final int EQ
Constant indicating the two operands are equal.- See Also:
- Constant Field Values
-
NE
public static final int NE
Constant indicating the two operands are not equal.- See Also:
- Constant Field Values
-
LT
public static final int LT
Constant indicating the first operand is less than the second.- See Also:
- Constant Field Values
-
GT
public static final int GT
Constant indicating the first operand is greater than the second.- See Also:
- Constant Field Values
-
LE
public static final int LE
Constant indicating the first operand is less than or equal to the second.- See Also:
- Constant Field Values
-
GE
public static final int GE
Constant indicating the first operand is greater than or equal to the second.- See Also:
- Constant Field Values
-
-
Method Detail
-
getOperator
public int getOperator()
Returns the operator.- Returns:
- The operator
-
setOperator
public void setOperator(int operator)
Sets the operator.- Parameters:
operator
-
-
getOperator
public static int getOperator(String op)
Gets the operator constant given the string version- Parameters:
op
- Operator, string form- Returns:
- Operator, constant form
-
setLeftExpression
public void setLeftExpression(Expression expression)
Set left expression.- Parameters:
expression
- Left expression
-
getLeftExpression
public Expression getLeftExpression()
Get left expression.- Returns:
- Left expression
-
getOperatorAsString
public String getOperatorAsString()
Returns the operator as a string.- Returns:
- String version of operator
-
negate
public void negate()
- Specified by:
negate
in interfacePredicateCriteria.Negatable
-
getInverseOperator
public static int getInverseOperator(int op)
-
-