KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > edu > rice > rubis > beans > OldItem


1 package edu.rice.rubis.beans;
2
3 import javax.ejb.*;
4 import java.rmi.*;
5
6 /**
7  * This is the Remote Interface of the Old Item Bean.
8  * @author <a HREF="mailto:cecchet@rice.edu">Emmanuel Cecchet</a> and <a HREF="mailto:julie.marguerite@inrialpes.fr">Julie Marguerite</a>
9  * @version 1.1
10  */

11 public interface OldItem extends EJBObject {
12   /**
13    * Get item id.
14    *
15    * @return item id
16    * @exception RemoteException if an error occurs
17    * @since 1.0
18    */

19   public Integer JavaDoc getId() throws RemoteException;
20
21   /**
22    * Get item name. This description is usually a short description of the item.
23    *
24    * @return item name
25    * @exception RemoteException if an error occurs
26    * @since 1.0
27    */

28   public String JavaDoc getName() throws RemoteException;
29
30   /**
31    * Get item description . This is usually an HTML file describing the item.
32    *
33    * @return item description
34    * @exception RemoteException if an error occurs
35    * @since 1.0
36    */

37   public String JavaDoc getDescription() throws RemoteException;
38
39   /**
40    * Get item initial price set by the seller.
41    *
42    * @return item initial price
43    * @exception RemoteException if an error occurs
44    * @since 1.0
45    */

46   public float getInitialPrice() throws RemoteException;
47
48   /**
49    * Get how many of this item are to be sold.
50    *
51    * @return item quantity
52    * @exception RemoteException if an error occurs
53    * @since 1.0
54    */

55   public int getQuantity() throws RemoteException;
56
57   /**
58    * Get item reserve price set by the seller. The seller can refuse to sell if reserve price is not reached.
59    *
60    * @return item reserve price
61    * @exception RemoteException if an error occurs
62    * @since 1.0
63    */

64   public float getReservePrice() throws RemoteException;
65
66   /**
67    * Get item Buy Now price set by the seller. A user can directly by the item at this price (no auction).
68    *
69    * @return item Buy Now price
70    * @exception RemoteException if an error occurs
71    * @since 1.0
72    */

73   public float getBuyNow() throws RemoteException;
74
75   /**
76    * Get item maximum bid (if any) for this item. This value should be the same as doing <pre>SELECT MAX(bid) FROM bids WHERE item_id=?</pre>
77    *
78    * @return current maximum bid or 0 if no bid
79    * @exception RemoteException if an error occurs
80    * @since 1.1
81    */

82   public float getMaxBid() throws RemoteException;
83
84   /**
85    * Get number of bids for this item. This value should be the same as doing <pre>SELECT COUNT(*) FROM bids WHERE item_id=?</pre>
86    *
87    * @return number of bids
88    * @exception RemoteException if an error occurs
89    * @since 1.1
90    */

91   public int getNbOfBids() throws RemoteException;
92
93   /**
94    * Start date of the auction in the format 'YYYY-MM-DD hh:mm:ss'
95    *
96    * @return start date of the auction
97    * @exception RemoteException if an error occurs
98    * @since 1.0
99    */

100   public String JavaDoc getStartDate() throws RemoteException;
101
102   /**
103    * End date of the auction in the format 'YYYY-MM-DD hh:mm:ss'
104    *
105    * @return end date of the auction
106    * @exception RemoteException if an error occurs
107    * @since 1.0
108    */

109   public String JavaDoc getEndDate() throws RemoteException;
110
111   /**
112    * Give the user id of the seller
113    *
114    * @return seller's user id
115    * @exception RemoteException if an error occurs
116    * @since 1.0
117    */

118   public Integer JavaDoc getSellerId() throws RemoteException;
119
120   /**
121    * Give the category id of the item
122    *
123    * @return item's category id
124    * @exception RemoteException if an error occurs
125    * @since 1.0
126    */

127   public Integer JavaDoc getCategoryId() throws RemoteException;
128
129   /**
130    * Get the seller's nickname by finding the Bean corresponding
131    * to the user.
132    *
133    * @return nickname
134    * @exception RemoteException if an error occurs
135    * @since 1.0
136    */

137   public String JavaDoc getSellerNickname() throws RemoteException;
138
139   /**
140    * Get the category name by finding the Bean corresponding to the category Id.
141    *
142    * @return category name
143    * @exception RemoteException if an error occurs
144    * @since 1.0
145    */

146   public String JavaDoc getCategoryName() throws RemoteException;
147
148
149   /**
150    * Set a new item identifier
151    *
152    * @param newId item identifier
153    * @exception RemoteException if an error occurs
154    * @since 1.0
155    */

156   public void setId(Integer JavaDoc newId) throws RemoteException;
157
158   /**
159    * Set a new item name
160    *
161    * @param newName item name
162    * @exception RemoteException if an error occurs
163    * @since 1.0
164    */

165   public void setName(String JavaDoc newName) throws RemoteException;
166
167   /**
168    * Set a new item description
169    *
170    * @param newDescription item description
171    * @exception RemoteException if an error occurs
172    * @since 1.0
173    */

174   public void setDescription(String JavaDoc newDescription) throws RemoteException;
175
176   /**
177    * Set a new initial price for the item
178    *
179    * @param newInitialPrice item initial price
180    * @exception RemoteException if an error occurs
181    * @since 1.0
182    */

183   public void setInitialPrice(float newInitialPrice) throws RemoteException;
184
185   /**
186    * Set a new item quantity
187    *
188    * @param qty item quantity
189    * @exception RemoteException if an error occurs
190    * @since 1.0
191    */

192   public void setQuantity(int qty) throws RemoteException;
193
194   /**
195    * Set a new reserve price for the item
196    *
197    * @param newReservePrice item reserve price
198    * @exception RemoteException if an error occurs
199    * @since 1.0
200    */

201   public void setReservePrice(float newReservePrice) throws RemoteException;
202
203   /**
204    * Set a new Buy Now price for the item
205    *
206    * @param newBuyNow item Buy Now price
207    * @exception RemoteException if an error occurs
208    * @since 1.0
209    */

210   public void setBuyNow(float newBuyNow) throws RemoteException;
211
212   /**
213    * Set item maximum bid
214    *
215    * @param newMaxBid new maximum bid
216    * @exception RemoteException if an error occurs
217    * @since 1.1
218    */

219   public void setMaxBid(float newMaxBid) throws RemoteException;
220
221   /**
222    * Set the number of bids for this item
223    *
224    * @param newNbOfBids new number of bids
225    * @exception RemoteException if an error occurs
226    * @since 1.1
227    */

228   public void setNbOfBids(int newNbOfBids) throws RemoteException;
229
230   /**
231    * Add one bid for this item
232    *
233    * @exception RemoteException if an error occurs
234    * @since 1.1
235    */

236   public void addOneBid() throws RemoteException;
237
238   /**
239    * Set a new beginning date for the auction
240    *
241    * @param newDate auction new beginning date
242    * @exception RemoteException if an error occurs
243    * @since 1.0
244    */

245   public void setStartDate(String JavaDoc newDate) throws RemoteException;
246
247   /**
248    * Set a new ending date for the auction
249    *
250    * @param newDate auction new ending date
251    * @exception RemoteException if an error occurs
252    * @since 1.0
253    */

254   public void setEndDate(String JavaDoc newDate) throws RemoteException;
255
256   /**
257    * Set a new seller identifier. This id must match
258    * the primary key of the users table.
259    *
260    * @param id seller id
261    * @exception RemoteException if an error occurs
262    * @since 1.0
263    */

264   public void setSellerId(Integer JavaDoc id) throws RemoteException;
265
266   /**
267    * Set a new category identifier. This id must match
268    * the primary key of the category table.
269    *
270    * @param id category id
271    * @exception RemoteException if an error occurs
272    * @since 1.0
273    */

274   public void setCategoryId(Integer JavaDoc id) throws RemoteException;
275 }
276
Popular Tags