database
b2007092001

org.phosphoresce.commons.database.accessor
クラス ResultTemplateRow

java.lang.Object
  拡張org.phosphoresce.commons.database.accessor.ResultAccessorAbstract
      拡張org.phosphoresce.commons.database.accessor.ResultTemplateRow
すべての実装インタフェース:
ResultAccessor

public final class ResultTemplateRow
extends ResultAccessorAbstract

行情報保持クラス

当クラスはResultSetへの直接参照更新は行われず、常に独立した情報を操作します。
ユーザーによって当オブジェクトが挿入されたタイミングで自身のオブジェクトと同一の情報を保持するカラムオブジェクトが レコードアクセスクラスに新規に発生します。但し、自身のオブジェクト参照がレコードアクセスに挿入される訳ではありません。
あくまでも当オブジェクトはテンプレートクラスとしての位置づけであり、ResultSetとの依存関係は発生しません。
但し、定義情報のみはResultSetへの参照が行われ、妥当性はその情報と比較が行われます。

作成者:
Kitagawa

フィールドの概要
 
クラス org.phosphoresce.commons.database.accessor.ResultAccessorAbstract から継承したフィールド
error, listener, log, resultSet, state
 
メソッドの概要
 ResultTemplateColumn getColumn(int index)
          指定されたカラムインデックスのカラム情報オブジェクトを取得します。
 ResultTemplateColumn getColumn(java.lang.String name)
          指定されたカラム名のカラム情報オブジェクトを取得します。
 ResultColumnDefinition getColumnDefinition(int index)
          指定されたカラムインデックスのカラム定義情報オブジェクトを取得します。
 ResultColumnDefinition getColumnDefinition(java.lang.String name)
          指定されたカラム名のカラム定義情報オブジェクトを取得します。
 ResultRowDefinition getDefinition()
          行定義情報オブジェクトを取得します。
protected  void refreshResult(boolean force)
          ResultSetが現在提供する内容で自身のオブジェクトフィールドの更新を行います。
 java.lang.String toString()
          クラス情報を文字列として提供します。
protected  void updateResult()
          自身が保持する内容をResultSetに対して反映します。
 
クラス org.phosphoresce.commons.database.accessor.ResultAccessorAbstract から継承したメソッド
getError, getResultSetRowIndex, getState, hasError, moveCurser, refreshResult, validateStateListener
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

メソッドの詳細

refreshResult

protected void refreshResult(boolean force)
                      throws ResultSetAccessException,
                             IllegalResultSetLocationIndexException,
                             IllegalResultSetAdjustmentException
ResultSetが現在提供する内容で自身のオブジェクトフィールドの更新を行います。
当クラスはテンプレートクラスである為、定義情報のみの更新が行われます。

定義:
クラス ResultAccessorAbstract 内の refreshResult
パラメータ:
force - 定義情報のみの更新であるため、フラグに関係なく必ず更新が行われます
例外:
ResultSetAccessException - 正常にResultSetへの操作が行えなかった場合に発生
IllegalResultSetLocationIndexException - 不正な位置情報を操作した場合に発生
IllegalResultSetAdjustmentException - ResultSetとの整合性が取られていない場合に発生
関連項目:
ResultAccessorAbstract.refreshResult(boolean)

updateResult

protected void updateResult()
                     throws ResultSetAccessException,
                            IllegalResultSetLocationIndexException,
                            IllegalResultSetAdjustmentException
自身が保持する内容をResultSetに対して反映します。
当クラスはテンプレートクラスである為、ResultSetへの反映は行われることがありません。

定義:
クラス ResultAccessorAbstract 内の updateResult
例外:
ResultSetAccessException - 正常にResultSetへの操作が行えなかった場合に発生
IllegalResultSetLocationIndexException - 不正な位置情報を操作した場合に発生
IllegalResultSetAdjustmentException - ResultSetとの整合性が取られていない場合に発生
関連項目:
ResultAccessorAbstract.updateResult()

getDefinition

public ResultRowDefinition getDefinition()
行定義情報オブジェクトを取得します。

戻り値:
行定義情報オブジェクト

getColumnDefinition

public ResultColumnDefinition getColumnDefinition(int index)
                                           throws IllegalResultSetLocationIndexException
指定されたカラムインデックスのカラム定義情報オブジェクトを取得します。

戻り値:
行定義情報オブジェクト
例外:
IllegalResultSetLocationIndexException - 不正なカラムインデックスが指定された場合に発生

getColumnDefinition

public ResultColumnDefinition getColumnDefinition(java.lang.String name)
                                           throws IllegalResultSetLocationIndexException
指定されたカラム名のカラム定義情報オブジェクトを取得します。

戻り値:
行定義情報オブジェクト
例外:
IllegalResultSetLocationIndexException - 不正なカラムインデックスが指定された場合に発生

getColumn

public ResultTemplateColumn getColumn(int index)
                               throws IllegalResultSetLocationIndexException
指定されたカラムインデックスのカラム情報オブジェクトを取得します。

パラメータ:
index - カラムインデックス(0〜)
戻り値:
カラム情報オブジェクト
例外:
IllegalResultSetLocationIndexException - 不正なカラムインデックスが指定された場合に発生

getColumn

public ResultTemplateColumn getColumn(java.lang.String name)
                               throws IllegalResultSetLocationIndexException
指定されたカラム名のカラム情報オブジェクトを取得します。

パラメータ:
name - カラム名
戻り値:
カラム情報オブジェクト
例外:
IllegalResultSetLocationIndexException - 指定されたカラム名が行に存在しない場合に発生

toString

public java.lang.String toString()
クラス情報を文字列として提供します。

戻り値:
クラス情報文字列
関連項目:
Object.toString()

database
b2007092001