org.seasar.toplink.jpa.unit
クラス TopLinkEntityReader

java.lang.Object
  上位を拡張 org.seasar.toplink.jpa.unit.TopLinkEntityReader
すべての実装されたインタフェース:
DataReader, EntityReader
直系の既知のサブクラス:
TopLinkEntityCollectionReader

public class TopLinkEntityReader
extends Object
implements EntityReader

TopLink Essentials用のEntityReader実装です。

作成者:
Hidenoshin Yoshida

フィールドの概要
protected  DataSet dataSet
          DataSetオブジェクト
 
コンストラクタの概要
protected TopLinkEntityReader()
          コンストラクタ
  TopLinkEntityReader(Object entity, TopLinkEntityDesc topLinkEntityDesc)
          コンストラクタ
 
メソッドの概要
protected  TopLinkEntityDesc getEntityDesc()
          entityDescを返します。
protected  DataRow getRow(Map<String,DataRow> rowMap, DataTable table)
          tableに紐づくDataRowがrowMapに存在していれば返し、無かった場合は新規作成してrowMapにセットして返します。
 DataSet read()
           
protected  void setAdditionalIdRow(Map<String,DataRow> rowMap, oracle.toplink.essentials.internal.helper.DatabaseField field, Object value)
          継承戦略を使った子クラスのID値をDataRowにセットします。
protected  void setupAttributeColumns()
          entityDescからdataSetのカラム定義を生成します。
protected  void setupColumns()
          dataSetのカラム定義を生成します。
protected  void setupDiscriminatorColumn()
          entityDescからInheritancePolicyを取得し、継承関連のカラムをdataSetに定義します。
protected  void setupRow(Object entity)
          dataSetの行データを生成します。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

dataSet

protected final DataSet dataSet
DataSetオブジェクト

コンストラクタの詳細

TopLinkEntityReader

protected TopLinkEntityReader()
コンストラクタ


TopLinkEntityReader

public TopLinkEntityReader(Object entity,
                           TopLinkEntityDesc topLinkEntityDesc)
コンストラクタ

パラメータ:
entity - 対象Entityオブジェクト
topLinkEntityDesc - entityに対応するTopLinkEntityDesc
メソッドの詳細

read

public DataSet read()
定義:
インタフェース DataReader 内の read
関連項目:
DataReader.read()

setupColumns

protected void setupColumns()
dataSetのカラム定義を生成します。


setupAttributeColumns

protected void setupAttributeColumns()
entityDescからdataSetのカラム定義を生成します。


setupDiscriminatorColumn

protected void setupDiscriminatorColumn()
entityDescからInheritancePolicyを取得し、継承関連のカラムをdataSetに定義します。


setupRow

protected void setupRow(Object entity)
dataSetの行データを生成します。

パラメータ:
entity - 対象Entityオブジェクト

getRow

protected DataRow getRow(Map<String,DataRow> rowMap,
                         DataTable table)
tableに紐づくDataRowがrowMapに存在していれば返し、無かった場合は新規作成してrowMapにセットして返します。

パラメータ:
rowMap - テーブル名をキー、DataRowを値に持つMap
table - DataTableオブジェクト
戻り値:

setAdditionalIdRow

protected void setAdditionalIdRow(Map<String,DataRow> rowMap,
                                  oracle.toplink.essentials.internal.helper.DatabaseField field,
                                  Object value)
継承戦略を使った子クラスのID値をDataRowにセットします。

パラメータ:
rowMap - テーブル名をキー、DataRowを値に持つMap
field - DatabaseField
value - ID値

getEntityDesc

protected TopLinkEntityDesc getEntityDesc()
entityDescを返します。

戻り値:
entityDesc


Copyright © 2006-2008 The Seasar Foundation. All Rights Reserved.