KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > ejb > callback > EJB3PostDeleteEventListener


1 /*
2  * JBoss, the OpenSource EJB server
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.hibernate.ejb.callback;
8
9 import org.hibernate.event.PostDeleteEvent;
10 import org.hibernate.event.PostDeleteEventListener;
11
12 /**
13  * @author <a HREF="mailto:kabir.khan@jboss.org">Kabir Khan</a>
14  * @version $Revision: 1.3 $
15  */

16 public class EJB3PostDeleteEventListener implements PostDeleteEventListener {
17     EntityCallbackHandler callbackHandler;
18
19     public EJB3PostDeleteEventListener(EntityCallbackHandler callbackHandler) {
20         this.callbackHandler = callbackHandler;
21     }
22
23     public void onPostDelete(PostDeleteEvent event) {
24         Object JavaDoc entity = event.getEntity();
25         callbackHandler.postRemove( entity );
26     }
27
28 }
29
Popular Tags