public class DefaultStatementBuilder extends Object implements StatementBuilder
| Modifier and Type | Field and Description |
|---|---|
static StatementBuilderFactory |
FACTORY |
| Constructor and Description |
|---|
DefaultStatementBuilder() |
| Modifier and Type | Method and Description |
|---|---|
void |
close(Connection conn)
No need to do anything on connection close.
|
void |
close(Connection conn,
String sql,
Statement stmt)
Called to close an individual prepared statement created from this builder.
|
Statement |
create(Connection conn,
StatementContext ctx)
Called each time a statement needs to be created.
|
PreparedStatement |
create(Connection conn,
String sql,
StatementContext ctx)
Create a new DefaultStatementBuilder which will always create a new PreparedStatement from
the Connection
|
CallableStatement |
createCall(Connection conn,
String sql,
StatementContext ctx)
Called each time a Callable statement needs to be created
|
public static final StatementBuilderFactory FACTORY
public void close(Connection conn)
close in interface StatementBuilderconn - the connection to close.public void close(Connection conn, String sql, Statement stmt) throws SQLException
close in interface StatementBuildersql - the translated SQL which was preparedstmt - the statementconn - the connection to closeSQLException - if anything goes wrong closing the statementpublic Statement create(Connection conn, StatementContext ctx) throws SQLException
StatementBuildercreate in interface StatementBuilderconn - the JDBC Connection the statement is being created forctx - Statement context associated with the SqlStatement this is building forSQLException - if anything goes wrong getting the statementpublic PreparedStatement create(Connection conn, String sql, StatementContext ctx) throws SQLException
create in interface StatementBuilderconn - Used to prepare the statementsql - Translated SQL statementctx - UnusedSQLException - if anything goes wrong preparing the statementpublic CallableStatement createCall(Connection conn, String sql, StatementContext ctx) throws SQLException
createCall in interface StatementBuilderconn - the JDBC Connection the statement is being created forsql - the translated SQL which should be preparedctx - Statement context associated with the SqlStatement this is building forSQLException - if anything goes wrong preparing the statementCopyright © 2017. All rights reserved.