/*
 * JOnAS: Java(TM) Open Application Server
 * Copyright (C) 1999 Bull S.A.
 * Contact: jonas-team@objectweb.org
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 * USA
 *
 * --------------------------------------------------------------------------
 * $Id$
 * --------------------------------------------------------------------------
 */

package org.objectweb.jonas.jtests.beans.ebasic;

import org.ow2.jonas.lib.util.Log;
import org.objectweb.util.monolog.api.Logger;
import org.objectweb.util.monolog.api.BasicLevel;

/**
 *
 */
public  abstract class BDateEC2  implements javax.ejb.EntityBean {

    static private Logger logger = null;
    javax.ejb.EntityContext ejbContext;

 
    public java.util.Date ejbCreate(int f1, 
                                    int f2, 
                                    java.util.Date f3) throws javax.ejb.CreateException{

        logger.log(BasicLevel.DEBUG, "");

        // Init here the bean fields
        setField1(f1);
        setField2(f2);
        setField3(f3);
        return null;
    }

    public void ejbPostCreate(int f1, int f2, java.util.Date f3) {
        logger.log(BasicLevel.DEBUG, "");
    }

    // ------------------------------------------------------------------
    // Persistent fields
    // 
    // ------------------------------------------------------------------
    public abstract int getField1();
    public abstract void setField1(int f1);

    public abstract int getField2();
    public abstract void setField2(int f2);

    public abstract java.util.Date getField3();
    public abstract void setField3(java.util.Date f3);

    // ------------------------------------------------------------------
    // Standard call back methods
    // ------------------------------------------------------------------

 
    public void setEntityContext(javax.ejb.EntityContext ctx) {
        if (logger == null) {
            logger = Log.getLogger("org.objectweb.jonas_tests");
        }
        logger.log(BasicLevel.DEBUG, "");
        ejbContext = ctx;
    }


    public void unsetEntityContext() {
        logger.log(BasicLevel.DEBUG, "");
        ejbContext = null;
    }

    public void ejbRemove() throws javax.ejb.RemoveException {
        logger.log(BasicLevel.DEBUG, "");
    }

 
    public void ejbLoad() {
        logger.log(BasicLevel.DEBUG, "");
    }


    public void ejbStore() {
        logger.log(BasicLevel.DEBUG, "");
    }
        

    public void ejbPassivate() {
        logger.log(BasicLevel.DEBUG, "");
    }


    public void ejbActivate() {
        logger.log(BasicLevel.DEBUG, "");
    }    

}



