/*
 * JBoss, the OpenSource EJB server
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.ejb3.test.entitycallback;

import javax.persistence.PrePersist;
import javax.persistence.PostPersist;
import javax.persistence.PreRemove;
import javax.persistence.PostRemove;
import javax.persistence.PreUpdate;
import javax.persistence.PostUpdate;
import javax.persistence.PostLoad;

/**
 * @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
 * @version $Revision: 1.3.4.4 $
 */
public class JourneyCallbackListener
{
   @PrePersist
   public void doPreCreate(Object bean)
   {
      System.out.println("Journey doPreCreate");
      CallbackCounterBean.addCallback("Journey", PrePersist.class);
   }

   @PostPersist
   public void doPostCreate(Object bean)
   {
      System.out.println("Journey doPostCreate");
      CallbackCounterBean.addCallback("Journey", PostPersist.class);
   }

   @PreRemove
   public void doPreRemove(Object bean)
   {
      System.out.println("Journey doPreRemove");
      CallbackCounterBean.addCallback("Journey", PreRemove.class);
   }

   @PostRemove
   public void doPostRemove(Object bean)
   {
      System.out.println("Journey doPostRemove");
      CallbackCounterBean.addCallback("Journey", PostRemove.class);
   }

   @PreUpdate
   public void doPreUpdate(Object bean)
   {
      System.out.println("Journey doPreUpdate");
      CallbackCounterBean.addCallback("Journey", PreUpdate.class);
   }

   @PostUpdate
   public void doPostUpdate(Object bean)
   {
      System.out.println("Journey doPostUpdate");
      CallbackCounterBean.addCallback("Journey", PostUpdate.class);
   }

   @PostLoad
   public void doPostLoad(Object bean)
   {
      System.out.println("Journey doPostLoad");
      CallbackCounterBean.addCallback("Journey", PostLoad.class);
   }
   
}
