org.dftproject.genesis.core.data.nodes
Class CompareExpression

java.lang.Object
  extended by org.dftproject.genesis.core.data.nodes.CompareExpression
All Implemented Interfaces:
IExpression

public class CompareExpression
extends java.lang.Object
implements IExpression

An expression which matches objects according to a comparison.


Field Summary
static java.lang.String EQ
          Match all objects equal to the given value.
static java.lang.String GE
          Match all objects greater than or equal to the given value.
static java.lang.String GT
          Match all objects strictly greater than the given value.
static java.lang.String LE
          Match all objects less than or equal to the given value.
static java.lang.String LT
          Match all objects strictly less than the given value.
static java.lang.String NE
          Match all objects not equal to the given value.
 java.lang.String op
          The comparison operator.
 java.lang.String value
          The value to compare against.
 
Constructor Summary
CompareExpression(java.lang.String op, java.lang.String value)
          Creates an expression that matches all objects compared to the given value with the given operator.
 
Method Summary
 java.lang.String getSQL(DataConnection conn, java.lang.String table)
          Returns the SQL fragment this expression represents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GE

public static final java.lang.String GE
Match all objects greater than or equal to the given value.

See Also:
Constant Field Values

GT

public static final java.lang.String GT
Match all objects strictly greater than the given value.

See Also:
Constant Field Values

LE

public static final java.lang.String LE
Match all objects less than or equal to the given value.

See Also:
Constant Field Values

LT

public static final java.lang.String LT
Match all objects strictly less than the given value.

See Also:
Constant Field Values

EQ

public static final java.lang.String EQ
Match all objects equal to the given value.

See Also:
Constant Field Values

NE

public static final java.lang.String NE
Match all objects not equal to the given value.

See Also:
Constant Field Values

op

public java.lang.String op
The comparison operator.


value

public java.lang.String value
The value to compare against.

Constructor Detail

CompareExpression

public CompareExpression(java.lang.String op,
                         java.lang.String value)
Creates an expression that matches all objects compared to the given value with the given operator.

Parameters:
op - the comparison operator
value - the value
Method Detail

getSQL

public java.lang.String getSQL(DataConnection conn,
                               java.lang.String table)
Description copied from interface: IExpression
Returns the SQL fragment this expression represents.

Specified by:
getSQL in interface IExpression
Parameters:
conn - a data connection
table - alias of the table this expression uses
Returns:
SQL fragment