KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > hero > entity > BnNodePerformerAssignBean


1 /**
2  *
3  * Bonita
4  * Copyright (C) 1999 Bull S.A.
5  * Bull 68 route de versailles 78434 Louveciennes Cedex France
6  * Further information: bonita@objectweb.org
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21  * USA
22  *
23  *
24 --------------------------------------------------------------------------
25  * $Id: BnNodePerformerAssignBean.java,v 1.4 2005/03/18 15:11:42 mvaldes Exp $
26  *
27 --------------------------------------------------------------------------
28  */

29
30 package hero.entity;
31
32 import hero.interfaces.BnNodePerformerAssignPK;
33 import hero.interfaces.BnNodePerformerAssignValue;
34 import hero.interfaces.BnNodeLocal;
35 import hero.interfaces.InvalidValueException;
36 import hero.util.BonitaServiceLocator;
37 import hero.util.BonitaServiceException;
38
39 import javax.ejb.CreateException JavaDoc;
40 import javax.ejb.EJBException JavaDoc;
41 import javax.ejb.EntityBean JavaDoc;
42 import javax.ejb.EntityContext JavaDoc;
43 import javax.ejb.RemoveException JavaDoc;
44
45 /**
46  * The Entity bean represents a BnNodePerformerAssign
47  *
48  * @author Marc Blachon
49  * @version $Revision: 1.4 $
50  *
51  * @ejb:bean name="BnNodePerformerAssign"
52  * display-name="BnNode Performer Assign Entity"
53  * type="CMP"
54  * jndi-name="ejb/hero/BnNodePerformerAssign"
55  * local-jndi-name="ejb/hero/BnNodePerformerAssign_L"
56  * view-type="both"
57  * cmp-version="2.x"
58  * reentrant="true"
59  *
60  * @ejb:transaction type="Supports"
61  *
62  *
63  * @jonas.bean
64  * ejb-name="BnNodePerformerAssign"
65  * jndi-name="ejb/hero/BnNodePerformerAssign"
66  * lock-policy="container-read-committed"
67  * @jonas.jdbc-mapping
68  * jndi-name="bonita"
69  * jdbc-table-name="BnNodePerformerAssign"
70  * @jonas.shared false
71  *
72  * @ejb:finder signature="java.util.Collection findAll()"
73  * query="SELECT object(n) FROM BnNodePerformerAssign n"
74  * transaction-type="Supports"
75  *
76  * @ejb:finder signature="java.util.Collection findByNode(java.lang.String NodeId)" view-type="local"
77  * query="SELECT OBJECT(p) From BnNodePerformerAssign p Where p.bnNode.id = ?1"
78  * transaction-type="Supports"
79  *
80  * @ejb:finder signature="hero.interfaces.NodeMapperLocal findByName(java.lang.String name)" view-type="local"
81  * query="SELECT OBJECT(p) From BnNodePerformerAssign p Where p.name = ?1"
82  * transaction-type="Supports"
83  *
84  *
85  * @ejb.value-object
86  * match="*"
87  * name="BnNodePerformerAssign"
88  *
89  * @jboss:table-name table-name="BnNodePerformerAssign"
90  *
91  * @jboss:create-table create="true"
92  *
93  * @jboss:remove-table remove="false"
94  **/

