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 4406 2004-03-19 11:57:20Z benoitf $
23: * --------------------------------------------------------------------------
24: */
25:
26: package org.objectweb.jonas.jtests.beans.transacted;
27:
28: import javax.ejb.EntityBean;
29: import javax.ejb.EntityContext;
30:
31: import org.objectweb.util.monolog.api.BasicLevel;
32:
33: /**
34: * Entity bean with container managed persistence version 1.
35: */
36: public class SimpleEC extends SimpleEC2 implements EntityBean {
37:
38: protected EntityContext entityContext;
39:
40: // Bean state (CMP v1)
41: public String accno; // PK
42: public String customer;
43: public long balance;
44: public int timerIdent;
45: public int timerCount;
46:
47: // Accessors and setters implementation
48: public String getAccno() {
49: return this .accno;
50: }
51:
52: public void setAccno(String accno) {
53: this .accno = accno;
54: }
55:
56: public String getCustomer() {
57: return this .customer;
58: }
59:
60: public void setCustomer(String customer) {
61: this .customer = customer;
62: }
63:
64: public long getBalance() {
65: return this .balance;
66: }
67:
68: public void setBalance(long balance) {
69: this .balance = balance;
70: }
71:
72: public int getTimerIdent() {
73: logger.log(BasicLevel.DEBUG, "");
74: return timerIdent;
75: }
76:
77: public void setTimerIdent(int id) {
78: logger.log(BasicLevel.DEBUG, "");
79: timerIdent = id;
80: }
81:
82: public int getTimerCount() {
83: logger.log(BasicLevel.DEBUG, "");
84: return timerCount;
85: }
86:
87: public void setTimerCount(int cnt) {
88: logger.log(BasicLevel.DEBUG, "");
89: timerCount = cnt;
90: }
91:
92: }
|