01: // StockHome.java
02:
03: package org.objectweb.jonas.stests.appli;
04:
05: import java.rmi.RemoteException;
06: import java.util.Enumeration;
07:
08: import javax.ejb.CreateException;
09: import javax.ejb.EJBHome;
10: import javax.ejb.FinderException;
11:
12: /**
13: * Home interface for the bean Stock
14: */
15: public interface StockHome extends EJBHome {
16: /**
17: * Create a new Stock Item with minimal information.
18: * <p>
19: * @param whID Warehouse ID for the stock item being created, must be unique
20: * @param itemID item id of the stock item
21: * @param stockQty Stock quantity of the stock item
22: * @return Stock
23: * @exception javax.ejb.CreateException Creation Exception
24: * @exception java.rmi.RemoteException Remote Exception
25: */
26:
27: public Stock create(String whID, Integer itemID, int stockQty)
28: throws CreateException, RemoteException;
29:
30: /**
31: * Retrieve an individual stock item by their stock ID which is combination of
32: * warehouse id and item id.
33: * <p>
34: * @param primaryKey Primary key to find the stock item with
35: * @return Stock
36: * @exception javax.ejb.FinderException Find Exception
37: * @exception java.rmi.RemoteException Remote Exception
38: */
39:
40: public Stock findByPrimaryKey(StockID pk) throws FinderException,
41: RemoteException;
42:
43: /**
44: * Retrieve all of the stock items within a minimum and maximum quantity range.
45: * <p>
46: * <strong>Note:</strong>This returns a list of 1 or more stock items within the range.
47: * @param low minimum quantity in the range
48: * @param high maximum quantity in the range
49: * @return Stock items
50: * @exception javax.ejb.FinderException Find Exception
51: * @exception java.rmi.RemoteException Remote Exception
52: */
53:
54: public Enumeration findStockByRange(int low, int high)
55: throws FinderException, RemoteException;
56:
57: }
|