// StockHome.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 bean Stock
 */
public interface StockHome extends EJBHome {
    /**
     * Create a new Stock Item with minimal information.
	 * <p>
     * @param whID Warehouse ID for the stock item being created, must be unique
     * @param itemID item id of the stock item
     * @param stockQty Stock quantity of the stock item  
     * @return Stock
     * @exception javax.ejb.CreateException Creation Exception
     * @exception java.rmi.RemoteException Remote Exception
     */

    public Stock create(String whID, Integer itemID, int stockQty)  
        throws CreateException, RemoteException;

	/**
     * Retrieve an individual stock item by their stock ID which is combination of
     * warehouse id and item id.  
     * <p>
     * @param primaryKey Primary key to find the stock item with
     * @return Stock
     * @exception javax.ejb.FinderException Find Exception
     * @exception java.rmi.RemoteException Remote Exception
	 */

    public Stock findByPrimaryKey(StockID pk)
        throws FinderException, RemoteException;

	/**
     * Retrieve all of the stock items within a minimum and maximum quantity range.
	 * <p>
     * <strong>Note:</strong>This returns a list of 1 or more stock items within the range.
     * @param low minimum quantity in the range
     * @param high maximum quantity in the range 
     * @return Stock items
     * @exception javax.ejb.FinderException Find Exception
     * @exception java.rmi.RemoteException Remote Exception
	 */

    public Enumeration findStockByRange(int low, int high)
        throws FinderException, RemoteException;
                   

}
