1 package org.hibernate.ejb.callback; 3 4 import org.hibernate.event.def.DefaultDeleteEventListener; 5 import org.hibernate.event.EventSource; 6 import org.hibernate.persister.entity.EntityPersister; 7 8 13 public class EJB3DeleteEventListener extends DefaultDeleteEventListener { 15 private EntityCallbackHandler callbackHandler; 16 17 public EJB3DeleteEventListener(EntityCallbackHandler callbackHandler) { 18 super(); 19 this.callbackHandler = callbackHandler; 20 } 21 22 @Override protected boolean invokeDeleteLifecycle(EventSource session, Object entity, EntityPersister persister) { 23 callbackHandler.preRemove( entity ); 24 return super.invokeDeleteLifecycle( session, entity, persister ); 25 } 26 27 } 28 | Popular Tags |