org.apache.commons.dbcp
クラス DelegatingResultSet

java.lang.Object
  拡張org.apache.commons.dbcp.AbandonedTrace
      拡張org.apache.commons.dbcp.DelegatingResultSet
すべての実装インタフェース:
ResultSet

public class DelegatingResultSet
extends AbandonedTrace
implements ResultSet

基盤となる ResultSet の委譲を行う実装です。

A base delegating implementation of {@link ResultSet}.

ResultSet インターフェイスの持つ全てのメソッドは、コンストラクタにて渡された ResultSet の対応するメソッドを単純にコールします。

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

結果セットの追跡と ResultSet を生成したコードのログを行うために AbandonedTrace を継承します。 ResultSet の追跡を行うことにより、この ResultSet を生成した Statment がクローズされる際に、確実にこの Statment がオープンした全ての ResultSet をクローズすることができるようになります。

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.

作成者:
Glenn L. Nielsen, James House (james@interobjective.com)
翻訳者:
日置 聡
翻訳状況:
初稿(校正者募集中)
翻訳更新日:
2003/09/17

フィールドの概要
 
インタフェース java.sql.ResultSet から継承したフィールド
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE
 
コンストラクタの概要
DelegatingResultSet(Statement stmt, ResultSet res)
          ResultSet 、生成した Statement、生成したコードをトレースする ResultSet のラッパーを生成します。
 
