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

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

public class DefaultClause
extends java.lang.Object
implements Clause

This class implements a where clause.

Only a set of and-ed conditions is supported


Field Summary
protected  java.util.Vector conditions
          The list of conditions in the clause
protected  Table table
          The table to wich apply the conditions
 
Constructor Summary
DefaultClause(Table table)
          This constructor creates a DefaultClause object.
 
Method Summary
 void addCondition(Condition cond)
          Adds a condition to the list of conditions.
 java.lang.String getClauseString()
          Returns the String with the complete where clause.
 java.lang.String[] getParameters()
          Returns the list of parameters to be passed to the query
 java.lang.String toString()
          Returns the String with the complete where clause.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

conditions

protected java.util.Vector conditions
The list of conditions in the clause

table

protected Table table
The table to wich apply the conditions
Constructor Detail

DefaultClause

public DefaultClause(Table table)
This constructor creates a DefaultClause object.
Parameters:
table - com.ibm.dse.tools.workbench.base.Table The table to wich apply the where clause.
Method Detail

addCondition

public void addCondition(Condition cond)
Adds a condition to the list of conditions.
Specified by:
addCondition in interface Clause
Parameters:
cond - com.ibm.dse.tools.workbench.base.Condition The condition to be added.

getClauseString

public java.lang.String getClauseString()
Returns the String with the complete where clause.
Specified by:
getClauseString in interface Clause
Returns:
java.lang.String - The complete where clause.

getParameters

public java.lang.String[] getParameters()
Returns the list of parameters to be passed to the query
Specified by:
getParameters in interface Clause
Returns:
java.lang.String[]

toString

public java.lang.String toString()
Returns the String with the complete where clause.
Overrides:
toString in class java.lang.Object
Returns:
java.lang.String - The complete where clause.