Package org.apache.tomcat.dbcp.dbcp2
Class PoolablePreparedStatement<K>
java.lang.Object
org.apache.tomcat.dbcp.dbcp2.AbandonedTrace
org.apache.tomcat.dbcp.dbcp2.DelegatingStatement
org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement
org.apache.tomcat.dbcp.dbcp2.PoolablePreparedStatement<K>
- Type Parameters:
- K- the key type
- All Implemented Interfaces:
- AutoCloseable,- PreparedStatement,- Statement,- Wrapper,- TrackedUse
A 
DelegatingPreparedStatement that cooperates with PoolingConnection to implement a pool of
 PreparedStatements.
 
 My close() method returns me to my containing pool. (See PoolingConnection.)
 
- Since:
- 2.0
- See Also:
- 
Field SummaryFields inherited from interface java.sql.StatementCLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
- 
Constructor SummaryConstructorsConstructorDescriptionPoolablePreparedStatement(PreparedStatement stmt, K key, KeyedObjectPool<K, PoolablePreparedStatement<K>> pool, DelegatingConnection<?> conn) Constructor.
- 
Method SummaryMethods inherited from class org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatementclearParameters, execute, executeLargeUpdate, executeQuery, executeUpdate, getMetaData, getParameterMetaData, prepareToReturn, 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, setObject, setObject, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL, toStringMethods inherited from class org.apache.tomcat.dbcp.dbcp2.DelegatingStatementaddBatch, cancel, checkOpen, clearWarnings, closeOnCompletion, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, finalize, getConnection, getConnectionInternal, getDelegate, getFetchDirection, getFetchSize, getGeneratedKeys, getInnermostDelegate, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, handleException, isClosed, isClosedInternal, isCloseOnCompletion, isPoolable, isWrapperFor, setClosedInternal, setCursorName, setDelegate, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, unwrapMethods inherited from class org.apache.tomcat.dbcp.dbcp2.AbandonedTraceaddTrace, clearTrace, close, getLastUsed, getLastUsedInstant, getTrace, removeThisTrace, removeTrace, setLastUsed, setLastUsed, setLastUsedMethods inherited from class java.lang.Objectclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.sql.StatementaddBatch, 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, setQueryTimeoutMethods inherited from interface java.sql.WrapperisWrapperFor, unwrap
- 
Constructor Details- 
PoolablePreparedStatementpublic PoolablePreparedStatement(PreparedStatement stmt, K key, KeyedObjectPool<K, PoolablePreparedStatement<K>> pool, DelegatingConnection<?> conn) Constructor.- Parameters:
- stmt- my underlying- PreparedStatement
- key- my key" as used by- KeyedObjectPool
- pool- the- KeyedObjectPoolfrom which I was obtained.
- conn- the- Connectionfrom which I was created
 
 
- 
- 
Method Details- 
activate- Overrides:
- activatein class- DelegatingStatement
- Throws:
- SQLException- thrown by the delegating statement.
 
- 
addBatchAdd batch.- Specified by:
- addBatchin interface- PreparedStatement
- Overrides:
- addBatchin class- DelegatingPreparedStatement
- Throws:
- SQLException
 
- 
clearBatchClear Batch.- Specified by:
- clearBatchin interface- Statement
- Overrides:
- clearBatchin class- DelegatingStatement
- Throws:
- SQLException
 
- 
closeReturn me to my pool.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Statement
- Overrides:
- closein class- DelegatingStatement
- Throws:
- SQLException- Ignored here, for subclasses.
 
- 
passivate- Overrides:
- passivatein class- DelegatingStatement
- Throws:
- SQLException- thrown by the delegating statement.
 
 
-