Save This Page
Home » commons-dbcp-1.2.2-src » org.apache.commons » dbcp » [javadoc | source]
org.apache.commons.dbcp
public class: DelegatingResultSet [javadoc | source]
java.lang.Object
   org.apache.commons.dbcp.AbandonedTrace
      org.apache.commons.dbcp.DelegatingResultSet

All Implemented Interfaces:
    ResultSet

A base delegating implementation of ResultSet .

All of the methods from the ResultSet interface simply call the corresponding method on the "delegate" provided in my constructor.

Extends AbandonedTrace to implement result set tracking and logging of code which created the ResultSet. Tracking the ResultSet ensures that the Statment which created it can close any open ResultSet's on Statement close.

Constructor:
 public DelegatingResultSet(Statement stmt,
    ResultSet res) 
    Create a wrapper for the ResultSet which traces this ResultSet to the Statement which created it and the code which created it.
    Parameters:
    stmt - Statement which created this ResultSet
    res - ResultSet to wrap
Method from org.apache.commons.dbcp.DelegatingResultSet Summary:
absolute,   afterLast,   beforeFirst,   cancelRowUpdates,   clearWarnings,   close,   deleteRow,   equals,   findColumn,   first,   getArray,   getArray,   getAsciiStream,   getAsciiStream,   getBigDecimal,   getBigDecimal,   getBigDecimal,   getBigDecimal,   getBinaryStream,   getBinaryStream,   getBlob,   getBlob,   getBoolean,   getBoolean,   getByte,   getByte,   getBytes,   getBytes,   getCharacterStream,   getCharacterStream,   getClob,   getClob,   getConcurrency,   getCursorName,   getDate,   getDate,   getDate,   getDate,   getDelegate,   getDouble,   getDouble,   getFetchDirection,   getFetchSize,   getFloat,   getFloat,   getInnermostDelegate,   getInt,   getInt,   getLong,   getLong,   getMetaData,   getObject,   getObject,   getObject,   getObject,   getRef,   getRef,   getRow,   getShort,   getShort,   getStatement,   getString,   getString,   getTime,   getTime,   getTime,   getTime,   getTimestamp,   getTimestamp,   getTimestamp,   getTimestamp,   getType,   getURL,   getURL,   getUnicodeStream,   getUnicodeStream,   getWarnings,   handleException,   hashCode,   insertRow,   isAfterLast,   isBeforeFirst,   isFirst,   isLast,   last,   moveToCurrentRow,   moveToInsertRow,   next,   previous,   refreshRow,   relative,   rowDeleted,   rowInserted,   rowUpdated,   setFetchDirection,   setFetchSize,   updateArray,   updateArray,   updateAsciiStream,   updateAsciiStream,   updateBigDecimal,   updateBigDecimal,   updateBinaryStream,   updateBinaryStream,   updateBlob,   updateBlob,   updateBoolean,   updateBoolean,   updateByte,   updateByte,   updateBytes,   updateBytes,   updateCharacterStream,   updateCharacterStream,   updateClob,   updateClob,   updateDate,   updateDate,   updateDouble,   updateDouble,   updateFloat,   updateFloat,   updateInt,   updateInt,   updateLong,   updateLong,   updateNull,   updateNull,   updateObject,   updateObject,   updateObject,   updateObject,   updateRef,   updateRef,   updateRow,   updateShort,   updateShort,   updateString,   updateString,   updateTime,   updateTime,   updateTimestamp,   updateTimestamp,   wasNull,   wrapResultSet
Methods from org.apache.commons.dbcp.AbandonedTrace:
addTrace,   clearTrace,   getConfig,   getLastUsed,   getTrace,   printStackTrace,   removeTrace,   setLastUsed,   setLastUsed,   setStackTrace
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.commons.dbcp.DelegatingResultSet Detail:
 public boolean absolute(int row) throws SQLException 
 public  void afterLast() throws SQLException 
 public  void beforeFirst() throws SQLException 
 public  void cancelRowUpdates() throws SQLException 
 public  void clearWarnings() throws SQLException 
 public  void close() throws SQLException 
    Wrapper for close of ResultSet which removes this result set from being traced then calls close on the original ResultSet.
 public  void deleteRow() throws SQLException 
 public boolean equals(Object obj) 
 public int findColumn(String columnName) throws SQLException 
 public boolean first() throws SQLException 
 public Array getArray(int i) throws SQLException 
 public Array getArray(String colName) throws SQLException 
 public InputStream getAsciiStream(int columnIndex) throws SQLException 
 public InputStream getAsciiStream(String columnName) throws SQLException 
 public BigDecimal getBigDecimal(int columnIndex) throws SQLException 
 public BigDecimal getBigDecimal(String columnName) throws SQLException 
 public BigDecimal getBigDecimal(int columnIndex,
    int scale) throws SQLException 
