org.apache.commons.dbutils
クラス BasicRowProcessor

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

public class BasicRowProcessor
extends java.lang.Object
implements RowProcessor

Basic implementation of the RowProcessor interface.

This class is thread-safe.

関連項目:
RowProcessor

コンストラクタの概要
BasicRowProcessor()
          BasicRowProcessor constructor.
BasicRowProcessor(BeanProcessor convert)
          BasicRowProcessor constructor.
 
メソッドの概要
static BasicRowProcessor instance()
          推奨されていません。 Create instances with the constructors instead. This will be removed after DbUtils 1.1.
 java.lang.Object[] toArray(java.sql.ResultSet rs)
          Convert a ResultSet row into an Object[].
 java.lang.Object toBean(java.sql.ResultSet rs, java.lang.Class type)
          Convert a ResultSet row into a JavaBean.
 java.util.List toBeanList(java.sql.ResultSet rs, java.lang.Class type)
          Convert a ResultSet into a List of JavaBeans.
 java.util.Map toMap(java.sql.ResultSet rs)
          Convert a ResultSet row into a Map.
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

BasicRowProcessor

public BasicRowProcessor()
BasicRowProcessor constructor. Bean processing defaults to a BeanProcessor instance.


BasicRowProcessor

public BasicRowProcessor(BeanProcessor convert)
BasicRowProcessor constructor.

パラメータ:
convert - The BeanProcessor to use when converting columns to bean properties.
導入されたバージョン:
DbUtils 1.1
メソッドの詳細

instance

public static BasicRowProcessor instance()
推奨されていません。 Create instances with the constructors instead. This will be removed after DbUtils 1.1.

Returns the Singleton instance of this class.

戻り値:
The single instance of this class.

toArray

public java.lang.Object[] toArray(java.sql.ResultSet rs)
                           throws java.sql.SQLException
Convert a ResultSet row into an Object[]. This implementation copies column values into the array in the same order they're returned from the ResultSet. Array elements will be set to null if the column was SQL NULL.

定義:
インタフェース RowProcessor 内の toArray
パラメータ:
rs - ResultSet that supplies the array data
戻り値:
the newly created array
例外:
java.sql.SQLException - if a database access error occurs
関連項目:
RowProcessor.toArray(java.sql.ResultSet)

toBean

public java.lang.Object toBean(java.sql.ResultSet rs,
                               java.lang.Class type)
                        throws java.sql.SQLException
Convert a ResultSet row into a JavaBean. This implementation delegates to a BeanProcessor instance.

定義:
インタフェース RowProcessor 内の toBean
パラメータ:
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
関連項目:
RowProcessor.toBean(java.sql.ResultSet, java.lang.Class), BeanProcessor.toBean(java.sql.ResultSet, java.lang.Class)

toBeanList

public java.util.List toBeanList(java.sql.ResultSet rs,
                                 java.lang.Class type)
                          throws java.sql.SQLException
Convert a ResultSet into a List of JavaBeans. This implementation delegates to a BeanProcessor instance.

定義:
インタフェース RowProcessor 内の toBeanList
パラメータ:
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
関連項目:
RowProcessor.toBeanList(java.sql.ResultSet, java.lang.Class), BeanProcessor.toBeanList(java.sql.ResultSet, java.lang.Class)

toMap

public java.util.Map toMap(java.sql.ResultSet rs)
                    throws java.sql.SQLException
Convert a ResultSet row into a Map. This implementation returns a Map with case insensitive column names as keys. Calls to map.get("COL") and map.get("col") return the same value.

定義:
インタフェース RowProcessor 内の toMap
パラメータ:
rs - ResultSet that supplies the map data
戻り値:
the newly created Map
例外:
java.sql.SQLException - if a database access error occurs
関連項目:
RowProcessor.toMap(java.sql.ResultSet)