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