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 3845 2003-12-05 14:19:55Z legrasi $
23: * --------------------------------------------------------------------------
24: */
25:
26: package org.objectweb.jonas.jtests.beans.fbasic;
27:
28: import javax.ejb.EJBException;
29: import javax.ejb.EntityBean;
30: import javax.ejb.EntityContext;
31: import javax.ejb.RemoveException;
32: import javax.ejb.CreateException;
33: import javax.ejb.EntityContext;
34:
35: /**
36: * This is an entity bean with "container managed persistence version 1.x".
37: * The state of an instance is stored into a relational database.
38: * The following table should exist :
39: * ebasicSimpleEC
40: * c_testname varchar(30) primarey key
41: * c_info integer
42: * c_numtest integer
43: * @author Philippe Durieux, Philippe Coq, Helene Joanin
44: */
45:
46: public class SimpleEC extends SimpleEC2 implements EntityBean {
47:
48: // State of the bean (CMP v1)
49: public int info;
50: public int numtest;
51: public String testname;
52:
53: // Accessors and setters implementation
54:
55: public int getInfo() {
56: // logger.log(BasicLevel.DEBUG, "");
57: return info;
58: }
59:
60: public void setInfo(int info) {
61: //loggerlog(BasicLevel.DEBUG, "");
62: this .info = info;
63: }
64:
65: public int getNumTest() {
66: //logger.log(BasicLevel.DEBUG, "");
67: return numtest;
68: }
69:
70: public void setNumTest(int num) {
71: // logger.log(BasicLevel.DEBUG, "");
72: this .numtest = num;
73: }
74:
75: public String getTestName() {
76: //logger.log(BasicLevel.DEBUG, "");
77: return testname;
78: }
79:
80: public void setTestName(String name) {
81: //logger.log(BasicLevel.DEBUG, "");
82: this.testname = name;
83: }
84: }
|