Package org.apache.commons.dbcp2
Class PoolableCallableStatement
- java.lang.Object
-
- org.apache.commons.dbcp2.AbandonedTrace
-
- org.apache.commons.dbcp2.DelegatingStatement
-
- org.apache.commons.dbcp2.DelegatingPreparedStatement
-
- org.apache.commons.dbcp2.DelegatingCallableStatement
-
- org.apache.commons.dbcp2.PoolableCallableStatement
-
- All Implemented Interfaces:
java.lang.AutoCloseable,java.sql.CallableStatement,java.sql.PreparedStatement,java.sql.Statement,java.sql.Wrapper,org.apache.commons.pool2.TrackedUse
public class PoolableCallableStatement extends DelegatingCallableStatement
ADelegatingCallableStatementthat cooperates withPoolingConnectionto implement a pool ofCallableStatements.The
close()method returns this statement to its containing pool. (SeePoolingConnection.)- Since:
- 2.0
- Version:
- $Id: PoolableCallableStatement.java 1658644 2015-02-10 08:59:07Z tn $
- See Also:
PoolingConnection
-
-
Constructor Summary
Constructors Constructor Description PoolableCallableStatement(java.sql.CallableStatement stmt, PStmtKey key, org.apache.commons.pool2.KeyedObjectPool<PStmtKey,DelegatingPreparedStatement> pool, DelegatingConnection<java.sql.Connection> conn)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Returns the CallableStatement to the pool.-
Methods inherited from class org.apache.commons.dbcp2.DelegatingCallableStatement
getArray, getArray, 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
-
Methods inherited from class org.apache.commons.dbcp2.DelegatingPreparedStatement
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, setURL, toString
-
Methods inherited from class org.apache.commons.dbcp2.DelegatingStatement
addBatch, cancel, clearBatch, 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, unwrap
-
Methods inherited from class org.apache.commons.dbcp2.AbandonedTrace
getLastUsed
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.sql.CallableStatement
registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, setObject, setObject
-
Methods inherited from interface java.sql.PreparedStatement
addBatch, clearParameters, execute, executeLargeUpdate, 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, setObject, setObject, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setURL
-
Methods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, 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, setQueryTimeout
-
-
-
-
Constructor Detail
-
PoolableCallableStatement
public PoolableCallableStatement(java.sql.CallableStatement stmt, PStmtKey key, org.apache.commons.pool2.KeyedObjectPool<PStmtKey,DelegatingPreparedStatement> pool, DelegatingConnection<java.sql.Connection> conn)Constructor.- Parameters:
stmt- the underlyingCallableStatementkey- the key for this statement in theKeyedObjectPoolpool- theKeyedObjectPoolfrom which this CallableStatement was obtainedconn- theDelegatingConnectionthat created this CallableStatement
-
-
Method Detail
-
close
public void close() throws java.sql.SQLExceptionReturns the CallableStatement to the pool. If {DelegatingStatement.isClosed(), this is a No-op.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.sql.Statement- Overrides:
closein classDelegatingStatement- Throws:
java.sql.SQLException
-
-