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

java.lang.Object
  拡張org.apache.commons.dbutils.handlers.ScalarHandler
すべての実装インタフェース:
ResultSetHandler

public class ScalarHandler
extends Object
implements ResultSetHandler

ResultSet をオブジェクトへ変換する ResultSetHandler の実装です。 このクラスはスレッドセーフです。

ResultSetHandler implementation that converts one ResultSet column into an Object. This class is thread safe.

作成者:
Juozas Baliuka, David Graham
関連項目:
ResultSetHandler
翻訳者:
小川 環
校正者:
日置 聡
翻訳状況:
校正者校正中
翻訳更新日:
2003/12/22

コンストラクタの概要
ScalarHandler()
          ScalarHandler の新規インスタンスを作成します。
ScalarHandler(int columnIndex)
          ScalarHandler の新規インスタンスを作成します。
ScalarHandler(String columnName)
          ScalarHandler の新規インスタンスを作成します。
 
メソッドの概要
 Object handle(ResultSet rs)
          型変換を行う ResultSet.getObject() メソッド経由で、 ResultSet にある一個のカラムをオブジェクトとして返します。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

ScalarHandler

public ScalarHandler()
ScalarHandler の新規インスタンスを作成します。 先頭のカラムは handle() から返されます。
Creates a new instance of ScalarHandler. The first column will be returned from handle().


ScalarHandler

public ScalarHandler(int columnIndex)
ScalarHandler の新規インスタンスを作成します。
Creates a new instance of ScalarHandler.

パラメータ:
columnIndex - ResultSet から取得するためのカラムのインデックス。
The index of the column to retrieve from the ResultSet.

ScalarHandler

public ScalarHandler(String columnName)
ScalarHandler の新規インスタンスを作成します。
Creates a new instance of ScalarHandler.

パラメータ:
columnName - ResultSet から取得するためのカラムの名称。
The name of the column to retrieve from the ResultSet.
メソッドの詳細

handle

public Object handle(ResultSet rs)
              throws SQLException
型変換を行う ResultSet.getObject() メソッド経由で、 ResultSet にある一個のカラムをオブジェクトとして返します。
Returns one ResultSet column as an object via the ResultSet.getObject() method that performs type conversions.

定義:
インタフェース ResultSetHandler 内の handle
パラメータ:
rs - ハンドルする ResultSet。 このメソッドに渡す前に手をつけてはいけません。
The ResultSet to handle. It has not been touched before being passed to this method.
戻り値:
カラムの値、ResultSet が0行の場合は null
The column or null if there are 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