1 package ent; 2 3 import javax.ejb.*; 4 5 10 public abstract class MicroMarketsBean implements EntityBean, MicroMarketsLocalBusiness { 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 getZipCode(); 68 public abstract void setZipCode(String zipCode); 69 70 public abstract Double getRadius(); 71 public abstract void setRadius(Double radius); 72 73 public abstract Double getAreaLength(); 74 public abstract void setAreaLength(Double areaLength); 75 76 public abstract Double getAreaWidth(); 77 public abstract void setAreaWidth(Double areaWidth); 78 79 80 public String ejbCreate(String zipCode, Double radius, Double areaLength, Double areaWidth) throws CreateException { 81 if (zipCode == null) { 82 throw new CreateException("The field \"zipCode\" must not be null"); 83 } 84 85 setZipCode(zipCode); 87 setRadius(radius); 88 setAreaLength(areaLength); 89 setAreaWidth(areaWidth); 90 91 return null; 92 } 93 94 public void ejbPostCreate(String zipCode, Double radius, Double areaLength, Double areaWidth) { 95 97 } 98 } 99 | Popular Tags |