KickJava   Java API By Example, From Geeks To Geeks.

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


1 // OrderEntryClerk.java
2

3 package org.objectweb.jonas.stests.appli;
4
5 import java.util.Vector JavaDoc;
6 import java.rmi.RemoteException JavaDoc;
7 import javax.ejb.EJBObject JavaDoc;
8
9 /**
10  * OrderEntryClerk remote interface
11  */

12 public interface OrderEntryClerk extends EJBObject JavaDoc {
13
14    /**
15      * Retrieve all available customers
16      *
17      * @return Vector
18      * @exception java.rmi.RemoteException Remote exception
19      */

20  
21     public Vector JavaDoc findAllCustomers() throws RemoteException JavaDoc;
22
23     /**
24      * Set the current cutomer for this stateful Session Bean.
25      * <p>
26      * @param cid Customer ID to set <i>(Mandatory)</i>
27      * @return void
28      * @exception CpwejbException Application exception
29      * @exception java.rmi.RemoteException Remote exception
30      */

31    public void setCustomer(Integer JavaDoc cid) throws RemoteException JavaDoc, CpwejbException;
32
33    /**
34      * Find all available items
35      * <p>
36      * <strong>Note:</strong> This method will return a Vector of String Arrays
37      * each String Array contains:
38      * <ul>
39      * <li> String 0 - Item ID
40      * <li> String 1 - Item Description
41      * <li> String 2 - Item Price
42      * <li> String 3 - Item Quantity in Stock
43      * <li> String 4 - Item Data
44      * </ul>
45      * @return Vector
46      * @exception java.rmi.RemoteException Remote exception
47      */

48    public Vector JavaDoc findAllItems() throws RemoteException JavaDoc;
49    /**
50      * Retrieve available items within a range of item IDs
51      * <p>
52      * <strong>Note:</strong> This method will return a Vector of String Arrays
53      * each String Array contains:
54      * <ul>
55      * <li> String 0 - Item ID
56      * <li> String 1 - Item Description
57      * <li> String 2 - Item Price
58      * <li> String 3 - Item Quantity in Stock
59      * <li> String 4 - Item Data
60      * </ul>
61      * @return Vector
62      * @exception java.rmi.RemoteException Remote exception
63      */

64   
65     public Vector JavaDoc findRangeOfItems(Integer JavaDoc lowID, Integer JavaDoc highID) throws RemoteException JavaDoc;
66
67  
68     /**
69      * Create an order detail (order line). Add an item and quantity to the order.
70      * <p>
71      * @param iid Item ID to set <i>(Mandatory)</i>
72      * @param quantity amount of the item to be placed on order <i>(Mandatory)</i>
73      * @return void
74      * @exception java.rmi.RemoteException Remote exception
75      */

76  
77     public void addOrderLine(Integer JavaDoc iid, int quantity) throws RemoteException JavaDoc;
78
79  
80     /* The undoAll method : added by BULL */
81     /**
82      * Reset the OrderEntryClerk state ie the current customer and the current order
83      */

84  
85     public void undoAll() throws RemoteException JavaDoc;
86
87  
88     /**
89      * Verify the existence of a customer in this districts tables.
90      * <p>
91      * @param cid Customer ID to check for <i>(Mandatory)</i>
92      * @return boolean
93      * @exception java.rmi.RemoteException Remote exception
94      */

95  
96     public boolean verifyCustomer(Integer JavaDoc cid) throws RemoteException JavaDoc;
97
98  
99     /**
100      * Place an order.
101      * If successful, this method will return the order number
102      * <p>
103      * @return String
104      * @exception CpwejbException Application exception
105      * @exception java.rmi.RemoteException Remote exception
106      */

107  
108     public String JavaDoc placeOrder() throws RemoteException JavaDoc, CpwejbException;
109
110     /**
111      * Get the cutomer for a given order. The order is located by its warehouse,
112      * district, and order number. The returned information is:
113      * <ul>
114      * <li> String 0 - Customer ID
115      * <li> String 1 - Customer first name
116      * <li> String 2 - Customer initials
117      * <li> String 3 - Customer last name
118      * </ul>
119      * <p>
120      * @param wid Warehouse ID
121      * @param did District ID
122      * @param oid Order ID
123      * @return String
124      * @exception CpwejbException Application exception
125      * @exception java.rmi.RemoteException Remote exception
126      */

127
128     public String JavaDoc[] getCustomerForOrder(String JavaDoc wid, int did, int oid)
129         throws RemoteException JavaDoc, CpwejbException;
130
131
132     /**
133      * Get the items list for a given order. The order is located by its warehouse,
134      * district, and order number. The return information is:
135      * <ul>
136      * <li> String 0 - Order line number
137      * <li> String 1 - Item description
138      * <li> String 2 - Item quanity
139      * <li> String 3 - Order line amount
140      * </ul>
141      * <p>
142      * @param wid Warehouse ID
143      * @param did District ID
144      * @param oid Order ID
145      * @return Vector
146      * @exception CpwejbException Application exception
147      * @exception java.rmi.RemoteException Remote exception
148      */

149
150     public Vector JavaDoc getItemsForOrder(String JavaDoc wid, int did, int oid)
151         throws RemoteException JavaDoc, CpwejbException;
152
153     // only for testing purpose
154
public void createAllTables() throws RemoteException JavaDoc, CpwejbException;
155   
156 }
157
Popular Tags