|
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||
java.lang.Objectjp.go.nict.langrid.dao.GenericHandler<T>
public abstract class GenericHandler<T>
イベントハンドラの一般的な実装。トランザクションリスナとエンティティリスナを実装し、 トランザクション開始時からイベントを重複を排除しながら蓄積し、 トランザクションコミット時に蓄積したイベントを発生させる。
| コンストラクタの概要 | |
|---|---|
GenericHandler()
|
|
| メソッドの概要 | |
|---|---|
protected abstract void |
doRemove(Serializable id)
|
protected abstract void |
doUpdate(Serializable id,
Set<String> updatedProperties)
|
void |
onBeginTransaction()
トランザクションが開始されることを通知する。 |
void |
onCollectionEntityRecreate(Serializable ownerId,
Class<T> ownerClass,
Serializable entityId,
Object entity)
エンティティのコレクション要素が再作成されたことを通知する。 |
void |
onCollectionEntityRemove(Serializable ownerId,
Class<T> ownerClass,
String collectionPropertyName,
Serializable entityId,
Class<?> entityClass)
エンティティのコレクション要素が削除されたことを通知する。 |
void |
onCollectionEntityUpdate(Serializable ownerId,
Class<T> ownerClass,
String collectionPropertyName,
Serializable entityId,
Object entity)
エンティティのコレクション要素が更新されたことを通知する。 |
void |
onCommitTransaction()
トランザクションがコミットされたことを通知する。 |
void |
onDelete(Serializable id,
Class<T> clazz)
エンティティの削除がDBに反映されたことを通知する。 |
void |
onInsert(Serializable id,
T entity)
エンティティの追加がDBに反映されたことを通知する。 |
protected abstract void |
onNotificationEnd()
|
protected abstract boolean |
onNotificationStart()
|
void |
onRollbackTransaction()
トランザクションがロールバックされたことを通知する。 |
void |
onUpdate(Serializable id,
T entity,
String[] modifiedProperties)
エンティティへの更新がDBに反映されたことを通知する。 |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public GenericHandler()
| メソッドの詳細 |
|---|
public void onInsert(Serializable id,
T entity)
EntityListener の記述:
EntityListener<T> 内の onInsertid - エンティティのIDentity - エンティティ
public void onUpdate(Serializable id,
T entity,
String[] modifiedProperties)
EntityListener の記述:
EntityListener<T> 内の onUpdateid - エンティティのIDentity - エンティティmodifiedProperties - 変更されたプロパティ
public void onDelete(Serializable id,
Class<T> clazz)
EntityListener の記述:
EntityListener<T> 内の onDeleteid - エンティティのIDclazz - エンティティのクラス
public void onCollectionEntityRecreate(Serializable ownerId,
Class<T> ownerClass,
Serializable entityId,
Object entity)
EntityListener の記述:
EntityListener<T> 内の onCollectionEntityRecreateownerId - エンティティのIDentityId - 要素のIDentity - 要素
public void onCollectionEntityUpdate(Serializable ownerId,
Class<T> ownerClass,
String collectionPropertyName,
Serializable entityId,
Object entity)
EntityListener の記述:
EntityListener<T> 内の onCollectionEntityUpdateownerId - エンティティのIDentityId - 要素のIDentity - 要素
public void onCollectionEntityRemove(Serializable ownerId,
Class<T> ownerClass,
String collectionPropertyName,
Serializable entityId,
Class<?> entityClass)
EntityListener の記述:
EntityListener<T> 内の onCollectionEntityRemoveownerId - エンティティのIDentityId - 要素のIDentityClass - 要素のクラスpublic void onBeginTransaction()
TransactionListener の記述:
TransactionListener 内の onBeginTransactionpublic void onCommitTransaction()
TransactionListener の記述:
TransactionListener 内の onCommitTransactionpublic void onRollbackTransaction()
TransactionListener の記述:
TransactionListener 内の onRollbackTransactionprotected abstract boolean onNotificationStart()
protected abstract void doUpdate(Serializable id,
Set<String> updatedProperties)
protected abstract void doRemove(Serializable id)
protected abstract void onNotificationEnd()
|
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||