KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > jtests > beans > ebasic > SimpleEC


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: SimpleEC.java,v 1.5 2004/07/06 10:04:09 durieuxp Exp $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.jonas.jtests.beans.ebasic;
27
28 import javax.ejb.EntityBean JavaDoc;
29
30 import org.objectweb.util.monolog.api.BasicLevel;
31
32
33 /**
34  * This is an entity bean with "container managed persistence version 1.x".
35  * The state of an instance is stored into a relational database.
36  * The following table should exist :
37  * ebasicSimpleEC
38  * c_testname varchar(30) primarey key
39  * c_info integer
40  * c_numtest integer
41  * @author Philippe Durieux, Philippe Coq, Helene Joanin
42  */

43
44 public class SimpleEC extends SimpleEC2 implements EntityBean JavaDoc {
45
46     // State of the bean (CMP v1)
47
public int info;
48     public int numtest;
49     public String JavaDoc testname;
50
51
52     // Accessors and setters implementation
53

54     public int getInfo() {
55         logger.log(BasicLevel.DEBUG, "");
56         return info;
57     }
58     public void setInfo(int info) {
59         logger.log(BasicLevel.DEBUG, "");
60         this.info = info;
61     }
62
63     public int getNumTest() {
64         logger.log(BasicLevel.DEBUG, "");
65         return numtest;
66     }
67     public void setNumTest(int num) {
68         logger.log(BasicLevel.DEBUG, "");
69         this.numtest = num;
70     }
71
72     public String JavaDoc getTestName() {
73         logger.log(BasicLevel.DEBUG, "");
74         return testname;
75     }
76     public void setTestName(String JavaDoc name) {
77         logger.log(BasicLevel.DEBUG, "");
78         this.testname = name;
79     }
80 }
81
Popular Tags