1 package cmpdb; 2 3 import javax.ejb.*; 4 5 8 public abstract class MicroMarketsBean implements EntityBean, MicroMarketsLocalBusiness { 9 private EntityContext context; 10 11 17 public void setEntityContext(EntityContext aContext) { 18 context = aContext; 19 } 20 21 24 public void ejbActivate() { 25 26 } 27 28 31 public void ejbPassivate() { 32 33 } 34 35 38 public void ejbRemove() { 39 40 } 41 42 45 public void unsetEntityContext() { 46 context = null; 47 } 48 49 52 public void ejbLoad() { 53 54 } 55 56 59 public void ejbStore() { 60 61 } 62 64 65 public abstract String getZipCode(); 66 public abstract void setZipCode(String zipCode); 67 68 public abstract Double getRadius(); 69 public abstract void setRadius(Double radius); 70 71 public abstract Double getAreaLength(); 72 public abstract void setAreaLength(Double areaLength); 73 74 public abstract Double getAreaWidth(); 75 public abstract void setAreaWidth(Double areaWidth); 76 77 78 public String ejbCreate(String zipCode, Double radius, Double areaLength, Double areaWidth) throws CreateException { 79 if (zipCode == null) { 80 throw new CreateException("The field \"zipCode\" must not be null"); 81 } 82 83 setZipCode(zipCode); 85 setRadius(radius); 86 setAreaLength(areaLength); 87 setAreaWidth(areaWidth); 88 89 return null; 90 } 91 92 public void ejbPostCreate(String zipCode, Double radius, Double areaLength, Double areaWidth) { 93 95 } 96 } 97
| Popular Tags
|