public class EJB3SaveOrUpdateEventListener extends DefaultSaveOrUpdateEventListener implements CallbackHandlerConsumer
DELETED, DETACHED, PERSISTENT, TRANSIENT| Constructor and Description |
|---|
EJB3SaveOrUpdateEventListener() |
EJB3SaveOrUpdateEventListener(EntityCallbackHandler callbackHandler) |
| Modifier and Type | Method and Description |
|---|---|
protected java.io.Serializable |
saveWithGeneratedId(java.lang.Object entity,
java.lang.String entityName,
java.lang.Object anything,
EventSource source,
boolean requiresImmediateIdAccess)
Prepares the save call using a newly generated id.
|
protected java.io.Serializable |
saveWithRequestedId(java.lang.Object entity,
java.io.Serializable requestedId,
java.lang.String entityName,
java.lang.Object anything,
EventSource source)
Prepares the save call using the given requested id.
|
void |
setCallbackHandler(EntityCallbackHandler callbackHandler) |
entityIsDetached, entityIsPersistent, entityIsTransient, getCascadeAction, getUpdateId, invokeUpdateLifecycle, onSaveOrUpdate, performSaveOrUpdate, performUpdate, reassociateIfUninitializedProxy, saveWithGeneratedOrRequestedIdcascadeAfterSave, cascadeBeforeSave, getAssumedUnsaved, getEntityState, getLoggableName, getMergeMap, invokeSaveLifecycle, isVersionIncrementDisabled, performSave, performSaveOrReplicate, substituteValuesIfNecessary, validate, visitCollectionsBeforeSavereassociatepublic EJB3SaveOrUpdateEventListener()
public EJB3SaveOrUpdateEventListener(EntityCallbackHandler callbackHandler)
public void setCallbackHandler(EntityCallbackHandler callbackHandler)
setCallbackHandler in interface CallbackHandlerConsumerprotected java.io.Serializable saveWithRequestedId(java.lang.Object entity,
java.io.Serializable requestedId,
java.lang.String entityName,
java.lang.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 java.io.Serializable saveWithGeneratedId(java.lang.Object entity,
java.lang.String entityName,
java.lang.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).Copyright © 2013. All Rights Reserved.