org.apache.commons.dbcp

Class PoolablePreparedStatement

Implemented Interfaces:
PreparedStatement, Statement

public class PoolablePreparedStatement
extends DelegatingPreparedStatement
implements PreparedStatement

A DelegatingPreparedStatement that cooperates with PoolingConnection to implement a pool of PreparedStatements.

My close() method returns me to my containing pool. (See PoolingConnection.)

Version:
$Revision: 1.11 $ $Date: 2004/03/07 10:50:37 $
Authors:
Rodney Waldhoff
Glenn L. Nielsen
James House
Dirk Verbeeck
See Also:
PoolingConnection

Constructor Summary

PoolablePreparedStatement(PreparedStatement stmt, Object key, KeyedObjectPool pool, Connection conn)
Constructor

Method Summary

void
close()
Return me to my pool.

Methods inherited from class org.apache.commons.dbcp.DelegatingPreparedStatement

addBatch, clearParameters, equals, execute, executeQuery, executeUpdate, getMetaData, getParameterMetaData, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setDate, setDate, setDelegate, setDouble, setFloat, setInt, setLong, setNull, setNull, setObject, setObject, setObject, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setURL, setUnicodeStream

Methods inherited from class org.apache.commons.dbcp.DelegatingStatement

addBatch, cancel, clearBatch, clearWarnings, close, equals, 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, hashCode, setCursorName, setDelegate, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout

Methods inherited from class org.apache.commons.dbcp.AbandonedTrace

printStackTrace

Constructor Details

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

Method Details

close

public void close()
            throws SQLException
Return me to my pool.
Overrides:
close in interface DelegatingStatement

Copyright © 2001-2003 Apache Software Foundation. Documenation generated April 3 2007.