KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > cmpdb > testCreateCMPBeansFromDB_MicroMarketsTblBean


1 package cmpdb;
2
3 import javax.ejb.*;
4
5 /**
6  * This is the bean class for the MicroMarketsTblBean enterprise bean.
7  */

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

17     public void setEntityContext(javax.ejb.EntityContext JavaDoc aContext) {
18         context = aContext;
19     }
20     
21     /**
22      * @see javax.ejb.EntityBean#ejbActivate()
23      */

24     public void ejbActivate() {
25         
26     }
27     
28     /**
29      * @see javax.ejb.EntityBean#ejbPassivate()
30      */

31     public void ejbPassivate() {
32         
33     }
34     
35     /**
36      * @see javax.ejb.EntityBean#ejbRemove()
37      */

38     public void ejbRemove() {
39         
40     }
41     
42     /**
43      * @see javax.ejb.EntityBean#unsetEntityContext()
44      */

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

52     public void ejbLoad() {
53         
54     }
55     
56     /**
57      * @see javax.ejb.EntityBean#ejbStore()
58      */

59     public void ejbStore() {
60         
61     }
62     // </editor-fold>
63

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

98     }
99 }
100
Popular Tags