|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.dbcp.AbandonedTrace
org.apache.commons.dbcp.DelegatingStatement
org.apache.commons.dbcp.DelegatingPreparedStatement
org.apache.commons.dbcp.PoolablePreparedStatement
public class PoolablePreparedStatement
A DelegatingPreparedStatement that cooperates with
PoolingConnection to implement a pool of PreparedStatements.
My close() method returns me to my containing pool. (See PoolingConnection.)
PoolingConnection| Field Summary | |
|---|---|
protected Object |
_key
My "key" as used by KeyedObjectPool. |
protected KeyedObjectPool |
_pool
The KeyedObjectPool from which I was obtained. |
| Fields inherited from class org.apache.commons.dbcp.DelegatingStatement |
|---|
_closed, _conn, _stmt |
| Fields inherited from interface java.sql.Statement |
|---|
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO |
| Constructor Summary | |
|---|---|
PoolablePreparedStatement(PreparedStatement stmt,
Object key,
KeyedObjectPool pool,
Connection conn)
Constructor |
|
| Method Summary | |
|---|---|
protected void |
activate()
|
void |
addBatch()
Add batch. |
void |
clearBatch()
Clear Batch. |
void |
close()
Return me to my pool. |
protected void |
passivate()
|
| Methods inherited from class org.apache.commons.dbcp.DelegatingPreparedStatement |
|---|
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, setUnicodeStream, setURL, toString |
| Methods inherited from class org.apache.commons.dbcp.AbandonedTrace |
|---|
addTrace, clearTrace, getConfig, getLastUsed, getTrace, printStackTrace, removeTrace, setLastUsed, setLastUsed, setStackTrace |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.sql.PreparedStatement |
|---|
clearParameters, execute, executeQuery, executeUpdate, getMetaData, getParameterMetaData, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNull, setNull, setObject, setObject, setObject, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL |
| Field Detail |
|---|
protected KeyedObjectPool _pool
KeyedObjectPool from which I was obtained.
protected Object _key
KeyedObjectPool.
| Constructor Detail |
|---|
public PoolablePreparedStatement(PreparedStatement stmt,
Object key,
KeyedObjectPool pool,
Connection conn)
stmt - my underlying PreparedStatementkey - my key" as used by KeyedObjectPoolpool - the KeyedObjectPool from which I was obtained.conn - the Connection from which I was created| Method Detail |
|---|
public void addBatch()
throws SQLException
addBatch in interface PreparedStatementaddBatch in class DelegatingPreparedStatementSQLException
public void clearBatch()
throws SQLException
clearBatch in interface StatementclearBatch in class DelegatingStatementSQLException
public void close()
throws SQLException
close in interface Statementclose in class DelegatingStatementSQLException
protected void activate()
throws SQLException
activate in class DelegatingStatementSQLException
protected void passivate()
throws SQLException
passivate in class DelegatingStatementSQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||