1 25 26 package eb; 27 28 35 36 37 import javax.ejb.CreateException; 38 import javax.ejb.EntityBean; 39 import javax.ejb.EntityContext; 40 import javax.ejb.RemoveException; 41 42 public abstract class AccountImpl2Bean implements EntityBean { 43 44 protected EntityContext entityContext; 46 47 48 49 57 public Integer ejbCreate(int val_accno, String val_customer, double val_balance) throws CreateException { 58 59 setAccno(val_accno); 61 setCustomer(val_customer); 62 setBalance(val_balance); 63 return null; 64 } 65 66 69 public void ejbPostCreate(int val_accno, String val_customer, double val_balance) { 70 } 72 73 77 78 86 public void ejbActivate() { 87 } 89 90 102 public void ejbLoad() { 103 } 105 106 115 public void ejbPassivate() { 116 } 118 119 136 public void ejbRemove() throws RemoveException { 137 } 139 140 152 public void ejbStore() { 153 } 155 156 170 public void setEntityContext(EntityContext ctx) { 171 172 entityContext = ctx; 174 } 175 176 190 public void unsetEntityContext() { 191 entityContext = null; 192 } 193 194 197 public int getNumber() { 198 return getAccno(); 199 } 200 201 205 206 public abstract String getCustomer(); 207 208 public abstract void setCustomer(String customer); 209 210 public abstract double getBalance(); 211 212 public abstract void setBalance(double balance); 213 214 public abstract int getAccno(); 215 216 public abstract void setAccno(int accno); 217 218 } | Popular Tags |