com.ibm.dse.tools.workbench.base
Class Condition

java.lang.Object
  |
  +--com.ibm.dse.tools.workbench.base.Condition

public class Condition
extends java.lang.Object

This class implements a condition for a where clause.


Field Summary
protected  java.lang.String comparison
          The comparison sign
static java.lang.String EQUALS
          The equal comparison sign
protected  int expression1
          The column identifier for the first expression
protected  java.lang.Object expression2
          The column identifier (Integer) or the String for the second expression
static java.lang.String GREATER
          The greater than comparison sign
static java.lang.String GREATER_OR_EQUAL
          The greater than or equal comparison sign
static java.lang.String IS_NOT_NULL
          The is not null comparison operand
static java.lang.String IS_NULL
          The is null comparison operand
protected  java.lang.String leftFunction
          The left function name
static java.lang.String LESSER
          The lesser than comparison sign
static java.lang.String LESSER_OR_EQUAL
          The lesser than or equal comparison sign
static java.lang.String LIKE
          The like comparison operand for strings
static java.lang.String NOT_EQUALS
          The distinct comparison sign
protected  java.lang.String rigthFunction
          The rigth function name
protected  Table table
          The table to wich apply the condition
 
Constructor Summary
Condition(Table table, int expression1, java.lang.String comparison, int expression2)
          This constructor creates a Condition object.
Condition(Table table, int expression1, java.lang.String comparison, java.lang.String expression2)
          This constructor creates a Condition object.
Condition(Table table, java.lang.String leftFunction, int expression1, java.lang.String comparison, java.lang.String rigthFunction, int expression2)
          This constructor creates a Condition object.
Condition(Table table, java.lang.String leftFunction, int expression1, java.lang.String comparison, java.lang.String rigthFunction, java.lang.String expression2)
          This constructor creates a Condition object.
 
Method Summary
 java.lang.String getConditionString()
          Returns the expression for this condition.
 java.lang.String getParameter()
          Returns the value of the parameter for this condition or null if there is no parameter (only column identifiers)
 java.lang.String toString()
          This method returns a String representation of the Condition object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

table

protected Table table
The table to wich apply the condition

expression1

protected int expression1
The column identifier for the first expression

expression2

protected java.lang.Object expression2
The column identifier (Integer) or the String for the second expression

comparison

protected java.lang.String comparison
The comparison sign

leftFunction

protected java.lang.String leftFunction
The left function name

rigthFunction

protected java.lang.String rigthFunction
The rigth function name

EQUALS

public static final java.lang.String EQUALS
The equal comparison sign

NOT_EQUALS

public static final java.lang.String NOT_EQUALS
The distinct comparison sign

GREATER

public static final java.lang.String GREATER
The greater than comparison sign

LESSER

public static final java.lang.String LESSER
The lesser than comparison sign

GREATER_OR_EQUAL

public static final java.lang.String GREATER_OR_EQUAL
The greater than or equal comparison sign

LESSER_OR_EQUAL

public static final java.lang.String LESSER_OR_EQUAL
The lesser than or equal comparison sign

LIKE

public static final java.lang.String LIKE
The like comparison operand for strings

IS_NULL

public static final java.lang.String IS_NULL
The is null comparison operand

IS_NOT_NULL

public static final java.lang.String IS_NOT_NULL
The is not null comparison operand
Constructor Detail

Condition

public Condition(Table table,
                 int expression1,
                 java.lang.String comparison,
                 int expression2)
This constructor creates a Condition object.
Parameters:
table - com.ibm.dse.tools.workbench.base.Table The table on wich to apply condition.
expression1 - int The column identifier for the first expression.
comparison - java.lang.String The comparison sign.
expression2 - int The column identifier for the second expression

Condition

public Condition(Table table,
                 int expression1,
                 java.lang.String comparison,
                 java.lang.String expression2)
This constructor creates a Condition object.
Parameters:
table - com.ibm.dse.tools.workbench.base.Table The table on wich to apply condition.
expression1 - int The column identifier for the first expression.
comparison - java.lang.String The comparison sign.
expression2 - java.lang.String The second expression if it is not a column

Condition

public Condition(Table table,
                 java.lang.String leftFunction,
                 int expression1,
                 java.lang.String comparison,
                 java.lang.String rigthFunction,
                 int expression2)
This constructor creates a Condition object.
Parameters:
table - com.ibm.dse.tools.workbench.base.Table The table on wich to apply condition.
leftFunction - java.lang.String The left function name.
expression1 - int The column identifier for the first expression.
comparison - java.lang.String The comparison sign.
rigthFunction - java.lang.String The rigth function name.
expression2 - int The column identifier for the second expression

Condition

public Condition(Table table,
                 java.lang.String leftFunction,
                 int expression1,
                 java.lang.String comparison,
                 java.lang.String rigthFunction,
                 java.lang.String expression2)
This constructor creates a Condition object.
Parameters:
table - com.ibm.dse.tools.workbench.base.Table The table on wich to apply condition.
leftFunction - java.lang.String The left function name.
expression1 - int The column identifier for the first expression.
comparison - java.lang.String The comparison sign.
rigthFunction - java.lang.String The rigth function name.
expression2 - java.lang.String The second expression if it is not a column
Method Detail

getConditionString

public java.lang.String getConditionString()
Returns the expression for this condition.
Returns:
java.lang.String

getParameter

public java.lang.String getParameter()
Returns the value of the parameter for this condition or null if there is no parameter (only column identifiers)
Returns:
java.lang.String

toString

public java.lang.String toString()
This method returns a String representation of the Condition object
Overrides:
toString in class java.lang.Object
Returns:
java.lang.String