KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > jtests > beans > relation > lcp > SIMPLECHILDBean


1 package org.objectweb.jonas.jtests.beans.relation.lcp;
2
3 import javax.ejb.EntityContext JavaDoc;
4 import javax.ejb.RemoveException JavaDoc;
5 import javax.ejb.CreateException JavaDoc;
6
7
8 public abstract class SIMPLECHILDBean implements javax.ejb.EntityBean JavaDoc {
9
10     // Variables
11
private EntityContext JavaDoc ctx;
12
13     public SIMPLECHILDBean() {
14     }
15
16     // Methods
17

18     public void ejbActivate() {
19     }
20
21     public void ejbPassivate() {
22     }
23
24     public abstract String JavaDoc getScPkId();
25     public abstract void setScPkId(String JavaDoc val);
26     public abstract String JavaDoc getScDesc();
27     public abstract void setScDesc(String JavaDoc val);
28
29
30     /*****************************************************************************
31      *
32      * Sets the entity context
33      *
34      *****************************************************************************/

35     public void setEntityContext(EntityContext JavaDoc context) {
36         this.ctx = context;
37     }
38
39     /*****************************************************************************
40      *
41      * Un-sets the entity context
42      *
43      *****************************************************************************/

44     public void unsetEntityContext() {
45         this.ctx = null;
46     }
47
48     /*****************************************************************************
49      *
50      * Creates entity bean in persistent storage
51      *
52      *****************************************************************************/

53     public SIMPLECHILDPK ejbCreateDEFAULT(String JavaDoc scPkId, String JavaDoc scDesc, SIMPLEPARENTLocal _SimplechildSimpleparent) throws CreateException JavaDoc {
54         if (scPkId == null) {
55             throw new CreateException JavaDoc("ejbCreate: parameter scPkId cannot be null");
56         }
57         if (scDesc == null) {
58             throw new CreateException JavaDoc("ejbCreate: parameter scDesc cannot be null");
59         }
60         this.setScPkId(scPkId);
61         this.setScDesc(scDesc);
62         return null;
63     }
64
65     /*****************************************************************************
66      *
67      * Complete any post creation work here
68      *
69      *****************************************************************************/

70     public void ejbPostCreateDEFAULT(String JavaDoc scPkId, String JavaDoc scDesc, SIMPLEPARENTLocal _SimplechildSimpleparent) throws CreateException JavaDoc {
71         this.setSimplechildSimpleparent(_SimplechildSimpleparent);
72     }
73
74     /*****************************************************************************
75      *
76      * Stores entity bean to persistent storage
77      *
78      *****************************************************************************/

79     public void ejbStore() {
80     }
81
82     /*****************************************************************************
83      *
84      * Removes entity bean from persistent storage
85      *
86      *****************************************************************************/

87     public void ejbRemove() throws RemoveException JavaDoc {
88     }
89
90     /*****************************************************************************
91      *
92      * Loads entity bean from persistent storage
93      *
94      *****************************************************************************/

95     public void ejbLoad() {
96     }
97
98     /*****************************************************************************
99      *
100      * Retrieves SIMPLEPARENTLocal relationship data
101      *
102      *****************************************************************************/

103     public abstract SIMPLEPARENTLocal getSimplechildSimpleparent();
104
105     /*****************************************************************************
106      *
107      * Sets SIMPLEPARENTLocal relationship data
108      *
109      *****************************************************************************/

110     public abstract void setSimplechildSimpleparent(SIMPLEPARENTLocal var);
111
112 }
113
Popular Tags