com.ibm.etill.framework.xdm
Class QueryRequest.QueryCondition

java.lang.Object
  |
  +--com.ibm.etill.framework.xdm.QueryRequest.QueryCondition
Enclosing class:
QueryRequest

protected class QueryRequest.QueryCondition
extends Object

An inner class used to build a query condition. This class should be instantiated when a where condition is about to be built. After class instantiation, use the object to call the instance method addTerm to build the where condtion.


Constructor Summary
protected QueryRequest.QueryCondition()
           
 
Method Summary
 void addTerm(String key, Object value)
          Builds the where condition for use in SQL query command.
protected  void addTerm(String key, Object[] values)
          Builds the where condition for use in SQL query command.
 void addTerm(String key, Object value, String operator)
          Builds the where condition for use in SQL query command.
 String getCondition()
          Returns the condition variable to be used in a query call.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryRequest.QueryCondition

protected QueryRequest.QueryCondition()
Method Detail

getCondition

public String getCondition()
Returns the condition variable to be used in a query call.
Returns:
condition a string representing the where condition of a SQL query

addTerm

public void addTerm(String key,
                    Object value,
                    String operator)
Builds the where condition for use in SQL query command.
Parameters:
key - a string representing the name of the parameter
value - an Object representing the value of key above
operator - a valid SQL operator for use in the where condition

addTerm

public void addTerm(String key,
                    Object value)
Builds the where condition for use in SQL query command. Since no operator is speficied, the default operator of equals(=) is used.
Parameters:
key - a string representing the name of the parameter
value - an Object representing the value of key above

addTerm

protected void addTerm(String key,
                       Object[] values)
Builds the where condition for use in SQL query command.
Parameters:
key - a string representing the name of the parameter
values - an array of Object values