メソッドの概要
 boolean absolute(int row)
           
 void afterLast()
           
 void beforeFirst()
           
 void cancelRowUpdates()
           
 void clearWarnings()
           
 void close()
          親となる Statement のトレースの対象からこの ResultSet を削除し、内部の ResultSet をクローズします。
 void deleteRow()
           
 int findColumn(String columnName)
           
 boolean first()
           
 Array getArray(int i)
           
 Array getArray(String colName)
           
 InputStream getAsciiStream(int columnIndex)
           
 InputStream getAsciiStream(String columnName)
           
 BigDecimal getBigDecimal(int columnIndex)
           
 BigDecimal getBigDecimal(String columnName)
           
 InputStream getBinaryStream(int columnIndex)
           
 InputStream getBinaryStream(String columnName)
           
 Blob getBlob(int i)
           
 Blob getBlob(String colName)
           
 boolean getBoolean(int columnIndex)
           
 boolean getBoolean(String columnName)
           
 byte getByte(int columnIndex)
           
 byte getByte(String columnName)
           
 byte[] getBytes(int columnIndex)
           
 byte[] getBytes(String columnName)
           
 Reader getCharacterStream(int columnIndex)
           
 Reader getCharacterStream(String columnName)
           
 Clob getClob(int i)
           
 Clob getClob(String colName)
           
 int getConcurrency()
           
 String getCursorName()
           
 Date getDate(int columnIndex)
           
 Date getDate(int columnIndex, Calendar cal)
           
 Date getDate(String columnName)
           
 Date getDate(String columnName, Calendar cal)
           
 double getDouble(int columnIndex)
           
 double getDouble(String columnName)
           
 int getFetchDirection()
           
 int getFetchSize()
           
 float getFloat(int columnIndex)
           
 float getFloat(String columnName)
           
 int getInt(int columnIndex)
           
 int getInt(String columnName)
           
 long getLong(int columnIndex)
           
 long getLong(String columnName)
           
 ResultSetMetaData getMetaData()
           
 Object getObject(int columnIndex)
           
 Object getObject(int i, Map map)
           
 Object getObject(String columnName)
           
 Object getObject(String colName, Map map)
           
 Ref getRef(int i)
           
 Ref getRef(String colName)
           
 int getRow()
           
 short getShort(int columnIndex)
           
 short getShort(String columnName)
           
 Statement getStatement()
           
 String getString(int columnIndex)
           
 String getString(String columnName)
           
 Time getTime(int columnIndex)
           
 Time getTime(int columnIndex, Calendar cal)
           
 Time getTime(String columnName)
           
 Time getTime(String columnName, Calendar cal)
           
 Timestamp getTimestamp(int columnIndex)
           
 Timestamp getTimestamp(int columnIndex, Calendar cal)
           
 Timestamp getTimestamp(String columnName)
           
 Timestamp getTimestamp(String columnName, Calendar cal)
           
 int getType()
           
 SQLWarning getWarnings()
           
 void insertRow()
           
 boolean isAfterLast()
           
 boolean isBeforeFirst()
           
 boolean isFirst()
           
 boolean isLast()
           
 boolean last()
           
 void moveToCurrentRow()
           
 void moveToInsertRow()
           
 boolean next()
           
 boolean previous()
           
 void refreshRow()
           
 boolean relative(int rows)
           
 boolean rowDeleted()
           
 boolean rowInserted()
           
 boolean rowUpdated()
           
 void setFetchDirection(int direction)
           
 void setFetchSize(int rows)
           
 void updateAsciiStream(int columnIndex, InputStream x, int length)
           
 void updateAsciiStream(String columnName, InputStream x, int length)
           
 void updateBigDecimal(int columnIndex, BigDecimal x)
           
 void updateBigDecimal(String columnName, BigDecimal x)
           
 void updateBinaryStream(int columnIndex, InputStream x, int length)
           
 void updateBinaryStream(String columnName, InputStream x, int length)
           
 void updateBoolean(int columnIndex, boolean x)
           
 void updateBoolean(String columnName, boolean x)
           
 void updateByte(int columnIndex, byte x)
           
 void updateByte(String columnName, byte x)
           
 void updateBytes(int columnIndex, byte[] x)
           
 void updateBytes(String columnName, byte[] x)
           
 void updateCharacterStream(int columnIndex, Reader x, int length)
           
 void updateCharacterStream(String columnName, Reader reader, int length)
           
 void updateDate(int columnIndex, Date x)
           
 void updateDate(String columnName, Date x)
           
 void updateDouble(int columnIndex, double x)
           
 void updateDouble(String columnName, double x)
           
 void updateFloat(int columnIndex, float x)
           
 void updateFloat(String columnName, float x)
           
 void updateInt(int columnIndex, int x)
           
 void updateInt(String columnName, int x)
           
 void updateLong(int columnIndex, long x)
           
 void updateLong(String columnName, long x)
           
 void updateNull(int columnIndex)
           
 void updateNull(String columnName)
           
 void updateObject(int columnIndex, Object x)
           
 void updateObject(int columnIndex, Object x, int scale)
           
 void updateObject(String columnName, Object x)
           
 void updateObject(String columnName, Object x, int scale)
           
 void updateRow()
           
 void updateShort(int columnIndex, short x)
           
 void updateShort(String columnName, short x)
           
 void updateString(int columnIndex, String x)
           
 void updateString(String columnName, String x)
           
 void updateTime(int columnIndex, Time x)
           
 void updateTime(String columnName, Time x)
           
 void updateTimestamp(int columnIndex, Timestamp x)
           
 void updateTimestamp(String columnName, Timestamp x)
           
 boolean wasNull()
           
 
クラス org.apache.commons.dbcp.AbandonedTrace から継承したメソッド
addTrace, clearTrace, getConfig, getLastUsed, getTrace, printStackTrace, removeTrace, setLastUsed, setLastUsed, setStackTrace
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
インタフェース java.sql.ResultSet から継承したメソッド
getBigDecimal, getBigDecimal, getUnicodeStream, getUnicodeStream, getURL, getURL, updateArray, updateArray, updateBlob, updateBlob, updateClob, updateClob, updateRef, updateRef
 

コンストラクタの詳細

DelegatingResultSet

public DelegatingResultSet(Statement stmt,
                           ResultSet res)
