1 25 26 package org.objectweb.jonas.jtests.beans.ebasic; 27 28 import javax.ejb.CreateException ; 29 import javax.ejb.EntityBean ; 30 import javax.ejb.EntityContext ; 31 import javax.ejb.RemoveException ; 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 38 43 44 public abstract class E4QueryEC2 implements EntityBean { 45 46 static protected Logger logger = null; 47 48 protected EntityContext entityContext; 49 50 51 public abstract String getId(); 53 public abstract void setId(String s); 54 public abstract String getFstring(); 55 public abstract void setFstring(String s); 56 public abstract int getFint(); 57 public abstract void setFint(int i); 58 public abstract double getFdouble(); 59 public abstract void setFdouble(double i); 60 61 public void ejbActivate() { 62 logger.log(BasicLevel.DEBUG, ""); 63 } 64 65 public void ejbPassivate() { 66 logger.log(BasicLevel.DEBUG, ""); 67 } 68 69 public void ejbLoad() { 70 logger.log(BasicLevel.DEBUG, ""); 71 } 72 73 public void ejbStore() { 74 logger.log(BasicLevel.DEBUG, ""); 75 } 76 77 public void ejbRemove() throws RemoveException { 78 logger.log(BasicLevel.DEBUG, ""); 79 } 80 81 public void setEntityContext(EntityContext ctx) { 82 if (logger == null) 83 logger = Log.getLogger(Log.JONAS_TESTS_PREFIX); 84 logger.log(BasicLevel.DEBUG, ""); 85 entityContext = ctx; 86 87 } 88 89 public void unsetEntityContext() { 90 logger.log(BasicLevel.DEBUG, ""); 91 } 92 93 public String ejbCreate(String id, String s, int i, double d) throws CreateException { 94 logger.log(BasicLevel.DEBUG, "create "+id+","+s+","+i+","+d); 95 setId(id); 96 setFstring(s); 97 setFint(i); 98 setFdouble(d); 99 return(null); 100 } 101 102 public void ejbPostCreate(String id, String s, int i, double d){ 103 logger.log(BasicLevel.DEBUG, ""); 104 } 105 106 } 107 | Popular Tags |