javatools.db
Class DbValueList

java.lang.Object
  |
  +--javatools.db.DbExpr
        |
        +--javatools.db.DbValueList
All Implemented Interfaces:
DbTableUser

public class DbValueList
extends DbExpr

This class represents a set of values to be used in an expression.


Constructor Summary
DbValueList(DbDatabase db, java.util.Collection pValueList)
          Creates new DbValueList
 
Method Summary
 java.lang.String getQueryString()
          Any DbExpr needs to be able to convert into the SQL string equivilent.
 int setSqlValues(java.sql.PreparedStatement ps, int i)
          Any DbExpr needs to be able to substitute any parameters as per JDBC "?"
 
Methods inherited from class javatools.db.DbExpr
and, containsAllStrings, containsAllStrings, count, dateTrunc, equal, greaterThan, greaterThanOrEqual, in, in, isNotNull, isNull, lessThan, lessThanOrEqual, like, lower, max, min, notEqual, notIn, notIn, or, upper, usesTables, usesTables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbValueList

public DbValueList(DbDatabase db,
                   java.util.Collection pValueList)
Creates new DbValueList

Parameters:
db - The database to use.
pValueList - The collection to be used as a value list.
Method Detail

getQueryString

public java.lang.String getQueryString()
                                throws DbException
Any DbExpr needs to be able to convert into the SQL string equivilent.

Specified by:
getQueryString in class DbExpr
Returns:
The queryString value
Throws:
DbException - If something goes wrong.

setSqlValues

public int setSqlValues(java.sql.PreparedStatement ps,
                        int i)
                 throws DbException,
                        java.sql.SQLException
Any DbExpr needs to be able to substitute any parameters as per JDBC "?" substitutions.

Specified by:
setSqlValues in class DbExpr
Parameters:
ps - The PreparedStatement
i - The new sqlValues value
Returns:
An index (obscure).
Throws:
DbException - If something goes wrong.
java.sql.SQLException - If something goes wrong.