KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > stests > appli > StockHome


1 // StockHome.java
2

3 package org.objectweb.jonas.stests.appli;
4
5 import java.rmi.RemoteException JavaDoc;
6 import java.util.Enumeration JavaDoc;
7
8 import javax.ejb.CreateException JavaDoc;
9 import javax.ejb.EJBHome JavaDoc;
10 import javax.ejb.FinderException JavaDoc;
11
12 /**
13  * Home interface for the bean Stock
14  */

15 public interface StockHome extends EJBHome JavaDoc {
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 JavaDoc whID, Integer JavaDoc itemID, int stockQty)
28         throws CreateException JavaDoc, RemoteException JavaDoc;
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)
41         throws FinderException JavaDoc, RemoteException JavaDoc;
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 JavaDoc findStockByRange(int low, int high)
55         throws FinderException JavaDoc, RemoteException JavaDoc;
56                    
57
58 }
59
Popular Tags