Deprecated!
 public BigDecimal getBigDecimal(String columnName,
    int scale) throws SQLException 
Deprecated!
 public InputStream getBinaryStream(int columnIndex) throws SQLException 
 public InputStream getBinaryStream(String columnName) throws SQLException 
 public Blob getBlob(int i) throws SQLException 
 public Blob getBlob(String colName) throws SQLException 
 public boolean getBoolean(int columnIndex) throws SQLException 
 public boolean getBoolean(String columnName) throws SQLException 
 public byte getByte(int columnIndex) throws SQLException 
 public byte getByte(String columnName) throws SQLException 
 public byte[] getBytes(int columnIndex) throws SQLException 
 public byte[] getBytes(String columnName) throws SQLException 
 public Reader getCharacterStream(int columnIndex) throws SQLException 
 public Reader getCharacterStream(String columnName) throws SQLException 
 public Clob getClob(int i) throws SQLException 
 public Clob getClob(String colName) throws SQLException 
 public int getConcurrency() throws SQLException 
 public String getCursorName() throws SQLException 
 public Date getDate(int columnIndex) throws SQLException 
 public Date getDate(String columnName) throws SQLException 
 public Date getDate(int columnIndex,
    Calendar cal) throws SQLException 
 public Date getDate(String columnName,
    Calendar cal) throws SQLException 
 public ResultSet getDelegate() 
 public double getDouble(int columnIndex) throws SQLException 
 public double getDouble(String columnName) throws SQLException 
 public int getFetchDirection() throws SQLException 
 public int getFetchSize() throws SQLException 
 public float getFloat(int columnIndex) throws SQLException 
 public float getFloat(String columnName) throws SQLException 
 public ResultSet getInnermostDelegate() 
    If my underlying ResultSet is not a DelegatingResultSet, returns it, otherwise recursively invokes this method on my delegate.

    Hence this method will return the first delegate that is not a DelegatingResultSet, or null when no non-DelegatingResultSet delegate can be found by transversing this chain.

    This method is useful when you may have nested DelegatingResultSets, and you want to make sure to obtain a "genuine" ResultSet .

 public int getInt(int columnIndex) throws SQLException 
 public int getInt(String columnName) throws SQLException 
 public long getLong(int columnIndex) throws SQLException 
 public long getLong(String columnName) throws SQLException 
 public ResultSetMetaData getMetaData() throws SQLException 
 public Object getObject(int columnIndex) throws SQLException 
 public Object getObject(String columnName) throws SQLException 
 public Object getObject(int i,
    Map map) throws SQLException 
 public Object getObject(String colName,
    Map map) throws SQLException 
 public Ref getRef(int i) throws SQLException 
 public Ref getRef(String colName) throws SQLException 
 public int getRow() throws SQLException 
 public short getShort(int columnIndex) throws SQLException 
 public short getShort(String columnName) throws SQLException 
 public Statement getStatement() throws SQLException 
 public String getString(int columnIndex) throws SQLException 
 public String getString(String columnName) throws SQLException 
 public Time getTime(int columnIndex) throws SQLException 
 public Time getTime(String columnName) throws SQLException 
 public Time getTime(int columnIndex,
    Calendar cal) throws SQLException 
 public Time getTime(String columnName,
    Calendar cal) throws SQLException 
 public Timestamp getTimestamp(int columnIndex) throws SQLException 
 public Timestamp getTimestamp(String columnName) throws SQLException 
 public Timestamp getTimestamp(int columnIndex,
    Calendar cal) throws SQLException 
 public Timestamp getTimestamp(String columnName,
    Calendar cal) throws SQLException 
 public int getType() throws SQLException 
 public URL getURL(int columnIndex) throws SQLException 
 public URL getURL(String columnName) throws SQLException 
 public InputStream getUnicodeStream(int columnIndex) throws SQLException 
Deprecated!
 public InputStream getUnicodeStream(String columnName) throws SQLException 
