| |
|
| java.lang.Object org.apache.commons.dbcp.AbandonedTrace org.apache.commons.dbcp.DelegatingStatement
All known Subclasses: org.apache.commons.dbcp.DelegatingPreparedStatement,
DelegatingStatement | public class DelegatingStatement extends AbandonedTrace implements Statement(Code) | | A base delegating implementation of
Statement .
All of the methods from the
Statement interface
simply check to see that the
Statement is active,
and call the corresponding method on the "delegate"
provided in my constructor.
Extends AbandonedTrace to implement Statement tracking and
logging of code which created the Statement. Tracking the
Statement ensures that the Connection which created it can
close any open Statement's on Connection close.
author: Rodney Waldhoff author: Glenn L. Nielsen author: James House author: Dirk Verbeeck version: $Revision: 500687 $ $Date: 2007-01-27 16:33:47 -0700 (Sat, 27 Jan 2007) $ |
_closed | protected boolean _closed(Code) | | |
DelegatingStatement | public DelegatingStatement(DelegatingConnection c, Statement s)(Code) | | Create a wrapper for the Statement which traces this
Statement to the Connection which created it and the
code which created it.
Parameters: s - the Statement to delegate all calls to. Parameters: c - the DelegatingConnection that created this statement. |
close | public void close() throws SQLException(Code) | | Close this DelegatingStatement, and close
any ResultSets that were not explicitly closed.
|
getInnermostDelegate | public Statement getInnermostDelegate()(Code) | | If my underlying
Statement is not a
DelegatingStatement, returns it,
otherwise recursively invokes this method on
my delegate.
Hence this method will return the first
delegate that is not a DelegatingStatement
or null when no non-DelegatingStatement
delegate can be found by transversing this chain.
This method is useful when you may have nested
DelegatingStatements, and you want to make
sure to obtain a "genuine"
Statement .
See Also: DelegatingStatement.getDelegate |
hashCode | public int hashCode()(Code) | | |
isClosed | protected boolean isClosed()(Code) | | |
setEscapeProcessing | public void setEscapeProcessing(boolean enable) throws SQLException(Code) | | |
toString | public String toString()(Code) | | Returns a String representation of this object.
String since: 1.2.2 |
|
|
|