ResultSet 、生成した Statement、生成したコードをトレースする ResultSet のラッパーを生成します。
Create a wrapper for the ResultSet which traces this ResultSet to the Statement which created it and the code which created it.

パラメータ:
stmt - この ResultSet を生成した Statement
which create this ResultSet
res - ラップの対象
to wrap
メソッドの詳細

absolute

public boolean absolute(int row)
                 throws SQLException
定義:
インタフェース ResultSet 内の absolute
例外:
SQLException

afterLast

public void afterLast()
               throws SQLException
定義:
インタフェース ResultSet 内の afterLast
例外:
SQLException

beforeFirst

public void beforeFirst()
                 throws SQLException
定義:
インタフェース ResultSet 内の beforeFirst
例外:
SQLException

cancelRowUpdates

public void cancelRowUpdates()
                      throws SQLException
定義:
インタフェース ResultSet 内の cancelRowUpdates
例外:
SQLException

clearWarnings

public void clearWarnings()
                   throws SQLException
定義:
インタフェース ResultSet 内の clearWarnings
例外:
SQLException

close

public void close()
           throws SQLException
親となる Statement のトレースの対象からこの ResultSet を削除し、内部の ResultSet をクローズします。
Wrapper for close of ResultSet which removes this result set from being traced then calls close on the original ResultSet.

定義:
インタフェース ResultSet 内の close
例外:
SQLException

deleteRow

public void deleteRow()
               throws SQLException
定義:
インタフェース ResultSet 内の deleteRow
例外:
SQLException

findColumn

public int findColumn(String columnName)
               throws SQLException
定義:
インタフェース ResultSet 内の findColumn
例外:
SQLException

first

public boolean first()
              throws SQLException
定義:
インタフェース ResultSet 内の first
例外:
SQLException

getArray

public Array getArray(int i)
               throws SQLException
定義:
インタフェース ResultSet 内の getArray
例外:
SQLException

getArray

public Array getArray(String colName)
               throws SQLException
定義:
インタフェース ResultSet 内の getArray
例外:
SQLException

getAsciiStream

public InputStream getAsciiStream(int columnIndex)
                           throws SQLException
定義:
インタフェース ResultSet 内の getAsciiStream
例外:
SQLException

getAsciiStream

public InputStream getAsciiStream(String columnName)
                           throws SQLException
定義:
インタフェース ResultSet 内の getAsciiStream
例外:
SQLException

getBigDecimal

public BigDecimal getBigDecimal(int columnIndex)
                         throws SQLException
定義:
インタフェース ResultSet 内の getBigDecimal
例外:
SQLException

getBigDecimal

public BigDecimal getBigDecimal(String columnName)
                         throws SQLException
定義:
インタフェース ResultSet 内の getBigDecimal
例外:
SQLException

getBinaryStream

public InputStream getBinaryStream(int columnIndex)
                            throws SQLException
定義:
インタフェース ResultSet 内の getBinaryStream
例外:
SQLException

getBinaryStream

public InputStream getBinaryStream(String columnName)
                            throws SQLException
定義:
インタフェース ResultSet 内の getBinaryStream
例外:
SQLException

getBlob

public Blob getBlob(int i)
             throws SQLException
定義:
インタフェース ResultSet 内の getBlob
例外:
SQLException

getBlob

public Blob getBlob(String colName)
             throws SQLException
定義:
インタフェース ResultSet 内の getBlob
例外:
SQLException

getBoolean

public boolean getBoolean(int columnIndex)
                   throws SQLException
定義:
インタフェース ResultSet 内の getBoolean
例外:
SQLException

getBoolean

public boolean getBoolean(String columnName)
                   throws SQLException
定義:
インタフェース ResultSet 内の getBoolean
例外:
SQLException

getByte

public byte getByte(int columnIndex)
             throws SQLException
定義:
インタフェース ResultSet 内の getByte
例外:
SQLException

getByte

public byte getByte(String columnName)
             throws SQLException
