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.)
PoolingConnection| Constructor | Description |
|---|---|
PoolablePreparedStatement(java.sql.PreparedStatement stmt,
K key,
org.apache.commons.pool2.KeyedObjectPool<K,PoolablePreparedStatement<K>> pool,
DelegatingConnection<?> conn) |
Constructor
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
activate() |
|
void |
addBatch() |
Add batch.
|
void |
clearBatch() |
Clear Batch.
|
void |
close() |
Return me to my pool.
|
void |
passivate() |
getLastUsedclearParameters, 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, setURL, toStringaddBatch, cancel, clearWarnings, closeOnCompletion, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getDelegate, getFetchDirection, getFetchSize, getGeneratedKeys, getInnermostDelegate, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isWrapperFor, setCursorName, setDelegate, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, unwrapequals, getClass, hashCode, notify, notifyAll, wait, wait, waitexecuteLargeUpdate, setObject, setObjectaddBatch, cancel, clearWarnings, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeoutpublic PoolablePreparedStatement(java.sql.PreparedStatement stmt,
K key,
org.apache.commons.pool2.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 activate()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void addBatch()
throws java.sql.SQLException
addBatch in class DelegatingPreparedStatementjava.sql.SQLExceptionpublic void clearBatch()
throws java.sql.SQLException
clearBatch in class DelegatingStatementjava.sql.SQLExceptionpublic void close()
throws java.sql.SQLException
close in class DelegatingStatementjava.sql.SQLExceptionpublic void passivate()
throws java.sql.SQLException
java.sql.SQLExceptionCopyright © 2001-2015 Apache Software Foundation. Documenation generated March 25 2019.