001: /*
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 1999 Bull S.A.
004: * Contact: jonas-team@objectweb.org
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * --------------------------------------------------------------------------
022: * $Id: BDateEC2.java 5071 2004-07-06 10:04:09Z durieuxp $
023: * --------------------------------------------------------------------------
024: */
025:
026: package org.objectweb.jonas.jtests.beans.ebasic;
027:
028: import org.objectweb.jonas.common.Log;
029: import org.objectweb.util.monolog.api.Logger;
030: import org.objectweb.util.monolog.api.BasicLevel;
031:
032: /**
033: *
034: */
035: public abstract class BDateEC2 implements javax.ejb.EntityBean {
036:
037: static private Logger logger = null;
038: javax.ejb.EntityContext ejbContext;
039:
040: public java.util.Date ejbCreate(int f1, int f2, java.util.Date f3)
041: throws javax.ejb.CreateException {
042:
043: logger.log(BasicLevel.DEBUG, "");
044:
045: // Init here the bean fields
046: setField1(f1);
047: setField2(f2);
048: setField3(f3);
049: return null;
050: }
051:
052: public void ejbPostCreate(int f1, int f2, java.util.Date f3) {
053: logger.log(BasicLevel.DEBUG, "");
054: }
055:
056: // ------------------------------------------------------------------
057: // Persistent fields
058: //
059: // ------------------------------------------------------------------
060: public abstract int getField1();
061:
062: public abstract void setField1(int f1);
063:
064: public abstract int getField2();
065:
066: public abstract void setField2(int f2);
067:
068: public abstract java.util.Date getField3();
069:
070: public abstract void setField3(java.util.Date f3);
071:
072: // ------------------------------------------------------------------
073: // Standard call back methods
074: // ------------------------------------------------------------------
075:
076: public void setEntityContext(javax.ejb.EntityContext ctx) {
077: if (logger == null) {
078: logger = Log.getLogger("org.objectweb.jonas_tests");
079: }
080: logger.log(BasicLevel.DEBUG, "");
081: ejbContext = ctx;
082: }
083:
084: public void unsetEntityContext() {
085: logger.log(BasicLevel.DEBUG, "");
086: ejbContext = null;
087: }
088:
089: public void ejbRemove() throws javax.ejb.RemoveException {
090: logger.log(BasicLevel.DEBUG, "");
091: }
092:
093: public void ejbLoad() {
094: logger.log(BasicLevel.DEBUG, "");
095: }
096:
097: public void ejbStore() {
098: logger.log(BasicLevel.DEBUG, "");
099: }
100:
101: public void ejbPassivate() {
102: logger.log(BasicLevel.DEBUG, "");
103: }
104:
105: public void ejbActivate() {
106: logger.log(BasicLevel.DEBUG, "");
107: }
108:
109: }
|