org.apache.commons.dbutils
クラス ResultSetIterator

java.lang.Object
  上位を拡張 org.apache.commons.dbutils.ResultSetIterator
すべての実装されたインタフェース:
java.util.Iterator

public class ResultSetIterator
extends java.lang.Object
implements java.util.Iterator

Wraps a ResultSet in an Iterator. This is useful when you want to present a non-database application layer with domain neutral data.

This implementation requires the ResultSet.isLast() method to be implemented.


コンストラクタの概要
ResultSetIterator(java.sql.ResultSet rs)
          Constructor for ResultSetIterator.
ResultSetIterator(java.sql.ResultSet rs, RowProcessor convert)
          Constructor for ResultSetIterator.
 
メソッドの概要
 boolean hasNext()
          Returns true if there are more rows in the ResultSet.
 java.lang.Object next()
          Returns the next row as an Object[].
 void remove()
          Deletes the current row from the ResultSet.
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

ResultSetIterator

public ResultSetIterator(java.sql.ResultSet rs)
Constructor for ResultSetIterator.

パラメータ:
rs - Wrap this ResultSet in an Iterator.

ResultSetIterator

public ResultSetIterator(java.sql.ResultSet rs,
                         RowProcessor convert)
Constructor for ResultSetIterator.

パラメータ:
rs - Wrap this ResultSet in an Iterator.
convert - The processor to use when converting a row into an Object[]. Defaults to a BasicRowProcessor.
メソッドの詳細

hasNext

public boolean hasNext()
Returns true if there are more rows in the ResultSet.

定義:
インタフェース java.util.Iterator 内の hasNext
戻り値:
boolean true if there are more rows
例外:
java.lang.RuntimeException - if an SQLException occurs.

next

public java.lang.Object next()
Returns the next row as an Object[].

定義:
インタフェース java.util.Iterator 内の next
戻り値:
An Object[] with the same number of elements as columns in the ResultSet.
例外:
java.lang.RuntimeException - if an SQLException occurs.
関連項目:
Iterator.next()

remove

public void remove()
Deletes the current row from the ResultSet.

定義:
インタフェース java.util.Iterator 内の remove
例外:
java.lang.RuntimeException - if an SQLException occurs.
関連項目:
Iterator.remove()