public class PoolableCallableStatement extends DelegatingCallableStatement
DelegatingCallableStatement
that cooperates with PoolingConnection
to implement a pool of
CallableStatement
s.
The close()
method returns this statement to its containing pool. (See PoolingConnection
.)
PoolingConnection
Constructor and Description |
---|
PoolableCallableStatement(java.sql.CallableStatement callableStatement,
PStmtKey key,
KeyedObjectPool<PStmtKey,DelegatingPreparedStatement> pool,
DelegatingConnection<java.sql.Connection> connection)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activates after retrieval from the pool.
|
void |
close()
Returns the CallableStatement to the pool.
|
void |
passivate()
Passivates to prepare for return to the pool.
|
getArray, getArray, getBigDecimal, getBigDecimal, getBigDecimal, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getDate, getDate, getDate, getDate, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getURL, getURL, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, 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, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setURL, wasNull
addBatch, 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, toString
addBatch, cancel, checkOpen, clearBatch, 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, unwrap
addTrace, clearTrace, getLastUsed, getTrace, removeTrace, setLastUsed, setLastUsed
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addBatch, 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
addBatch, cancel, clearBatch, 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, setQueryTimeout
public PoolableCallableStatement(java.sql.CallableStatement callableStatement, PStmtKey key, KeyedObjectPool<PStmtKey,DelegatingPreparedStatement> pool, DelegatingConnection<java.sql.Connection> connection)
callableStatement
- the underlying CallableStatement
key
- the key for this statement in the KeyedObjectPool
pool
- the KeyedObjectPool
from which this CallableStatement was obtainedconnection
- the DelegatingConnection
that created this CallableStatementpublic void close() throws java.sql.SQLException
DelegatingStatement.isClosed()
, this is a No-op.close
in interface java.lang.AutoCloseable
close
in interface java.sql.Statement
close
in class DelegatingStatement
java.sql.SQLException
public void activate() throws java.sql.SQLException
activate
in class DelegatingStatement
java.sql.SQLException
- thrown by the delegating statement.public void passivate() throws java.sql.SQLException
passivate
in class DelegatingStatement
java.sql.SQLException
- thrown by the delegating statement.Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.