KickJava   Java API By Example, From Geeks To Geeks.

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


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 SIMPLEPARENTBean implements javax.ejb.EntityBean JavaDoc {
9
10     // Variables
11
private EntityContext JavaDoc ctx;
12
13     public SIMPLEPARENTBean() {
14     }
15
16     // Methods
17
public void ejbActivate() {
18     }
19
20     public void ejbPassivate() {
21     }
22
23     public abstract String JavaDoc getSpPkId();
24     public abstract void setSpPkId(String JavaDoc val);
25     public abstract String JavaDoc getSpDesc();
26     public abstract void setSpDesc(String JavaDoc val);
27
28     /*****************************************************************************
29      *
30      * Sets the entity context
31      *
32      *****************************************************************************/

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

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

51     public SIMPLEPARENTPK ejbCreateDEFAULT(String JavaDoc spPkId, String JavaDoc spDesc) throws CreateException JavaDoc {
52         if (spPkId == null) {
53             throw new CreateException JavaDoc("ejbCreate: parameter spPkId cannot be null");
54         }
55         if (spDesc == null) {
56             throw new CreateException JavaDoc("ejbCreate: parameter spDesc cannot be null");
57         }
58         this.setSpPkId(spPkId);
59         this.setSpDesc(spDesc);
60         return null;
61     }
62
63     /*****************************************************************************
64      *
65      * Complete any post creation work here
66      *
67      *****************************************************************************/

68     public void ejbPostCreateDEFAULT(String JavaDoc spPkId, String JavaDoc spDesc) throws CreateException JavaDoc {
69     }
70
71     /*****************************************************************************
72      *
73      * Stores entity bean to persistent storage
74      *
75      *****************************************************************************/

76     public void ejbStore() {
77     }
78
79     /*****************************************************************************
80      *
81      * Removes entity bean from persistent storage
82      *
83      *****************************************************************************/

84     public void ejbRemove() throws RemoveException JavaDoc {
85     }
86
87     /*****************************************************************************
88      *
89      * Loads entity bean from persistent storage
90      *
91      *****************************************************************************/

92     public void ejbLoad() {
93     }
94
95     /*****************************************************************************
96      *
97      * Retrieves SIMPLECHILDLocal relationship data
98      *
99      *****************************************************************************/

100     public abstract java.util.Collection JavaDoc getSimpleparentSimplechild();
101
102     /*****************************************************************************
103      *
104      * Sets SIMPLECHILDLocal relationship data
105      *
106      *****************************************************************************/

107     public abstract void setSimpleparentSimplechild(java.util.Collection JavaDoc var);
108
109 }
110
Popular Tags