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

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

public class ScalarHandler
extends java.lang.Object
implements ResultSetHandler

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

関連項目:
ResultSetHandler

コンストラクタの概要
ScalarHandler()
          Creates a new instance of ScalarHandler.
ScalarHandler(int columnIndex)
          Creates a new instance of ScalarHandler.
ScalarHandler(java.lang.String columnName)
          Creates a new instance of ScalarHandler.
 
メソッドの概要
 java.lang.Object handle(java.sql.ResultSet rs)
          Returns one ResultSet column as an object via the ResultSet.getObject() method that performs type conversions.
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

ScalarHandler

public ScalarHandler()
Creates a new instance of ScalarHandler. The first column will be returned from handle().


ScalarHandler

public ScalarHandler(int columnIndex)
Creates a new instance of ScalarHandler.

パラメータ:
columnIndex - The index of the column to retrieve from the ResultSet.

ScalarHandler

public ScalarHandler(java.lang.String columnName)
Creates a new instance of ScalarHandler.

パラメータ:
columnName - The name of the column to retrieve from the ResultSet.
メソッドの詳細

handle

public java.lang.Object handle(java.sql.ResultSet rs)
                        throws java.sql.SQLException
Returns one ResultSet column as an object via the ResultSet.getObject() method that performs type conversions.

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