org.apache.commons.dbcp
Class PoolablePreparedStatement
java.lang.Object
org.apache.commons.dbcp.AbandonedTrace
org.apache.commons.dbcp.DelegatingStatement
org.apache.commons.dbcp.DelegatingPreparedStatement
org.apache.commons.dbcp.PoolablePreparedStatement
- All Implemented Interfaces:
- PreparedStatement, Statement, Wrapper
public class PoolablePreparedStatement
- extends DelegatingPreparedStatement
- implements PreparedStatement
A DelegatingPreparedStatement
that cooperates with
PoolingConnection
to implement a pool of PreparedStatement
s.
My close()
method returns me to my containing pool. (See PoolingConnection
.)
- Version:
- $Revision: 892307 $ $Date: 2013-12-31 23:27:28 +0000 (Tue, 31 Dec 2013) $
- Author:
- Rodney Waldhoff, Glenn L. Nielsen, James House, Dirk Verbeeck
- See Also:
PoolingConnection
Methods inherited from class org.apache.commons.dbcp.DelegatingPreparedStatement |
clearParameters, equals, 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, setDelegate, 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 |
Methods inherited from class org.apache.commons.dbcp.DelegatingStatement |
addBatch, cancel, checkOpen, clearWarnings, 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, handleException, hashCode, isClosed, isPoolable, isWrapperFor, setCursorName, setDelegate, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, unwrap |
Methods inherited from interface java.sql.PreparedStatement |
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 |
Methods inherited from interface java.sql.Statement |
addBatch, cancel, clearWarnings, 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, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout |
_pool
protected KeyedObjectPool _pool
- The
KeyedObjectPool
from which I was obtained.
_key
protected Object _key
- My "key" as used by
KeyedObjectPool
.
PoolablePreparedStatement
public PoolablePreparedStatement(PreparedStatement stmt,
Object key,
KeyedObjectPool pool,
Connection conn)
- Constructor
- Parameters:
stmt
- my underlying PreparedStatement
key
- my key" as used by KeyedObjectPool
pool
- the KeyedObjectPool
from which I was obtained.conn
- the Connection
from which I was created
addBatch
public void addBatch()
throws SQLException
- Add batch.
- Specified by:
addBatch
in interface PreparedStatement
- Overrides:
addBatch
in class DelegatingPreparedStatement
- Throws:
SQLException
clearBatch
public void clearBatch()
throws SQLException
- Clear Batch.
- Specified by:
clearBatch
in interface Statement
- Overrides:
clearBatch
in class DelegatingStatement
- Throws:
SQLException
close
public void close()
throws SQLException
- Return me to my pool.
- Specified by:
close
in interface Statement
- Overrides:
close
in class DelegatingStatement
- Throws:
SQLException
activate
protected void activate()
throws SQLException
- Overrides:
activate
in class DelegatingStatement
- Throws:
SQLException
passivate
protected void passivate()
throws SQLException
- Overrides:
passivate
in class DelegatingStatement
- Throws:
SQLException
Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.