定義:
インタフェース ResultSet 内の getByte
例外:
SQLException

getBytes

public byte[] getBytes(int columnIndex)
                throws SQLException
定義:
インタフェース ResultSet 内の getBytes
例外:
SQLException

getBytes

public byte[] getBytes(String columnName)
                throws SQLException
定義:
インタフェース ResultSet 内の getBytes
例外:
SQLException

getCharacterStream

public Reader getCharacterStream(int columnIndex)
                          throws SQLException
定義:
インタフェース ResultSet 内の getCharacterStream
例外:
SQLException

getCharacterStream

public Reader getCharacterStream(String columnName)
                          throws SQLException
定義:
インタフェース ResultSet 内の getCharacterStream
例外:
SQLException

getClob

public Clob getClob(int i)
             throws SQLException
定義:
インタフェース ResultSet 内の getClob
例外:
SQLException

getClob

public Clob getClob(String colName)
             throws SQLException
定義:
インタフェース ResultSet 内の getClob
例外:
SQLException

getConcurrency

public int getConcurrency()
                   throws SQLException
定義:
インタフェース ResultSet 内の getConcurrency
例外:
SQLException

getCursorName

public String getCursorName()
                     throws SQLException
定義:
インタフェース ResultSet 内の getCursorName
例外:
SQLException

getDate

public Date getDate(int columnIndex)
             throws SQLException
定義:
インタフェース ResultSet 内の getDate
例外:
SQLException

getDate

public Date getDate(int columnIndex,
                    Calendar cal)
             throws SQLException
定義:
インタフェース ResultSet 内の getDate
例外:
SQLException

getDate

public Date getDate(String columnName)
             throws SQLException
定義:
インタフェース ResultSet 内の getDate
例外:
SQLException

getDate

public Date getDate(String columnName,
                    Calendar cal)
             throws SQLException
定義:
インタフェース ResultSet 内の getDate
例外:
SQLException

getDouble

public double getDouble(int columnIndex)
                 throws SQLException
定義:
インタフェース ResultSet 内の getDouble
例外:
SQLException

getDouble

public double getDouble(String columnName)
                 throws SQLException
定義:
インタフェース ResultSet 内の getDouble
例外:
SQLException

getFetchDirection

public int getFetchDirection()
                      throws SQLException
定義:
インタフェース ResultSet 内の getFetchDirection
例外:
SQLException

getFetchSize

public int getFetchSize()
                 throws SQLException
定義:
インタフェース ResultSet 内の getFetchSize
例外:
SQLException

getFloat

public float getFloat(int columnIndex)
               throws SQLException
定義:
インタフェース ResultSet 内の getFloat
例外:
SQLException

getFloat

public float getFloat(String columnName)
               throws SQLException
定義:
インタフェース ResultSet 内の getFloat
例外:
SQLException

getInt

public int getInt(int columnIndex)
           throws SQLException
定義:
インタフェース ResultSet 内の getInt
例外:
SQLException

getInt

public int getInt(String columnName)
           throws SQLException
定義:
インタフェース ResultSet 内の getInt
例外:
SQLException

getLong

public long getLong(int columnIndex)
             throws SQLException
定義:
インタフェース ResultSet 内の getLong
例外:
SQLException

getLong

public long getLong(String columnName)
             throws SQLException
定義:
インタフェース ResultSet 内の getLong
例外:
SQLException

getMetaData

public ResultSetMetaData getMetaData()
                              throws SQLException
定義:
インタフェース ResultSet 内の getMetaData
例外:
SQLException

getObject

public Object getObject(int columnIndex)
                 throws SQLException
定義:
インタフェース ResultSet 内の getObject
例外:
SQLException

getObject

public Object getObject(int i,
                        Map map)
                 throws SQLException
定義:
インタフェース ResultSet 内の getObject
例外:
SQLException

getObject

public Object getObject(String columnName)
                 throws SQLException