public abstract class StatementExecutor<Q extends net.idea.modbcum.i.IStatement,Results>
extends net.idea.modbcum.p.AbstractDBProcessor<Q,Results>
| Modifier and Type | Field and Description |
|---|---|
protected Hashtable<String,PreparedStatement> |
cache |
protected boolean |
useCache |
| Constructor and Description |
|---|
StatementExecutor() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addStatementToCache(String sql,
PreparedStatement p) |
void |
close() |
void |
closeResults(Results rs) |
protected abstract Results |
execute(Connection c,
Q target) |
protected PreparedStatement |
getCachedStatement(String sql) |
boolean |
isUseCache()
Deprecated.
|
void |
open() |
Results |
process(Q target) |
void |
setConnection(Connection connection) |
static void |
setParameters(PreparedStatement ps,
List<net.idea.modbcum.i.query.QueryParam> params) |
void |
setUseCache(boolean useCache)
Deprecated.
|
getConnection, isCloseConnection, isEnabled, setCloseConnectionaddPropertyChangeListener, addPropertyChangeListener, getID, removePropertyChangeListener, removePropertyChangeListener, setEnabled, toStringprotected Hashtable<String,PreparedStatement> cache
protected boolean useCache
@Deprecated public boolean isUseCache()
@Deprecated public void setUseCache(boolean useCache)
public void setConnection(Connection connection) throws net.idea.modbcum.i.exceptions.DbAmbitException
protected PreparedStatement getCachedStatement(String sql)
protected void addStatementToCache(String sql, PreparedStatement p)
public static void setParameters(PreparedStatement ps, List<net.idea.modbcum.i.query.QueryParam> params) throws SQLException
SQLExceptionpublic void open()
throws net.idea.modbcum.i.exceptions.DbAmbitException
public Results process(Q target) throws net.idea.modbcum.i.exceptions.AmbitException
net.idea.modbcum.i.exceptions.AmbitExceptionprotected abstract Results execute(Connection c, Q target) throws SQLException, net.idea.modbcum.i.exceptions.AmbitException
SQLExceptionnet.idea.modbcum.i.exceptions.AmbitExceptionpublic void closeResults(Results rs) throws SQLException
SQLExceptionCopyright © 2004–2020 Ideaconsult Ltd.. All rights reserved.