org.hibernate.event.def
Class DefaultDeleteEventListener

java.lang.Object
  extended byorg.hibernate.event.def.DefaultDeleteEventListener
All Implemented Interfaces:
DeleteEventListener, Serializable

public class DefaultDeleteEventListener
extends Object
implements DeleteEventListener

Defines the default delete event listener used by hibernate for deleting entities from the datastore in response to generated delete events.

Author:
Steve Ebersole
See Also:
Serialized Form

Constructor Summary
DefaultDeleteEventListener()
           
 
Method Summary
protected  void cascadeAfterDelete(EventSource session, EntityPersister persister, Object entity)
           
protected  void cascadeBeforeDelete(EventSource session, EntityPersister persister, Object entity, EntityEntry entityEntry)
           
protected  void deleteEntity(EventSource session, Object entity, EntityEntry entityEntry, boolean isCascadeDeleteEnabled, EntityPersister persister)
           
protected  boolean invokeDeleteLifecycle(EventSource session, Object entity, EntityPersister persister)
           
 void onDelete(DeleteEvent event)
          Handle the given delete event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDeleteEventListener

public DefaultDeleteEventListener()
Method Detail

onDelete

public void onDelete(DeleteEvent event)
              throws HibernateException
Handle the given delete event.

Specified by:
onDelete in interface DeleteEventListener
Parameters:
event - The delete event to be handled.
Throws:
HibernateException

deleteEntity

protected final void deleteEntity(EventSource session,
                                  Object entity,
                                  EntityEntry entityEntry,
                                  boolean isCascadeDeleteEnabled,
                                  EntityPersister persister)
                           throws HibernateException
Throws:
HibernateException

invokeDeleteLifecycle

protected boolean invokeDeleteLifecycle(EventSource session,
                                        Object entity,
                                        EntityPersister persister)

cascadeBeforeDelete

protected void cascadeBeforeDelete(EventSource session,
                                   EntityPersister persister,
                                   Object entity,
                                   EntityEntry entityEntry)
                            throws HibernateException
Throws:
HibernateException

cascadeAfterDelete

protected void cascadeAfterDelete(EventSource session,
                                  EntityPersister persister,
                                  Object entity)
                           throws HibernateException
Throws:
HibernateException