org.apache.commons.dbutils.handlers
クラス BeanHandler
java.lang.Object
org.apache.commons.dbutils.handlers.BeanHandler
- すべての実装インタフェース:
- ResultSetHandler
- public class BeanHandler
- extends Object
- implements ResultSetHandler
ResultSet の先頭行を JavaBean へ変換する ResultSetHandler の実装です。
このクラスはスレッドセーフです。
ResultSetHandler implementation that converts the first
ResultSet row into a JavaBean. This class is thread safe.
- 作成者:
- Juozas Baliuka, David Graham
- 関連項目:
ResultSetHandler - 翻訳者:
- 小川 環
- 校正者:
- 日置 聡
- 翻訳状況:
- 校正者校正中
- 翻訳更新日:
- 2003/12/22
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BeanHandler
public BeanHandler(Class type)
- BeanHandler の新規インスタンスを作成します。
Creates a new instance of BeanHandler.
- パラメータ:
type - handle() より返されたオブジェクトを作るためのクラス。
The Class that objects returned from handle()
are created from.
BeanHandler
public BeanHandler(Class type,
RowProcessor convert)
- BeanHandler の新規インスタンスを作成します。
Creates a new instance of BeanHandler.
- パラメータ:
type - handle() より返されたオブジェクトを作るためのクラス。
The Class that objects returned from handle()
are created from.
convert - 行を配列へ変換する際に使用する RowProcessor 実装。
The RowProcessor implementation
to use when converting rows into beans.
handle
public Object handle(ResultSet rs)
throws SQLException
ResultSet の先頭行をコンストラクタに渡された Class に基づいた Bean へ変換します。
Convert the first row of the ResultSet into a bean with the
Class given in the constructor.
- 定義:
- インタフェース
ResultSetHandler 内の handle
- パラメータ:
rs - ハンドルする ResultSet。 このメソッドに渡す前に手をつけてはいけません。
The ResultSet to handle. It has not been touched
before being passed to this method.
- 戻り値:
- 初期化されたJavaBean、
ResultSet が0行の場合は null。
An initialized JavaBean or null if there were no
rows in the ResultSet.
- 例外:
SQLException- 関連項目:
ResultSetHandler.handle(java.sql.ResultSet)
このドキュメントは、Ja-Jakartaにより訳されました。 コメントがある場合は report@jajakarta.orgまでお願いします。
Translated into Japanese by jajakarta.org. The original page is here.
Copyright (c) 2002-2003 - Apache Software Foundation