1 25 26 package org.objectweb.jonas.jtests.beans.relation.cascade; 27 28 import java.util.Date ; 29 import javax.ejb.CreateException ; 30 import javax.ejb.EntityBean ; 31 import javax.ejb.EntityContext ; 32 33 import org.objectweb.jonas.common.Log; 34 import org.objectweb.util.monolog.api.BasicLevel; 35 import org.objectweb.util.monolog.api.Logger; 36 37 41 public abstract class CreditCardBean implements EntityBean { 42 43 static protected Logger logger = null; 44 protected EntityContext ejbContext = null; 45 46 public Object ejbCreate(Date exp, String numb, String name) throws CreateException { 47 logger.log(BasicLevel.DEBUG, ""); 48 setExpirationDate(exp); 49 setNumber(numb); 50 setNameOnCard(name); 51 return null; 52 } 53 54 public void ejbPostCreate(Date exp, String numb, String name) { 55 logger.log(BasicLevel.DEBUG, ""); 56 } 57 58 public abstract Integer getId(); 60 public abstract void setId(Integer id); 61 public abstract Date getExpirationDate(); 62 public abstract void setExpirationDate(Date date); 63 public abstract String getNumber(); 64 public abstract void setNumber(String number); 65 public abstract String getNameOnCard(); 66 public abstract void setNameOnCard(String name); 67 68 public void setEntityContext(EntityContext ec) { 70 if (logger == null) 71 logger = Log.getLogger(Log.JONAS_TESTS_PREFIX); 72 logger.log(BasicLevel.DEBUG, ""); 73 ejbContext = ec; 74 } 75 76 public void unsetEntityContext() { 77 logger.log(BasicLevel.DEBUG, ""); 78 ejbContext = null; 79 } 80 81 public void ejbLoad() { 82 logger.log(BasicLevel.DEBUG, ""); 83 } 84 85 public void ejbStore() { 86 logger.log(BasicLevel.DEBUG, ""); 87 } 88 89 public void ejbActivate() { 90 logger.log(BasicLevel.DEBUG, ""); 91 } 92 93 public void ejbPassivate() { 94 logger.log(BasicLevel.DEBUG, ""); 95 } 96 97 public void ejbRemove() throws javax.ejb.RemoveException { 98 logger.log(BasicLevel.DEBUG, ""); 99 } 100 } 101 | Popular Tags |