public class DefaultDeleteEventListener extends Object implements DeleteEventListener
Constructor and Description |
---|
DefaultDeleteEventListener() |
Modifier and Type | Method and Description |
---|---|
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.
|
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 deletedHibernateException
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
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.