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, setCloseConnection
addPropertyChangeListener, addPropertyChangeListener, getID, removePropertyChangeListener, removePropertyChangeListener, setEnabled, toString
protected 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
SQLException
public 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.AmbitException
protected abstract Results execute(Connection c, Q target) throws SQLException, net.idea.modbcum.i.exceptions.AmbitException
SQLException
net.idea.modbcum.i.exceptions.AmbitException
public void closeResults(Results rs) throws SQLException
SQLException
Copyright © 2004–2020 Ideaconsult Ltd.. All rights reserved.