com.partnersoft.sql
Class SqlPreparedStatementManager<T>
java.lang.Object
com.partnersoft.sql.SqlPreparedStatementManager<T>
public class SqlPreparedStatementManager<T>
- extends java.lang.Object
Caches and manages SqlPreparedStatements using some unique key.
Note that it uses HashMaps internally for speed so String comparisons will be case-sensitive on keys and text (e.g., if you use the SQL itself as a key).
Copyright 2009 Partner Software, Inc.
- Version:
- $Id$
- Author:
- Paul Reavis
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SqlPreparedStatementManager
public SqlPreparedStatementManager(SqlConnection connection)
statementExistsFor
public boolean statementExistsFor(T key)
statementFor
public SqlPreparedStatement statementFor(T key)
createStatement
public SqlPreparedStatement createStatement(T key,
java.lang.String sql,
java.util.List<java.lang.String> values)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
removeStatementFor
public void removeStatementFor(T key)
throws java.sql.SQLException
- Closes and removes a statement.
- Parameters:
key -
- Throws:
java.sql.SQLException
removeAll
public void removeAll()
throws java.sql.SQLException
- Throws:
java.sql.SQLException