1 7 package org.hibernate.ejb.callback; 8 9 import org.hibernate.event.PostLoadEvent; 10 import org.hibernate.event.PostLoadEventListener; 11 12 16 public class EJB3PostLoadEventListener implements PostLoadEventListener { 17 EntityCallbackHandler callbackHandler; 18 19 public EJB3PostLoadEventListener(EntityCallbackHandler callbackHandler) { 20 this.callbackHandler = callbackHandler; 21 } 22 23 public void onPostLoad(PostLoadEvent event) { 24 Object entity = event.getEntity(); 25 callbackHandler.postLoad( entity ); 26 } 27 28 } 29 | Popular Tags |