|
||||||||||
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
public class 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 java.io.Serializable |
entityIsPersistent(SaveOrUpdateEvent event)
|
protected java.io.Serializable |
entityIsTransient(SaveOrUpdateEvent event)
The given save-update event named a transient entity. |
protected CascadingAction |
getCascadeAction()
|
protected java.io.Serializable |
getUpdateId(java.lang.Object entity,
EntityPersister persister,
java.io.Serializable requestedId,
EntityMode entityMode)
Determine the id to use for updating. |
protected boolean |
invokeUpdateLifecycle(java.lang.Object entity,
EntityPersister persister,
EventSource source)
|
void |
onSaveOrUpdate(SaveOrUpdateEvent event)
Handle the given update event. |
protected java.io.Serializable |
performSaveOrUpdate(SaveOrUpdateEvent event)
|
protected void |
performUpdate(SaveOrUpdateEvent event,
java.lang.Object entity,
EntityPersister persister)
|
protected boolean |
reassociateIfUninitializedProxy(java.lang.Object object,
SessionImplementor source)
|
protected java.io.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(java.lang.Object object, SessionImplementor source)
protected java.io.Serializable performSaveOrUpdate(SaveOrUpdateEvent event)
protected java.io.Serializable entityIsPersistent(SaveOrUpdateEvent event) throws HibernateException
HibernateException
protected java.io.Serializable entityIsTransient(SaveOrUpdateEvent event)
event
- The save event to be handled.
protected java.io.Serializable saveWithGeneratedOrRequestedId(SaveOrUpdateEvent event)
event
- The initiating event.
protected void entityIsDetached(SaveOrUpdateEvent event)
event
- The update event to be handled.protected java.io.Serializable getUpdateId(java.lang.Object entity, EntityPersister persister, java.io.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, java.lang.Object entity, EntityPersister persister) throws HibernateException
HibernateException
protected boolean invokeUpdateLifecycle(java.lang.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 |