95 public abstract class BnNodePerformerAssignBean
96    implements EntityBean JavaDoc
97 {
98    
99    // -------------------------------------------------------------------------
100
// Members
101
// -------------------------------------------------------------------------
102

103    public EntityContext JavaDoc mContext;
104    
105    // -------------------------------------------------------------------------
106
// Methods
107
// -------------------------------------------------------------------------
108

109
110    // -------------------------------------------------------------------------
111
// Properties (Getters/Setters)
112
// -------------------------------------------------------------------------
113

114    /**
115    * Retrieve the BnNodePerformerAssign's id.
116    *
117    * @return Returns an int representing the id of this BnNodePerformerAssign.
118    *
119    * @ejb:pk-field
120    *
121    * @ejb:persistence column-name="id"
122    * @jonas.cmp-field-jdbc-mapping
123    * field-name="id"
124    * jdbc-field-name="id"
125    * @ejb:transaction type="Supports"
126    **/

127    public abstract String JavaDoc getId();
128    
129    /**
130    * Set the PerformerAssign's id.
131    *
132    * @param pId The id of this PerformerAssign. Is set at creation time.
133    * @ejb:transaction type="Required"
134    **/

135    public abstract void setId( String JavaDoc pId );
136    
137    
138    /** Retrieve the node associated with the PerformerAssign.
139     *
140     * @return Returns a String representing the Name of the node.
141     * @ejb:interface-method view-type="both"
142     * @ejb:relation name="performerAssign-node" node-name="performerAssign2node" cascade-delete="yes"
143     * @jboss:auto-key-fields
144     * @jonas:automatic-pk="true"
145     * @ejb:transaction type="Supports"
146     *
147     **/

148     public abstract BnNodeLocal getBnNode();
149     
150    
151     /**
152      * Set the BnNode.
153      *
154      * @ejb:interface-method view-type="local"
155      * @param pNode The BnNode of this PerformerAssign.
156      * @ejb:transaction type="Required"
157      **/

158     public abstract void setBnNode( BnNodeLocal pNode );
159
160    /**
161    * Retrieve the Name value.
162    *
163    * @return Returns an String representing the PerformerAssign Name value.
164    *
165    * @ejb:interface-method view-type="both"
166    *
167    * @ejb:persistence column-name="name"
168    * @ejb:transaction type="Supports"
169    **/

170    public abstract String JavaDoc getName();
171    
172    /**
173    * Set the Name value.
174    * @ejb:interface-method view-type="both"
175    * @param key The Name of this PerformerAssign.
176    * @ejb:transaction type="Required"
177    **/

178    public abstract void setName( String JavaDoc performerAssignName );
179
180
181    /**
182    * Retrieve the Type value.
183    *
184    * @return Returns an int representing the Type value.
185    *
186    * @ejb:interface-method view-type="both"
187    *
188    * @ejb:persistence column-name="type"
189    * @ejb:transaction type="Supports"
190    **/

191    public abstract int getType();
192    
193    /**
194    * Set the Type value.
195    * @ejb:interface-method view-type="both"
196    * @param value The Type value of this PerformerAssign.
197    * @ejb:transaction type="Required"
198    **/

199    public abstract void setType( int performerAssignType );
200
201    /**
202    * Retrieve the Name of the property.
203    *
204    * @return Returns an String representing the property Name value.
205    *
206    * @ejb:interface-method view-type="both"
207    *
208    * @ejb:persistence column-name="property"
209    * @ejb:transaction type="Supports"
210    **/

211    public abstract String JavaDoc getPropertyName();
212    
213    /**
214    * Set the property name value.
215    * @ejb:interface-method view-type="both"
216    * @param propertyName The Name of the property containing the user.
217    * @ejb:transaction type="Required"
218    **/

219    public abstract void setPropertyName( String JavaDoc propertyName );
220    
221     /**
222      * @ejb.interface-method
223      * @ejb:transaction type="Supports"
224      */

225     public abstract BnNodePerformerAssignValue getBnNodePerformerAssignValue();
226     
227     /**
228      * @ejb.interface-method
229      * @ejb:transaction type="Required"
230      */

231     public abstract void setBnNodePerformerAssignValue(BnNodePerformerAssignValue v);
232
233
234
235    // -------------------------------------------------------------------------
236
// Framework Callbacks
237
// -------------------------------------------------------------------------
238

239    /**
240    * Create a PerformerAssign based on the supplied PerformerAssign Value Object.
241    *
242    *
243    * @throws InvalidValueException If one of the values are not correct,
244    * this will not roll back the transaction
245    * because the caller has the chance to
246    * fix the problem and try again
247    * @throws EJBException If no new unique ID could be retrieved this will
248    * rollback the transaction because there is no
249    * hope to try again
250    * @throws CreateException Because we have to do so (EJB spec.)
251    *
252    * @ejb:create-method view-type="both"
253    **/

254    public BnNodePerformerAssignPK ejbCreate(BnNodePerformerAssignValue prp )
255       throws
256          InvalidValueException,
257          EJBException JavaDoc,
258          CreateException JavaDoc
259    {
260        setBnNodePerformerAssignValue(prp);
261        this.setId(hero.interfaces.BnNodePerformerAssignUtil.generateGUID(this));
262       // This is only possible in CMPs. Otherwise return a valid PK.
263
return null;
264    }
265
266    /**
267    * Create a PerformerAssign based on the supplied parameters.
268    *
269    *
270    * @throws InvalidValueException If one of the values are not correct,
271    * this will not roll back the transaction
272    * because the caller has the chance to
273    * fix the problem and try again
274    * @throws EJBException If no new unique ID could be retrieved this will
275    * rollback the transaction because there is no
276    * hope to try again
277    * @throws CreateException Because we have to do so (EJB spec.)
278    *
279    * @ejb:create-method view-type="both"
280    **/

281    public BnNodePerformerAssignPK ejbCreate(String JavaDoc performerAssignName, int performerAssignType, String JavaDoc propertyName)
282       throws
283          InvalidValueException,
284          EJBException JavaDoc,
285          CreateException JavaDoc
286    {
287        this.setName(performerAssignName);
288        this.setType(performerAssignType);
289        this.setPropertyName(propertyName);
290        this.setId(hero.interfaces.BnNodePerformerAssignUtil.generateGUID(this));
291       // This is only possible in CMPs. Otherwise return a valid PK.
292
return null;
293    }
294
295    public void setEntityContext( EntityContext JavaDoc lContext )
296    {
297       mContext = lContext;
298    }
299    
300    public void unsetEntityContext()
301    {
302       mContext = null;
303    }
304    
305    public void ejbActivate()
306    {
307    }
308    
309    public void ejbPassivate()
310    {
311    }
312    
313    public void ejbLoad()
314    {
315    }
316    
317    public void ejbStore()
318    {
319    }
320    
321    public void ejbRemove()
322       throws
323          RemoveException JavaDoc
324    {
325    }
326  
327 }
328
Popular Tags