public class StatementFactoryDefault extends AbstractStatementFactory
| Modifier and Type | Field and Description |
|---|---|
protected ICache<String,PreparedStatement> |
inputs
Prepared statements for input actions.
|
protected ICache<String,PreparedStatement> |
outputs
Prepared statements for output actions.
|
| Constructor and Description |
|---|
StatementFactoryDefault() |
| Modifier and Type | Method and Description |
|---|---|
PreparedStatement |
getInput(Connection connection,
String sql,
Table table)
Get statement by SQL.
|
PreparedStatement |
getOutput(Connection connection,
String sql,
Table table)
Get statement by SQL.
|
void |
putInput(String sql,
PreparedStatement pstmt)
Add a statement to the factory.
|
void |
putOutput(String sql,
PreparedStatement pstmt)
Add a statement to the factory.
|
void |
release()
Release database resources.
|
void |
release(PreparedStatement pstmt)
Release an individual statement.
|
createInStatementprotected ICache<String,PreparedStatement> inputs
protected ICache<String,PreparedStatement> outputs
public PreparedStatement getInput(Connection connection, String sql, Table table) throws SQLException
IStatementFactoryconnection - Connection.sql - SQL.table - A table.SQLException - On lookup errors.public void putInput(String sql, PreparedStatement pstmt)
IStatementFactorysql - SQL.pstmt - A statement.public PreparedStatement getOutput(Connection connection, String sql, Table table) throws SQLException
IStatementFactoryconnection - Connection.sql - SQL.table - A table.SQLException - On lookup errors.public void putOutput(String sql, PreparedStatement pstmt)
IStatementFactorysql - SQL.pstmt - A statement.public void release(PreparedStatement pstmt) throws SQLException
IStatementFactorypstmt - The statement to be free.SQLException - On release errors.public void release()
throws PluginException
IStatementFactoryPluginException - On release errors.Copyright © 2017. All rights reserved.