KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > testGenerateBeans_MicroMarketsTblBean


1 package test;
2
3 import java.util.Collection JavaDoc;
4 import javax.ejb.*;
5
6 /**
7  * This is the bean class for the MicroMarketsTblBean enterprise bean.
8  * Created Dec 18, 2005 11:19:15 PM
9  * @author honza
10  */

11 public abstract class MicroMarketsTblBean implements EntityBean, MicroMarketsTblLocalBusiness {
12     private EntityContext context;
13     
14     // <editor-fold defaultstate="collapsed" desc="EJB infrastructure methods. Click on the + sign on the left to edit the code.">
15
// TODO Consider creating Transfer Object to encapsulate data
16
// TODO Review finder methods
17
/**
18      * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
19      */

20     public void setEntityContext(EntityContext aContext) {
21         context = aContext;
22     }
23     
24     /**
25      * @see javax.ejb.EntityBean#ejbActivate()
26      */

27     public void ejbActivate() {
28         
29     }
30     
31     /**
32      * @see javax.ejb.EntityBean#ejbPassivate()
33      */

34     public void ejbPassivate() {
35         
36     }
37     
38     /**
39      * @see javax.ejb.EntityBean#ejbRemove()
40      */

41     public void ejbRemove() {
42         
43     }
44     
45     /**
46      * @see javax.ejb.EntityBean#unsetEntityContext()
47      */

48     public void unsetEntityContext() {
49         context = null;
50     }
51     
52     /**
53      * @see javax.ejb.EntityBean#ejbLoad()
54      */

55     public void ejbLoad() {
56         
57     }
58     
59     /**
60      * @see javax.ejb.EntityBean#ejbStore()
61      */

62     public void ejbStore() {
63         
64     }
65     // </editor-fold>
66

67     
68     public abstract String JavaDoc getZipCode();
69     public abstract void setZipCode(String JavaDoc zipCode);
70     
71     public abstract Double JavaDoc getRadius();
72     public abstract void setRadius(Double JavaDoc radius);
73     
74     public abstract Double JavaDoc getAreaLength();
75     public abstract void setAreaLength(Double JavaDoc areaLength);
76     
77     public abstract Double JavaDoc getAreaWidth();
78     public abstract void setAreaWidth(Double JavaDoc areaWidth);
79     
80     public abstract Collection JavaDoc getCustomerTblBean();
81     public abstract void setCustomerTblBean(Collection JavaDoc customerTblBean);
82     
83     
84     public String JavaDoc ejbCreate(String JavaDoc zipCode, Double JavaDoc radius, Double JavaDoc areaLength, Double JavaDoc areaWidth) throws CreateException {
85         if (zipCode == null) {
86             throw new CreateException("The field \"zipCode\" must not be null");
87         }
88         
89         // TODO add additional validation code, throw CreateException if data is not valid
90
setZipCode(zipCode);
91         setRadius(radius);
92         setAreaLength(areaLength);
93         setAreaWidth(areaWidth);
94         
95         return null;
96     }
97     
98     public void ejbPostCreate(String JavaDoc zipCode, Double JavaDoc radius, Double JavaDoc areaLength, Double JavaDoc areaWidth) {
99         // TODO populate relationships here if appropriate
100

101     }
102 }
103
Popular Tags