/*
 * 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$
 * --------------------------------------------------------------------------
 */

// SimpleEHome.java

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

import java.rmi.RemoteException;

import javax.ejb.CreateException;
import javax.ejb.EJBHome;
import javax.ejb.FinderException;

public interface SimpleEHome extends EJBHome {
    // create methods
    public Simple create(int i) throws RemoteException, CreateException; // notsupported
    public Simple createForRequired(long i) throws RemoteException, CreateException; // required
    public Simple createForNever(short i) throws RemoteException, CreateException; // never
    public Simple createForRequiresNew(String i) throws RemoteException, CreateException; // requiresnew
    public Simple createForMandatory(char i) throws RemoteException, CreateException; // mandatory
    public Simple createForSupports(boolean i) throws RemoteException, CreateException; // supports
    public Simple createWithTimer(int i, long dur) throws RemoteException, CreateException;
    // finder methods
    public Simple findByPrimaryKey(String pk) throws RemoteException, FinderException;
    public Simple finder_notsupported() throws RemoteException, FinderException;
    public Simple finder_required() throws RemoteException, FinderException;
    public Simple finder_supports(boolean i) throws RemoteException, FinderException;
    public Simple finder_requiresnew() throws RemoteException, FinderException;
    public Simple finder_mandatory() throws RemoteException, FinderException;
    public Simple finder_never() throws RemoteException, FinderException;
    // home methods: returns true if called inside a tx, false if not.
    public boolean opwith_notsupported() throws RemoteException;
    public boolean opwith_requires_new() throws RemoteException;
    public boolean opwith_required() throws RemoteException;
    public boolean opwith_mandatory() throws RemoteException;
    public boolean opwith_supports() throws RemoteException;
    public boolean opwith_never() throws RemoteException;
}
