KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > jtests > beans > fbasic > PersonEC


1 /*
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * --------------------------------------------------------------------------
22  * $Id: PersonEC.java,v 1.1 2003/12/05 14:16:52 legrasi Exp $
23  * --------------------------------------------------------------------------
24  */

25
26 /**
27  * This is an entity bean with "container managed persistence version 1.x".
28  * This bean is used to test an entity with an unknown primary key class at the development phase.
29  * @author Helene Joanin
30  */

31
32 package org.objectweb.jonas.jtests.beans.fbasic;
33
34 import java.rmi.RemoteException JavaDoc;
35 import java.sql.Connection JavaDoc;
36 import java.sql.PreparedStatement JavaDoc;
37 import java.sql.ResultSet JavaDoc;
38 import java.sql.SQLException JavaDoc;
39 import java.sql.Statement JavaDoc;
40 import java.util.Collection JavaDoc;
41 import java.util.Vector JavaDoc;
42 import javax.ejb.CreateException JavaDoc;
43 import javax.ejb.DuplicateKeyException JavaDoc;
44 import javax.ejb.EJBObject JavaDoc;
45 import javax.ejb.EJBException JavaDoc;
46 import javax.ejb.EntityBean JavaDoc;
47 import javax.ejb.EntityContext JavaDoc;
48 import javax.ejb.FinderException JavaDoc;
49 import javax.ejb.ObjectNotFoundException JavaDoc;
50 import javax.ejb.RemoveException JavaDoc;
51 import javax.naming.Context JavaDoc;
52 import javax.naming.InitialContext JavaDoc;
53 import javax.naming.NamingException JavaDoc;
54 import javax.sql.DataSource JavaDoc;
55 import javax.transaction.NotSupportedException JavaDoc;
56 import javax.transaction.Status JavaDoc;
57 import javax.transaction.SystemException JavaDoc;
58 import javax.transaction.UserTransaction JavaDoc;
59
60
61 /**
62  *
63  */

64 public class PersonEC extends PersonEC2 implements EntityBean JavaDoc {
65
66     // ------------------------------------------------------------------
67
// State of the bean (CMP v1)
68
// They must be public for Container Managed Persistence.
69
// ------------------------------------------------------------------
70
public Integer JavaDoc number;
71     public String JavaDoc name;
72
73     // ------------------------------------------------------------------
74
// Accessors and setters implementation
75
// ------------------------------------------------------------------
76

77     /**
78      * getNumber
79      */

80     public Integer JavaDoc getNumber() {
81
82     return number;
83     }
84     /**
85      * setNumber
86      */

87     public void setNumber(Integer JavaDoc num) {
88
89     number = num;
90     }
91
92     /**
93      * getName
94      */

95     public String JavaDoc getName() {
96
97     return name;
98     }
99     /**
100      * setName
101      */

102     public void setName(String JavaDoc s) {
103
104     name = new String JavaDoc(s);
105     }
106
107 }
108
Popular Tags