org.seasar.doma.jdbc.entity
クラス GeneratedIdPropertyType<E,V extends Number>

java.lang.Object
  上位を拡張 org.seasar.doma.jdbc.entity.BasicPropertyType<E,V>
      上位を拡張 org.seasar.doma.jdbc.entity.GeneratedIdPropertyType<E,V>
すべての実装されたインタフェース:
org.seasar.doma.internal.jdbc.criteria.ColumnCriterion<V>, org.seasar.doma.internal.jdbc.criteria.Criterion<V>, org.seasar.doma.internal.jdbc.criteria.OrderItemCriterion<V>, EntityPropertyType<E,V>

public abstract class GeneratedIdPropertyType<E,V extends Number>
extends BasicPropertyType<E,V>

生成される識別子のプロパティ型です。

作成者:
taedium

フィールドの概要
protected  IdGenerator idGenerator
          識別子のジェネレータ
 
クラス org.seasar.doma.jdbc.entity.BasicPropertyType から継承されたフィールド
columnName, entityPropertyClass, insertable, name, updatable
 
コンストラクタの概要
protected GeneratedIdPropertyType(Class<V> entityPropertyClass, String name, String columnName, IdGenerator idGenerator)
          インスタンスを構築します。
 
メソッドの概要
abstract  NumberWrapper<V> getWrapper(E entity)
          値のラッパーを返します。
 boolean isAutoGeneratedKeysSupported(IdGenerationConfig config)
          バStatement.getGeneratedKeys() をサポートしているかどうかを返します。
 boolean isBatchSupported(IdGenerationConfig config)
          バッチ挿入での識別子生成がサポートされているかどうかを返します。
protected  boolean isGenerationTypeSupported(GenerationType generationType, Dialect dialect)
          識別子を生成する方法がサポートされているかどうかを返します。
 boolean isId()
          識別子かどうかを返します。
 boolean isIncluded(IdGenerationConfig config)
          識別子がINSERT文に含まれるかどうかを返します。
 void postInsert(E entity, IdGenerationConfig config, Statement statement)
          INSERTの実行後に識別子の生成を行います。
 void preInsert(E entity, IdGenerationConfig config)
          INSERTの実行前に識別子を生成します。
 void validateGenerationStrategy(IdGenerationConfig config)
          識別子の生成方法を検証します。
 
クラス org.seasar.doma.jdbc.entity.BasicPropertyType から継承されたメソッド
accept, getColumnName, getName, getType, isInsertable, isUpdatable, isVersion
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

idGenerator

protected final IdGenerator idGenerator
識別子のジェネレータ

コンストラクタの詳細

GeneratedIdPropertyType

protected GeneratedIdPropertyType(Class<V> entityPropertyClass,
                                  String name,
                                  String columnName,
                                  IdGenerator idGenerator)
インスタンスを構築します。

パラメータ:
entityPropertyClass - プロパティのクラス
name - プロパティの名前
columnName - カラム名
idGenerator - 識別子のジェネレータ
メソッドの詳細

isId

public boolean isId()
インタフェース EntityPropertyType の記述:
識別子かどうかを返します。

定義:
インタフェース EntityPropertyType<E,V extends Number> 内の isId
オーバーライド:
クラス BasicPropertyType<E,V extends Number> 内の isId
戻り値:
識別子の場合 true

validateGenerationStrategy

public void validateGenerationStrategy(IdGenerationConfig config)
識別子の生成方法を検証します。

パラメータ:
config - 識別子の生成に関する設定

isGenerationTypeSupported

protected boolean isGenerationTypeSupported(GenerationType generationType,
                                            Dialect dialect)
識別子を生成する方法がサポートされているかどうかを返します。

パラメータ:
generationType - 識別子の生成方法
dialect - 方言
戻り値:
サポートされている場合 true

isIncluded

public boolean isIncluded(IdGenerationConfig config)
識別子がINSERT文に含まれるかどうかを返します。

パラメータ:
config - 識別子の生成に関する設定
戻り値:
含まれる場合 true

isBatchSupported

public boolean isBatchSupported(IdGenerationConfig config)
バッチ挿入での識別子生成がサポートされているかどうかを返します。

パラメータ:
config - 識別子の生成に関する設定
戻り値:
サポートされている場合 true

isAutoGeneratedKeysSupported

public boolean isAutoGeneratedKeysSupported(IdGenerationConfig config)
Statement.getGeneratedKeys() をサポートしているかどうかを返します。

パラメータ:
config - 識別子の生成に関する設定
戻り値:
サポートされている場合 true

preInsert

public void preInsert(E entity,
                      IdGenerationConfig config)
INSERTの実行前に識別子を生成します。

パラメータ:
entity - エンティティ
config - 識別子の生成に関する設定

postInsert

public void postInsert(E entity,
                       IdGenerationConfig config,
                       Statement statement)
INSERTの実行後に識別子の生成を行います。

パラメータ:
entity - エンティティ
config - 識別子の生成に関する設定
statement - INSERT文を実行した文

getWrapper

public abstract NumberWrapper<V> getWrapper(E entity)
インタフェース EntityPropertyType の記述:
値のラッパーを返します。

パラメータ:
entity - エンティティ
戻り値:
値のラッパー


Copyright © 2009-2010 The Seasar Foundation. All Rights Reserved.