Deprecated!
 public SQLWarning getWarnings() throws SQLException 
 protected  void handleException(SQLException e) throws SQLException 
 public int hashCode() 
 public  void insertRow() throws SQLException 
 public boolean isAfterLast() throws SQLException 
 public boolean isBeforeFirst() throws SQLException 
 public boolean isFirst() throws SQLException 
 public boolean isLast() throws SQLException 
 public boolean last() throws SQLException 
 public  void moveToCurrentRow() throws SQLException 
 public  void moveToInsertRow() throws SQLException 
 public boolean next() throws SQLException 
 public boolean previous() throws SQLException 
 public  void refreshRow() throws SQLException 
 public boolean relative(int rows) throws SQLException 
 public boolean rowDeleted() throws SQLException 
 public boolean rowInserted() throws SQLException 
 public boolean rowUpdated() throws SQLException 
 public  void setFetchDirection(int direction) throws SQLException 
 public  void setFetchSize(int rows) throws SQLException 
 public  void updateArray(int columnIndex,
    Array x) throws SQLException 
 public  void updateArray(String columnName,
    Array x) throws SQLException 
 public  void updateAsciiStream(int columnIndex,
    InputStream x,
    int length) throws SQLException 
 public  void updateAsciiStream(String columnName,
    InputStream x,
    int length) throws SQLException 
 public  void updateBigDecimal(int columnIndex,
    BigDecimal x) throws SQLException 
 public  void updateBigDecimal(String columnName,
    BigDecimal x) throws SQLException 
 public  void updateBinaryStream(int columnIndex,
    InputStream x,
    int length) throws SQLException 
 public  void updateBinaryStream(String columnName,
    InputStream x,
    int length) throws SQLException 
 public  void updateBlob(int columnIndex,
    Blob x) throws SQLException 
 public  void updateBlob(String columnName,
    Blob x) throws SQLException 
 public  void updateBoolean(int columnIndex,
    boolean x) throws SQLException 
 public  void updateBoolean(String columnName,
    boolean x) throws SQLException 
 public  void updateByte(int columnIndex,
    byte x) throws SQLException 
 public  void updateByte(String columnName,
    byte x) throws SQLException 
 public  void updateBytes(int columnIndex,
    byte[] x) throws SQLException 
 public  void updateBytes(String columnName,
    byte[] x) throws SQLException 
 public  void updateCharacterStream(int columnIndex,
    Reader x,
    int length) throws SQLException 
 public  void updateCharacterStream(String columnName,
    Reader reader,
    int length) throws SQLException 
 public  void updateClob(int columnIndex,
    Clob x) throws SQLException 
 public  void updateClob(String columnName,
    Clob x) throws SQLException 
 public  void updateDate(int columnIndex,
    Date x) throws SQLException 
 public  void updateDate(String columnName,
    Date x) throws SQLException 
 public  void updateDouble(int columnIndex,
    double x) throws SQLException 
 public  void updateDouble(String columnName,
    double x) throws SQLException 
 public  void updateFloat(int columnIndex,
    float x) throws SQLException 
 public  void updateFloat(String columnName,
    float x) throws SQLException 
 public  void updateInt(int columnIndex,
    int x) throws SQLException 
 public  void updateInt(String columnName,
    int x) throws SQLException 
 public  void updateLong(int columnIndex,
    long x) throws SQLException 
 public  void updateLong(String columnName,
    long x) throws SQLException 
 public  void updateNull(int columnIndex) throws SQLException 
 public  void updateNull(String columnName) throws SQLException 
 public  void updateObject(int columnIndex,
    Object x) throws SQLException 
 public  void updateObject(String columnName,
    Object x) throws SQLException 
 public  void updateObject(int columnIndex,
    Object x,
    int scale) throws SQLException 
 public  void updateObject(String columnName,
    Object x,
    int scale) throws SQLException 
 public  void updateRef(int columnIndex,
    Ref x) throws SQLException 
 public  void updateRef(String columnName,
    Ref x) throws SQLException 
 public  void updateRow() throws SQLException 
 public  void updateShort(int columnIndex,
    short x) throws SQLException 
 public  void updateShort(String columnName,
    short x) throws SQLException 
 public  void updateString(int columnIndex,
    String x) throws SQLException 
 public  void updateString(String columnName,
    String x) throws SQLException 
 public  void updateTime(int columnIndex,
    Time x) throws SQLException 
 public  void updateTime(String columnName,
    Time x) throws SQLException 
 public  void updateTimestamp(int columnIndex,
    Timestamp x) throws SQLException 
 public  void updateTimestamp(String columnName,
    Timestamp x) throws SQLException 
 public boolean wasNull() throws SQLException 
 public static ResultSet wrapResultSet(Statement stmt,
    ResultSet rset)