|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
public interface IdGenerator
識別子のジェネレータです。
generatePreInsert(IdGenerationConfig) と
generatePostInsert(IdGenerationConfig, Statement) のどちらか片方が
null ではない値を返さなければいけません。
このインタフェースの実装は、引数なしの public なコンストラクタを持たなければいけません。
このインタフェースの実装はスレッドセーフでなければいけません。
| メソッドの概要 | |
|---|---|
Long |
generatePostInsert(IdGenerationConfig config,
Statement statement)
INSERTの実行後に識別子を生成します。 |
Long |
generatePreInsert(IdGenerationConfig config)
INSERTの実行前に識別子を生成します。 |
GenerationType |
getGenerationType()
識別子を生成する方法を返します。 |
boolean |
includesIdentityColumn(IdGenerationConfig config)
INSERT文にIDENTITYカラムを含めるべきかどうかを返します。 |
boolean |
supportsAutoGeneratedKeys(IdGenerationConfig config)
Statement.getGeneratedKeys() をサポートしているかどうかを返します。 |
boolean |
supportsBatch(IdGenerationConfig config)
バッチ処理をサポートしているかどうかを返します。 |
| メソッドの詳細 |
|---|
boolean supportsBatch(IdGenerationConfig config)
config - 識別子生成の設定
trueboolean supportsAutoGeneratedKeys(IdGenerationConfig config)
Statement.getGeneratedKeys() をサポートしているかどうかを返します。
config - 識別子生成の設定
trueboolean includesIdentityColumn(IdGenerationConfig config)
config - 識別子生成の設定
trueLong generatePreInsert(IdGenerationConfig config)
config - 識別子生成の設定
null
JdbcException - 識別子の生成に失敗した場合
Long generatePostInsert(IdGenerationConfig config,
Statement statement)
config - 識別子生成の設定statement - INSERT文を実行した文
null
JdbcException - 識別子の生成に失敗した場合GenerationType getGenerationType()
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||