|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.event.def.AbstractReassociateEventListener org.hibernate.event.def.AbstractSaveEventListener org.hibernate.event.def.DefaultSaveOrUpdateEventListener
Defines the default listener used by Hibernate for handling save-update events.
Field Summary |
Fields inherited from class org.hibernate.event.def.AbstractSaveEventListener |
DELETED, DETACHED, PERSISTENT, TRANSIENT |
Constructor Summary | |
DefaultSaveOrUpdateEventListener()
|
Method Summary | |
protected void |
entityIsDetached(SaveOrUpdateEvent event)
The given save-update event named a detached entity. |
protected Serializable |
entityIsPersistent(SaveOrUpdateEvent event)
|
protected Serializable |
entityIsTransient(SaveOrUpdateEvent event)
The given save-update event named a transient entity. |
protected CascadingAction |
getCascadeAction()
|
protected Serializable |
getUpdateId(Object entity,
EntityPersister persister,
Serializable requestedId,
EntityMode entityMode)
Determine the id to use for updating. |
protected boolean |
invokeUpdateLifecycle(Object entity,
EntityPersister persister,
EventSource source)
|
void |
onSaveOrUpdate(SaveOrUpdateEvent event)
Handle the given update event. |
protected Serializable |
performSaveOrUpdate(SaveOrUpdateEvent event)
|
protected void |
performUpdate(SaveOrUpdateEvent event,
Object entity,
EntityPersister persister)
|
protected boolean |
reassociateIfUninitializedProxy(Object object,
SessionImplementor source)
|
protected Serializable |
saveWithGeneratedOrRequestedId(SaveOrUpdateEvent event)
Save the transient instance, assigning the right identifier |
Methods inherited from class org.hibernate.event.def.AbstractSaveEventListener |
cascadeAfterSave, cascadeBeforeSave, getAssumedUnsaved, getEntityState, getLoggableName, getMergeMap, invokeSaveLifecycle, isVersionIncrementDisabled, performSave, performSaveOrReplicate, saveWithGeneratedId, saveWithRequestedId, substituteValuesIfNecessary, validate, visitCollectionsBeforeSave |
Methods inherited from class org.hibernate.event.def.AbstractReassociateEventListener |
reassociate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultSaveOrUpdateEventListener()
Method Detail |
public void onSaveOrUpdate(SaveOrUpdateEvent event)
onSaveOrUpdate
in interface SaveOrUpdateEventListener
event
- The update event to be handled.protected boolean reassociateIfUninitializedProxy(Object object, SessionImplementor source)
protected Serializable performSaveOrUpdate(SaveOrUpdateEvent event)
protected Serializable entityIsPersistent(SaveOrUpdateEvent event) throws HibernateException
HibernateException
protected Serializable entityIsTransient(SaveOrUpdateEvent event)
event
- The save event to be handled.
protected Serializable saveWithGeneratedOrRequestedId(SaveOrUpdateEvent event)
event
- The initiating event.
protected void entityIsDetached(SaveOrUpdateEvent event)
event
- The update event to be handled.protected Serializable getUpdateId(Object entity, EntityPersister persister, Serializable requestedId, EntityMode entityMode)
entity
- The entity.persister
- The entity persisterrequestedId
- The requested identifierentityMode
- The entity mode.
TransientObjectException
- If the entity is considered transient.protected void performUpdate(SaveOrUpdateEvent event, Object entity, EntityPersister persister) throws HibernateException
HibernateException
protected boolean invokeUpdateLifecycle(Object entity, EntityPersister persister, EventSource source)
protected CascadingAction getCascadeAction()
getCascadeAction
in class AbstractSaveEventListener
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |