org.apache.commons.dbutils.handlers
クラス BeanHandler

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

public class BeanHandler
extends java.lang.Object
implements ResultSetHandler

ResultSetHandler implementation that converts the first ResultSet row into a JavaBean. This class is thread safe.

関連項目:
ResultSetHandler

コンストラクタの概要
BeanHandler(java.lang.Class type)
          Creates a new instance of BeanHandler.
BeanHandler(java.lang.Class type, RowProcessor convert)
          Creates a new instance of BeanHandler.
 
メソッドの概要
 java.lang.Object handle(java.sql.ResultSet rs)
          Convert the first row of the ResultSet into a bean with the Class given in the constructor.
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

BeanHandler

public BeanHandler(java.lang.Class type)
Creates a new instance of BeanHandler.

パラメータ:
type - The Class that objects returned from handle() are created from.

BeanHandler

public BeanHandler(java.lang.Class type,
                   RowProcessor convert)
Creates a new instance of BeanHandler.

パラメータ:
type - The Class that objects returned from handle() are created from.
convert - The RowProcessor implementation to use when converting rows into beans.
メソッドの詳細

handle

public java.lang.Object handle(java.sql.ResultSet rs)
                        throws java.sql.SQLException
Convert the first row of the ResultSet into a bean with the Class given in the constructor.

定義:
インタフェース ResultSetHandler 内の handle
パラメータ:
rs - The ResultSet to handle. It has not been touched before being passed to this method.
戻り値:
An initialized JavaBean or null if there were no rows in the ResultSet.
例外:
java.sql.SQLException - if a database access error occurs
関連項目:
ResultSetHandler.handle(java.sql.ResultSet)