KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > stests > manyops > ProductEC


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: ProductEC.java,v 1.3 2004/03/19 11:57:16 benoitf Exp $
23  * --------------------------------------------------------------------------
24  */

25
26 // ProductEC.java
27

28 package org.objectweb.jonas.stests.manyops;
29
30 import javax.ejb.EntityBean JavaDoc;
31
32 import org.objectweb.util.monolog.api.BasicLevel;
33
34 /**
35  * This is an entity bean with "container managed persistence version 1.x".
36  * This class extends the similar entity bean with "CMP version 2.x".
37  * @author Helene Joanin (jonas team)
38  */

39 public class ProductEC extends ProductEC2 implements EntityBean JavaDoc {
40
41     // ------------------------------------------------------------------
42
// State of the bean.
43
// They must be public for Container Managed Persistence.
44
// ------------------------------------------------------------------
45
public String JavaDoc name;
46     public int number;
47     public int price;
48
49     // ------------------------------------------------------------------
50
// Accessors and setters implementation
51
// ------------------------------------------------------------------
52

53     public String JavaDoc getName() {
54     logger.log(BasicLevel.DEBUG, "");
55     return name;
56     }
57
58     public void setName(String JavaDoc s) {
59     logger.log(BasicLevel.DEBUG, "");
60     name = s;
61     }
62
63     public int getNumber() {
64     logger.log(BasicLevel.DEBUG, "");
65     return number;
66     }
67
68     public void setNumber(int n) {
69     logger.log(BasicLevel.DEBUG, "");
70     number = n;
71     }
72
73     public int getPrice() {
74     logger.log(BasicLevel.DEBUG, "");
75     return price;
76     }
77
78     public void setPrice(int n) {
79     logger.log(BasicLevel.DEBUG, "");
80     price = n;
81     }
82
83 }
84
Popular Tags