1 package test; 2 3 import javax.ejb.*; 4 5 10 public abstract class EntityABean implements EntityBean, EntityARemoteBusiness, EntityALocalBusiness { 11 private EntityContext context; 12 13 19 public void setEntityContext(EntityContext aContext) { 20 context = aContext; 21 } 22 23 26 public void ejbActivate() { 27 28 } 29 30 33 public void ejbPassivate() { 34 35 } 36 37 40 public void ejbRemove() { 41 42 } 43 44 47 public void unsetEntityContext() { 48 context = null; 49 } 50 51 54 public void ejbLoad() { 55 56 } 57 58 61 public void ejbStore() { 62 63 } 64 66 67 public abstract String getKey(); 68 public abstract void setKey(String key); 69 70 71 public String ejbCreate(String key) throws CreateException { 72 if (key == null) { 73 throw new CreateException("The field \"key\" must not be null"); 74 } 75 76 setKey(key); 78 79 return null; 80 } 81 82 public void ejbPostCreate(String key) { 83 85 } 86 } 87 | Popular Tags |