// ItemHome.java

package org.objectweb.jonas.stests.appli;

import java.rmi.RemoteException;
import java.util.Enumeration;

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

/**
 * Home interface for the Item.  This will handle all lifecycle
 * related operations for the class of Items:  creation, location,
 * deletion.
 * <p>
 * Several finder methods are provided to locate items according
 * to various search criteria.
 */

public interface ItemHome extends EJBHome {

/**
 * Creates an item bean
 * <p>
 * @param id an Integer which represents the item id
 * @param name a String which represents the item name
 * @param price a float which represents the price
 * @param data a String which contains additional information about the item
 * @return the Item bean created
 * @exception javax.ejb.CreateException Creation Exception
 * @exception java.rmi.RemoteException Remote Exception
 */

  public Item create(Integer id, String name, float price, String data)
    throws RemoteException, CreateException;
	
 /**
  * Finds an item using the primary key
  * <p>
  * @param primaryKey an Integer which is the key for the desired item
  * @return the Item bean that matches the key
  * @exception javax.ejb.FinderException Find Exception
  * @exception java.rmi.RemoteException Remote Exception
  */
  public Item findByPrimaryKey(Integer primaryKey)
    throws FinderException, RemoteException;
	

 /**
  * Finds all items
  * <p>
  * @exception javax.ejb.FinderException Find Exception
  * @exception java.rmi.RemoteException Remote Exception
  * @return an Enumeration of Item beans
  */

  public Enumeration findAllItems( )
    throws FinderException, RemoteException;
	

 /**
  * Finds items by name
  * <p>
  * @param name a String which is the name of the desired items
  * @return an Enumeration of Item beans that match the name
  * @exception javax.ejb.FinderException Find Exception
  * @exception java.rmi.RemoteException Remote Exception
  */

  public Enumeration findByName(String name)
    throws FinderException, RemoteException;
	

 /**
  * Finds items by price
  * <p>
  * @param name a float which is the price of the desired items
  * @return an Enumeration of Item beans that match the price
  * @exception javax.ejb.FinderException Find Exception
  * @exception java.rmi.RemoteException Remote Exception
  */

  public Enumeration findByPrice(Float price)
    throws FinderException, RemoteException;
	



}
