| Modifier and Type | Field and Description |
|---|---|
protected Connection |
conn |
protected Map<Object,String> |
idToQuery |
protected Map<Object,PreparedStatement> |
queryToStmt |
| Modifier | Constructor and Description |
|---|---|
protected |
SqlDaoBase() |
protected |
SqlDaoBase(Collection<? extends QueryString> queries) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
execute(Object id,
Class<T> clazz,
Object... args) |
<T> List<T> |
executeList(Object id,
Class<T> clazz,
Object... args) |
ResultSet |
executeQuery(Object id,
Object... args) |
Connection |
getConnection()
Set the JDBC connection object to be used by the DAO.
|
void |
setConnection(Connection conn)
Retrieve the JDBC connection object that is currently associated with
this DAO.
|
protected void |
setPreparedStatement(Object id,
String query) |
protected Connection conn
protected Map<Object,PreparedStatement> queryToStmt
protected SqlDaoBase()
protected SqlDaoBase(Collection<? extends QueryString> queries)
public void setConnection(Connection conn) throws SQLException
SqlDaosetConnection in interface SqlDaoSQLExceptionpublic <T> T execute(Object id, Class<T> clazz, Object... args) throws SQLException
SQLExceptionpublic <T> List<T> executeList(Object id, Class<T> clazz, Object... args) throws SQLException
SQLExceptionpublic ResultSet executeQuery(Object id, Object... args) throws SQLException
SQLExceptionpublic Connection getConnection()
SqlDaogetConnection in interface SqlDaoCopyright © 2014. All rights reserved.