01: /*
02: * JOnAS: Java(TM) Open Application Server
03: * Copyright (C) 1999 Bull S.A.
04: * Contact: jonas-team@objectweb.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * 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 5071 2004-07-06 10:04:09Z durieuxp $
23: * --------------------------------------------------------------------------
24: */
25:
26: package org.objectweb.jonas.jtests.beans.ebasic;
27:
28: import javax.ejb.EntityBean;
29:
30: import org.objectweb.util.monolog.api.BasicLevel;
31:
32: /**
33: * This is an entity bean with "container managed persistence version 1.x".
34: * The state of an instance is stored into a relational database.
35: * The following table should exist :
36: * ebasicSimpleEC
37: * c_testname varchar(30) primarey key
38: * c_info integer
39: * c_numtest integer
40: * @author Philippe Durieux, Philippe Coq, Helene Joanin
41: */
42:
43: public class SimpleEC extends SimpleEC2 implements EntityBean {
44:
45: // State of the bean (CMP v1)
46: public int info;
47: public int numtest;
48: public String testname;
49:
50: // Accessors and setters implementation
51:
52: public int getInfo() {
53: logger.log(BasicLevel.DEBUG, "");
54: return info;
55: }
56:
57: public void setInfo(int info) {
58: logger.log(BasicLevel.DEBUG, "");
59: this .info = info;
60: }
61:
62: public int getNumTest() {
63: logger.log(BasicLevel.DEBUG, "");
64: return numtest;
65: }
66:
67: public void setNumTest(int num) {
68: logger.log(BasicLevel.DEBUG, "");
69: this .numtest = num;
70: }
71:
72: public String getTestName() {
73: logger.log(BasicLevel.DEBUG, "");
74: return testname;
75: }
76:
77: public void setTestName(String name) {
78: logger.log(BasicLevel.DEBUG, "");
79: this.testname = name;
80: }
81: }
|