KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > testAddSelectMethod2InEB_TestingEntityBean


1 package test;
2
3 import java.io.IOException JavaDoc;
4 import javax.ejb.*;
5
6 /**
7  * This is the bean class for the TestingEntityBean enterprise bean.
8  * Created 6.5.2005 15:11:14
9  * @author lm97939
10  */

11 public abstract class TestingEntityBean implements EntityBean, TestingEntityRemoteBusiness, TestingEntityLocalBusiness {
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 getKey();
69     public abstract void setKey(String JavaDoc key);
70     
71     
72     public String JavaDoc ejbCreate(String JavaDoc key) throws CreateException {
73         if (key == null) {
74             throw new CreateException("The field \"key\" must not be null");
75         }
76         
77         // TODO add additional validation code, throw CreateException if data is not valid
78
setKey(key);
79         
80         return null;
81     }
82     
83     public void ejbPostCreate(String JavaDoc key) {
84         // TODO populate relationships here if appropriate
85

86     }
87
88     public String JavaDoc testBusinessMethod1() {
89         //TODO implement testBusinessMethod1
90
return null;
91     }
92
93     public String JavaDoc testBusinessMethod2(String JavaDoc a, boolean b) throws Exception JavaDoc {
94         //TODO implement testBusinessMethod2
95
return null;
96     }
97
98     public String JavaDoc ejbCreateTest1() throws CreateException {
99         //TODO implement ejbCreateTest1
100
return null;
101     }
102
103     public void ejbPostCreateTest1() throws CreateException {
104         //TODO implement ejbPostCreateTest1
105
}
106
107     public String JavaDoc ejbCreateTest2(String JavaDoc a, int b) throws CreateException, IOException JavaDoc {
108         //TODO implement ejbCreateTest2
109
return null;
110     }
111
112     public void ejbPostCreateTest2(String JavaDoc a, int b) throws CreateException, IOException JavaDoc {
113         //TODO implement ejbPostCreateTest2
114
}
115
116     public String JavaDoc ejbHomeHomeTestMethod1() {
117         //TODO implement ejbHomeHomeTestMethod1
118
return null;
119     }
120
121     public String JavaDoc ejbHomeHomeTestMethod2(String JavaDoc a, int b) throws Exception JavaDoc {
122         //TODO implement ejbHomeHomeTestMethod2
123
return null;
124     }
125
126     public abstract int ejbSelectByTest1() throws javax.ejb.FinderException JavaDoc;
127
128     public abstract int ejbSelectByTest2(java.lang.String JavaDoc a) throws javax.ejb.FinderException JavaDoc;
129 }
130
Popular Tags