org.seasar.doma.jdbc.entity
クラス GeneratedIdProperty<D extends NumberDomain<?,?>>

java.lang.Object
  上位を拡張 org.seasar.doma.jdbc.entity.BasicProperty<D>
      上位を拡張 org.seasar.doma.jdbc.entity.GeneratedIdProperty<D>
すべての実装されたインタフェース:
EntityProperty<D>

public class GeneratedIdProperty<D extends NumberDomain<?,?>>
extends BasicProperty<D>

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

作成者:
taedium

フィールドの概要
protected  IdGenerator idGenerator
          識別子のジェネレータ
 
クラス org.seasar.doma.jdbc.entity.BasicProperty から継承されたフィールド
columnName, domain, insertable, name, updatable
 
コンストラクタの概要
GeneratedIdProperty(String name, String columnName, D domain, IdGenerator idGenerator)
          インスタンスを構築します。
 
メソッドの概要
 boolean isAutoGeneratedKeysSupported(IdGenerationConfig config)
          Statement.getGeneratedKeys() をサポートしているかどうかを返します。
 boolean isBatchSupported(IdGenerationConfig config)
          バッチ処理をサポートしているかどうかを返します。
protected  boolean isGenerationTypeSupported(GenerationType generationType, Dialect dialect)
          方言で識別子を生成する方法がサポートされていれば true を返します。
 boolean isId()
          識別子かどうかを返します。
 boolean isIncluded(IdGenerationConfig config)
          バッチ処理をサポートしているかどうかを返します。
 void postInsert(IdGenerationConfig config, Statement statement)
          INSERTの実行後に識別子を設定します。
 void preInsert(IdGenerationConfig config)
          INSERTの実行前に識別子を設定します。
 void validateGenerationStrategy(IdGenerationConfig config)
          識別子を生成する方法を検証します。
 
クラス org.seasar.doma.jdbc.entity.BasicProperty から継承されたメソッド
getColumnName, getDomain, getName, isInsertable, isTransient, isUpdatable, isVersion, toString
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

idGenerator

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

コンストラクタの詳細

GeneratedIdProperty

public GeneratedIdProperty(String name,
                           String columnName,
                           D domain,
                           IdGenerator idGenerator)
インスタンスを構築します。

パラメータ:
name - 名前
columnName - カラム名
domain - ドメイン
idGenerator - ジェネレータ
例外:
DomaNullPointerException - idGeneratornull の場合
メソッドの詳細

isId

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

定義:
インタフェース EntityProperty<D extends NumberDomain<?,?>> 内の isId
オーバーライド:
クラス BasicProperty<D extends NumberDomain<?,?>> 内の isId
戻り値:
識別子の場合 true

validateGenerationStrategy

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

パラメータ:
config - 識別子生成の設定
例外:
JdbcException - 識別子を生成する方法がサポートされてない場合

isGenerationTypeSupported

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

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

isIncluded

public boolean isIncluded(IdGenerationConfig config)
バッチ処理をサポートしているかどうかを返します。

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

isBatchSupported

public boolean isBatchSupported(IdGenerationConfig config)
バッチ処理をサポートしているかどうかを返します。

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

isAutoGeneratedKeysSupported

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

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

preInsert

public void preInsert(IdGenerationConfig config)
INSERTの実行前に識別子を設定します。

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

postInsert

public void postInsert(IdGenerationConfig config,
                       Statement statement)
INSERTの実行後に識別子を設定します。

パラメータ:
config - 識別子生成の設定
statement - INSERT文を実行した文


Copyright © 2009 The Seasar Foundation. All Rights Reserved.