public class JpaPostInsertEventListener extends Object implements PostInsertEventListener, CallbackRegistryConsumer
Constructor and Description |
---|
JpaPostInsertEventListener() |
JpaPostInsertEventListener(CallbackRegistry callbackRegistry) |
Modifier and Type | Method and Description |
---|---|
void |
injectCallbackRegistry(CallbackRegistry callbackRegistry)
Injection of the CallbackRegistry
|
void |
onPostInsert(PostInsertEvent event) |
boolean |
requiresPostCommitHanding(EntityPersister persister)
Does this listener require that after transaction hooks be registered? Typically this is
true
for post-insert event listeners, but may not be, for example, in JPA cases where there are no callbacks defined
for the particular entity. |
public JpaPostInsertEventListener()
public JpaPostInsertEventListener(CallbackRegistry callbackRegistry)
public void injectCallbackRegistry(CallbackRegistry callbackRegistry)
CallbackRegistryConsumer
injectCallbackRegistry
in interface CallbackRegistryConsumer
callbackRegistry
- The CallbackRegistrypublic void onPostInsert(PostInsertEvent event)
onPostInsert
in interface PostInsertEventListener
public boolean requiresPostCommitHanding(EntityPersister persister)
PostInsertEventListener
true
for post-insert event listeners, but may not be, for example, in JPA cases where there are no callbacks defined
for the particular entity.requiresPostCommitHanding
in interface PostInsertEventListener
persister
- The persister for the entity in question.true
if after transaction callbacks should be added.Copyright © 2001-2017 Red Hat, Inc. All Rights Reserved.