util.sql
Class PreparedStatementFactory

java.lang.Object
  |
  +--util.sql.PreparedStatementFactory

public class PreparedStatementFactory
extends java.lang.Object

Class that builds prepared statements using only a connection and an array of objects.


Constructor Summary
PreparedStatementFactory()
           
 
Method Summary
static void buildStatement(java.sql.PreparedStatement stmnt, java.lang.Object[] values)
          Given a prepared statment, set the given values in their corresponding statement indices.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreparedStatementFactory

public PreparedStatementFactory()
Method Detail

buildStatement

public static void buildStatement(java.sql.PreparedStatement stmnt,
                                  java.lang.Object[] values)
                           throws java.lang.IllegalArgumentException,
                                  java.lang.IllegalStateException
Given a prepared statment, set the given values in their corresponding statement indices.
Parameters:
stmnt - the statement to build
values - the values to put into the statement
Throws:
java.lang.IllegalArgumentException - when a null values array is passed in
java.lang.IllegalStateException - thrown when any SQLException occurs during the populating of the statement