org.teiid.query.sql.lang
Class AbstractCompareCriteria

java.lang.Object
  extended by org.teiid.query.sql.lang.Criteria
      extended by org.teiid.query.sql.lang.PredicateCriteria
          extended by org.teiid.query.sql.lang.AbstractCompareCriteria
All Implemented Interfaces:
java.lang.Cloneable, LanguageObject, Expression
Direct Known Subclasses:
CompareCriteria, SubqueryCompareCriteria

public abstract class AbstractCompareCriteria
extends PredicateCriteria

The common functionality of a CompareCriteria and a SubqueryCompareCriteria. 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
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
AbstractCompareCriteria()
           
 
Method Summary
 Expression getLeftExpression()
          Get left expression.
 int getOperator()
          Returns the operator.
static int getOperator(java.lang.String op)
          Gets the operator constant given the string version
 java.lang.String getOperatorAsString()
          Returns the operator as a string.
abstract  Expression getRightExpression()
           
 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
combineCriteria, combineCriteria, combineCriteria, getType, isResolved, separateCriteriaByAnd, toConjunctiveNormalForm, toDisjunctiveNormalForm, 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
Constructor Detail

AbstractCompareCriteria

public AbstractCompareCriteria()
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(java.lang.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

getRightExpression

public abstract Expression getRightExpression()

getOperatorAsString

public java.lang.String getOperatorAsString()
Returns the operator as a string.

Returns:
String version of operator


Copyright © 2010. All Rights Reserved.