|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.event.def.DefaultDeleteEventListener
Defines the default delete event listener used by hibernate for deleting entities from the datastore in response to generated delete events.
Constructor Summary | |
DefaultDeleteEventListener()
|
Method Summary | |
protected void |
cascadeAfterDelete(EventSource session,
EntityPersister persister,
Object entity,
Set transientEntities)
|
protected void |
cascadeBeforeDelete(EventSource session,
EntityPersister persister,
Object entity,
EntityEntry entityEntry,
Set transientEntities)
|
protected void |
deleteEntity(EventSource session,
Object entity,
EntityEntry entityEntry,
boolean isCascadeDeleteEnabled,
EntityPersister persister,
Set transientEntities)
Perform the entity deletion. |
protected void |
deleteTransientEntity(EventSource session,
Object entity,
boolean cascadeDeleteEnabled,
EntityPersister persister,
Set transientEntities)
We encountered a delete request on a transient instance. |
protected boolean |
invokeDeleteLifecycle(EventSource session,
Object entity,
EntityPersister persister)
|
void |
onDelete(DeleteEvent event)
Handle the given delete event. |
void |
onDelete(DeleteEvent event,
Set transientEntities)
Handle the given delete event. |
protected void |
performDetachedEntityDeletionCheck(DeleteEvent event)
Called when we have recognized an attempt to delete a detached entity. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultDeleteEventListener()
Method Detail |
public void onDelete(DeleteEvent event) throws HibernateException
onDelete
in interface DeleteEventListener
event
- The delete event to be handled.
HibernateException
public void onDelete(DeleteEvent event, Set transientEntities) throws HibernateException
onDelete
in interface DeleteEventListener
event
- The delete event.transientEntities
- The cache of entities already deleted
HibernateException
protected void performDetachedEntityDeletionCheck(DeleteEvent event)
event
- The event.protected void deleteTransientEntity(EventSource session, Object entity, boolean cascadeDeleteEnabled, EntityPersister persister, Set transientEntities)
session
- The session which is the source of the evententity
- The entity being delete processedcascadeDeleteEnabled
- Is cascading of deletes enabledpersister
- The entity persistertransientEntities
- A cache of already visited transient entities
(to avoid infinite recursion).protected final void deleteEntity(EventSource session, Object entity, EntityEntry entityEntry, boolean isCascadeDeleteEnabled, EntityPersister persister, Set transientEntities)
ActionQueue
for execution during flush.
session
- The originating sessionentity
- The entity to deleteentityEntry
- The entity's entry in the PersistenceContext
isCascadeDeleteEnabled
- Is delete cascading enabled?persister
- The entity persister.transientEntities
- A cache of already deleted entities.protected boolean invokeDeleteLifecycle(EventSource session, Object entity, EntityPersister persister)
protected void cascadeBeforeDelete(EventSource session, EntityPersister persister, Object entity, EntityEntry entityEntry, Set transientEntities) throws HibernateException
HibernateException
protected void cascadeAfterDelete(EventSource session, EntityPersister persister, Object entity, Set transientEntities) throws HibernateException
HibernateException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |