public class JpaPersistEventListener extends DefaultPersistEventListener implements CallbackRegistryConsumer
AbstractSaveEventListener.EntityState| Modifier and Type | Field and Description |
|---|---|
static CascadingAction |
PERSIST_SKIPLAZY |
| Constructor and Description |
|---|
JpaPersistEventListener() |
JpaPersistEventListener(CallbackRegistry callbackRegistry) |
| Modifier and Type | Method and Description |
|---|---|
protected CascadingAction |
getCascadeAction() |
void |
injectCallbackRegistry(CallbackRegistry callbackRegistry)
Injection of the CallbackRegistry
|
protected Serializable |
saveWithGeneratedId(Object entity,
String entityName,
Object anything,
EventSource source,
boolean requiresImmediateIdAccess)
Prepares the save call using a newly generated id.
|
protected Serializable |
saveWithRequestedId(Object entity,
Serializable requestedId,
String entityName,
Object anything,
EventSource source)
Prepares the save call using the given requested id.
|
entityIsPersistent, entityIsTransient, getAssumedUnsaved, onPersist, onPersistcascadeAfterSave, cascadeBeforeSave, getEntityState, getLoggableName, getMergeMap, invokeSaveLifecycle, isVersionIncrementDisabled, performSave, performSaveOrReplicate, substituteValuesIfNecessary, visitCollectionsBeforeSavereassociatepublic static final CascadingAction PERSIST_SKIPLAZY
public JpaPersistEventListener()
public JpaPersistEventListener(CallbackRegistry callbackRegistry)
public void injectCallbackRegistry(CallbackRegistry callbackRegistry)
CallbackRegistryConsumerinjectCallbackRegistry in interface CallbackRegistryConsumercallbackRegistry - The CallbackRegistryprotected Serializable saveWithRequestedId(Object entity, Serializable requestedId, String entityName, Object anything, EventSource source)
AbstractSaveEventListenersaveWithRequestedId in class AbstractSaveEventListenerentity - The entity to be saved.requestedId - The id to which to associate the entity.entityName - The name of the entity being saved.anything - Generally cascade-specific information.source - The session which is the source of this save event.protected Serializable saveWithGeneratedId(Object entity, String entityName, Object anything, EventSource source, boolean requiresImmediateIdAccess)
AbstractSaveEventListenersaveWithGeneratedId in class AbstractSaveEventListenerentity - The entity to be savedentityName - The entity-name for the entity to be savedanything - Generally cascade-specific information.source - The session which is the source of this save event.requiresImmediateIdAccess - does the event context require
access to the identifier immediately after execution of this method (if
not, post-insert style id generators may be postponed if we are outside
a transaction).protected CascadingAction getCascadeAction()
getCascadeAction in class DefaultPersistEventListenerCopyright © 2001-2013 Red Hat, Inc. All Rights Reserved.