public class DefaultStatementBuilder extends Object implements StatementBuilder
Constructor and Description |
---|
DefaultStatementBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
close(Connection conn)
In this case, a NOOP
|
void |
close(Connection conn,
String sql,
Statement stmt)
Called to close an individual prepared statement created from this builder.
|
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 void close(Connection conn)
close
in interface StatementBuilder
public void close(Connection conn, String sql, Statement stmt) throws SQLException
close
in interface StatementBuilder
sql
- the translated SQL which was preparedstmt
- the statementSQLException
- if anything goes wrong closing the statementpublic PreparedStatement create(Connection conn, String sql, StatementContext ctx) throws SQLException
create
in interface StatementBuilder
conn
- Used to prepare the statementsql
- Translated SQL statementctx
- UnusedSQLException
public CallableStatement createCall(Connection conn, String sql, StatementContext ctx) throws SQLException
createCall
in interface StatementBuilder
conn
- 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
Copyright © 2018. All rights reserved.