net.wgen.op.db
Class SqlStatementBuilder
java.lang.Object
net.wgen.op.db.SqlStatementBuilder
- public class SqlStatementBuilder
- extends java.lang.Object
Builds a Prepared- or CallableStatement from a DatabaseCall object.
- Version:
- $Id: SqlStatementBuilder.html,v 1.2 2007/01/28 04:09:36 paulfeuer Exp $
- Author:
- Paul Feuer, Wireless Generation, Inc.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_call
protected DatabaseCall _call
_connection
protected java.sql.Connection _connection
_statement
protected java.sql.PreparedStatement _statement
_lobHandler
protected LobHandler _lobHandler
SqlStatementBuilder
public SqlStatementBuilder(DatabaseCall call,
java.sql.Connection connection)
getStatement
public java.sql.PreparedStatement getStatement()
build
public void build()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
registerParameters
protected void registerParameters()
throws java.sql.SQLException
- Iterates parameters calling setInput and registerOutput.
- Throws:
java.sql.SQLException - if a database error occurs
setInput
protected void setInput(int idx,
Parameter param)
throws java.sql.SQLException
- Sets input with special handling for SQLDataParameter, ArrayParameter, Clobs, and
Blobs. Parameters defined with jdbcType Types.CLOB and String values, are
transformed into Clob objects using DatabaseUtils.CLOB
- Parameters:
idx - param -
- Throws:
java.sql.SQLException
registerOutput
protected void registerOutput(int idx,
Parameter param)
throws java.sql.SQLException
- Parameters:
idx - param -
- Throws:
java.sql.SQLException
processConnectionOptions
protected void processConnectionOptions()
throws java.sql.SQLException
- Processes any connections set by the user in their DatabaseCall.
- Throws:
java.sql.SQLException