org.seasar.eclipselink.jpa.unit
クラス EclipseLinkEntityReader

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

public class EclipseLinkEntityReader
extends Object
implements EntityReader

EclipseLink用のEntityReader実装です。

作成者:
Hidenoshin Yoshida

フィールドの概要
protected  DataSet dataSet
          DataSetオブジェクト
 
コンストラクタの概要
protected EclipseLinkEntityReader()
          コンストラクタ
  EclipseLinkEntityReader(Object entity, EclipseLinkEntityDesc eclipseLinkEntityDesc)
          コンストラクタ
 
メソッドの概要
protected  EclipseLinkEntityDesc getEntityDesc()
          entityDescを返します。
protected  DataRow getRow(Map<String,DataRow> rowMap, DataTable table)
          tableに紐づくDataRowがrowMapに存在していれば返し、無かった場合は新規作成してrowMapにセットして返します。
 DataSet read()
           
protected  void setAdditionalIdRow(Map<String,DataRow> rowMap, org.eclipse.persistence.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オブジェクト

コンストラクタの詳細

EclipseLinkEntityReader

protected EclipseLinkEntityReader()
コンストラクタ


EclipseLinkEntityReader

public EclipseLinkEntityReader(Object entity,
                               EclipseLinkEntityDesc eclipseLinkEntityDesc)
コンストラクタ

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

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,
                                  org.eclipse.persistence.internal.helper.DatabaseField field,
                                  Object value)
継承戦略を使った子クラスのID値をDataRowにセットします。

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

getEntityDesc

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

戻り値:
entityDesc


Copyright © 2008 The Seasar Foundation. All Rights Reserved.