K - the key typepublic class PoolablePreparedStatement<K> extends DelegatingPreparedStatement
DelegatingPreparedStatement that cooperates with
PoolingConnection to implement a pool of PreparedStatements.
My close() method returns me to my containing pool. (See PoolingConnection.)
PoolingConnectionCLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO| Constructor and Description |
|---|
PoolablePreparedStatement(PreparedStatement stmt,
K key,
KeyedObjectPool<K,PoolablePreparedStatement<K>> pool,
DelegatingConnection<?> conn)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
addBatch()
Add batch.
|
void |
clearBatch()
Clear Batch.
|
void |
close()
Return me to my pool.
|
void |
passivate() |
clearParameters, execute, executeQuery, executeUpdate, getMetaData, getParameterMetaData, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setNull, setObject, setObject, setObject, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL, toStringaddBatch, cancel, checkOpen, clearWarnings, closeOnCompletion, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, finalize, getConnection, getConnectionInternal, getDelegate, getFetchDirection, getFetchSize, getGeneratedKeys, getInnermostDelegate, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, handleException, isClosed, isClosedInternal, isCloseOnCompletion, isPoolable, isWrapperFor, setClosedInternal, setCursorName, setDelegate, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, unwrapaddTrace, clearTrace, getLastUsed, getTrace, removeTrace, setLastUsed, setLastUsedclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitaddBatch, cancel, clearWarnings, closeOnCompletion, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeoutisWrapperFor, unwrappublic PoolablePreparedStatement(PreparedStatement stmt, K key, KeyedObjectPool<K,PoolablePreparedStatement<K>> pool, DelegatingConnection<?> conn)
stmt - my underlying PreparedStatementkey - my key" as used by KeyedObjectPoolpool - the KeyedObjectPool from which I was obtained.conn - the Connection from which I was createdpublic void addBatch()
throws SQLException
addBatch in interface PreparedStatementaddBatch in class DelegatingPreparedStatementSQLExceptionpublic void clearBatch()
throws SQLException
clearBatch in interface StatementclearBatch in class DelegatingStatementSQLExceptionpublic void close()
throws SQLException
close in interface AutoCloseableclose in interface Statementclose in class DelegatingStatementSQLExceptionpublic void activate()
throws SQLException
activate in class DelegatingStatementSQLExceptionpublic void passivate()
throws SQLException
passivate in class DelegatingStatementSQLExceptionCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.