KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > jtests > beans > ebasic > BDateEC2


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: BDateEC2.java,v 1.2 2004/07/06 10:04:09 durieuxp Exp $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.jonas.jtests.beans.ebasic;
27
28 import org.objectweb.jonas.common.Log;
29 import org.objectweb.util.monolog.api.Logger;
30 import org.objectweb.util.monolog.api.BasicLevel;
31
32 /**
33  *
34  */

35 public abstract class BDateEC2 implements javax.ejb.EntityBean JavaDoc {
36
37     static private Logger logger = null;
38     javax.ejb.EntityContext JavaDoc ejbContext;
39
40  
41     public java.util.Date JavaDoc ejbCreate(int f1,
42                                     int f2,
43                                     java.util.Date JavaDoc f3) throws javax.ejb.CreateException JavaDoc{
44
45         logger.log(BasicLevel.DEBUG, "");
46
47         // Init here the bean fields
48
setField1(f1);
49         setField2(f2);
50         setField3(f3);
51         return null;
52     }
53
54     public void ejbPostCreate(int f1, int f2, java.util.Date JavaDoc f3) {
55         logger.log(BasicLevel.DEBUG, "");
56     }
57
58     // ------------------------------------------------------------------
59
// Persistent fields
60
//
61
// ------------------------------------------------------------------
62
public abstract int getField1();
63     public abstract void setField1(int f1);
64
65     public abstract int getField2();
66     public abstract void setField2(int f2);
67
68     public abstract java.util.Date JavaDoc getField3();
69     public abstract void setField3(java.util.Date JavaDoc f3);
70
71     // ------------------------------------------------------------------
72
// Standard call back methods
73
// ------------------------------------------------------------------
74

75  
76     public void setEntityContext(javax.ejb.EntityContext JavaDoc ctx) {
77         if (logger == null) {
78             logger = Log.getLogger("org.objectweb.jonas_tests");
79         }
80         logger.log(BasicLevel.DEBUG, "");
81         ejbContext = ctx;
82     }
83
84
85     public void unsetEntityContext() {
86         logger.log(BasicLevel.DEBUG, "");
87         ejbContext = null;
88     }
89
90     public void ejbRemove() throws javax.ejb.RemoveException JavaDoc {
91         logger.log(BasicLevel.DEBUG, "");
92     }
93
94  
95     public void ejbLoad() {
96         logger.log(BasicLevel.DEBUG, "");
97     }
98
99
100     public void ejbStore() {
101         logger.log(BasicLevel.DEBUG, "");
102     }
103         
104
105     public void ejbPassivate() {
106         logger.log(BasicLevel.DEBUG, "");
107     }
108
109
110     public void ejbActivate() {
111         logger.log(BasicLevel.DEBUG, "");
112     }
113
114 }
115
116
117
118
Popular Tags