org.apache.commons.dbutils
インタフェース RowProcessor

既知の実装クラスの一覧:
BasicRowProcessor

public interface RowProcessor

RowProcessor implementations convert ResultSet rows into various other objects. Implementations can extend BasicRowProcessor to protect themselves from changes to this interface.

関連項目:
BasicRowProcessor

メソッドの概要
 java.lang.Object[] toArray(java.sql.ResultSet rs)
          Create an Object[] from the column values in one ResultSet row.
 java.lang.Object toBean(java.sql.ResultSet rs, java.lang.Class type)
          Create a JavaBean from the column values in one ResultSet row.
 java.util.List toBeanList(java.sql.ResultSet rs, java.lang.Class type)
          Create a List of JavaBeans from the column values in all ResultSet rows.
 java.util.Map toMap(java.sql.ResultSet rs)
          Create a Map from the column values in one ResultSet row.
 

メソッドの詳細

toArray

java.lang.Object[] toArray(java.sql.ResultSet rs)
                           throws java.sql.SQLException
Create an Object[] from the column values in one ResultSet row. The ResultSet should be positioned on a valid row before passing it to this method. Implementations of this method must not alter the row position of the ResultSet.

パラメータ:
rs - ResultSet that supplies the array data
戻り値:
the newly created array
例外:
java.sql.SQLException - if a database access error occurs

toBean

java.lang.Object toBean(java.sql.ResultSet rs,
                        java.lang.Class type)
                        throws java.sql.SQLException
Create a JavaBean from the column values in one ResultSet row. The ResultSet should be positioned on a valid row before passing it to this method. Implementations of this method must not alter the row position of the ResultSet.

パラメータ:
rs - ResultSet that supplies the bean data
type - Class from which to create the bean instance
戻り値:
the newly created bean
例外:
java.sql.SQLException - if a database access error occurs

toBeanList

java.util.List toBeanList(java.sql.ResultSet rs,
                          java.lang.Class type)
                          throws java.sql.SQLException
Create a List of JavaBeans from the column values in all ResultSet rows. ResultSet.next() should not be called before passing it to this method.

パラメータ:
rs - ResultSet that supplies the bean data
type - Class from which to create the bean instance
戻り値:
A List of beans with the given type in the order they were returned by the ResultSet.
例外:
java.sql.SQLException - if a database access error occurs

toMap

java.util.Map toMap(java.sql.ResultSet rs)
                    throws java.sql.SQLException
Create a Map from the column values in one ResultSet row. The ResultSet should be positioned on a valid row before passing it to this method. Implementations of this method must not alter the row position of the ResultSet.

パラメータ:
rs - ResultSet that supplies the map data
戻り値:
the newly created Map
例外:
java.sql.SQLException - if a database access error occurs