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: AccountEC.java 4406 2004-03-19 11:57:20Z benoitf $
23: * --------------------------------------------------------------------------
24: */
25:
26: package org.objectweb.jonas.jtests.beans.beanexc;
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 persistenceversion 1".
34: * The state of an instance is stored into a relational database.
35: * @author Philippe Durieux, Philippe Coq, Helene Joanin
36: */
37: public class AccountEC extends AccountEC2 implements EntityBean {
38:
39: // ------------------------------------------------------------------
40: // State of the bean (CMP v1)
41: // They must be public for Container Managed Persistence.
42: // ------------------------------------------------------------------
43: public int number;
44: public String customer;
45: public long balance;
46:
47: // ------------------------------------------------------------------
48: // Accessors and setters implementation
49: // ------------------------------------------------------------------
50:
51: public int getNumber() {
52: logger.log(BasicLevel.DEBUG, "number:" + number);
53: return number;
54: }
55:
56: public void setNumber(int n) {
57: logger.log(BasicLevel.DEBUG, "");
58: number = n;
59: }
60:
61: public long getBalance() {
62: logger.log(BasicLevel.DEBUG, "balance:" + number);
63: return balance;
64: }
65:
66: public void setBalance(long d) {
67: logger.log(BasicLevel.DEBUG, "");
68: balance = d;
69: }
70:
71: public String getCustomer() {
72: logger.log(BasicLevel.DEBUG, "");
73: return customer;
74: }
75:
76: public void setCustomer(String c) {
77: logger.log(BasicLevel.DEBUG, "");
78: customer = c;
79: }
80:
81: }
|