KickJava   Java API By Example, From Geeks To Geeks.

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


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

12 public interface Query extends EJBObject, Remote {
13   /**
14   /**
15    * Get all the items that match a specific category and that are still
16    * to sell (auction end date is not passed). You must select the starting
17    * row and number of rows to fetch from the database to get only a limited
18    *number of items.
19    * For example, returns 25 Books.
20    *
21    * @param categoryId id of the category you are looking for
22    * @param regionId id of the region you are looking for
23    * @param startingRow row where result starts (0 if beginning)
24    * @param nbOfRows number of rows to get
25    *
26    * @return Vector of items primary keys
27    * @since 1.1
28    */

29   public Vector JavaDoc getCurrentItemsInCategory(Integer JavaDoc categoryId, int startingRow, int nbOfRows) throws RemoteException;
30
31   /**
32    * Get all the items that match a specific category and region and
33    * that are still to sell (auction end date is not passed). You must
34    * select the starting row and number of rows to fetch from the database
35    * to get only a limited number of items.
36    * For example, returns 25 Books to sell in Houston.
37    *
38    * @param categoryId id of the category you are looking for
39    * @param regionId id of the region you are looking for
40    * @param startingRow row where result starts (0 if beginning)
41    * @param nbOfRows number of rows to get
42    *
43    * @return Vector of items primary keys
44    * @since 1.1
45    */

46   public Vector JavaDoc getCurrentItemsInCategoryAndRegion(Integer JavaDoc categoryId, Integer JavaDoc regionId, int startingRow, int nbOfRows) throws RemoteException;
47
48   /**
49    * Get the maximum bid (winning bid) for an item.
50    *
51    * @param itemId item id
52    *
53    * @return maximum bid or 0 if no bid
54    * @exception RemoteException if an error occurs
55    * @since 1.0
56    */

57   public float getItemMaxBid(Integer JavaDoc itemId) throws RemoteException;
58   
59   /**
60    * Get the first <i>maxToCollect</i> bids for an item sorted from the
61    * maximum to the minimum.
62    *
63    * @param maxToCollect number of bids to collect
64    * @param itemId item id
65    *
66    * @return Vector of bids primary keys (can be less than maxToCollect)
67    * @exception RemoteException if an error occurs
68    * @since 1.0
69    */

70   public Vector JavaDoc getItemQtyMaxBid(int maxToCollect, Integer JavaDoc itemId) throws RemoteException;
71   
72   /**
73    * Get the number of bids for an item.
74    *
75    * @param itemId item id
76    *
77    * @return number of bids or 0 if no bid
78    * @exception RemoteException if an error occurs
79    * @since 1.0
80    */

81   public int getItemNbOfBids(Integer JavaDoc itemId) throws RemoteException;
82   
83   /**
84    * Get the bid history for an item sorted from the last bid to the
85    * first bid (oldest one).
86    *
87    * @param itemId item id
88    *
89    * @return Vector of bids primary keys or null if no bids
90    * @exception RemoteException if an error occurs
91    * @since 1.0
92    */

93   public Vector JavaDoc getItemBidHistory(Integer JavaDoc itemId) throws RemoteException;
94   
95   /**
96    * Get all the latest bids for each item the user has bid on.
97    *
98    * @param userId user id
99    *
100    * @return Vector of bids primary keys (can be less than maxToCollect)
101    * @exception RemoteException if an error occurs
102    * @since 1.0
103    */

104   public Vector JavaDoc getUserBids(Integer JavaDoc userId) throws RemoteException;
105
106   /**
107    * Get all the items the user won in the last 30 days.
108    *
109    * @param userId user id
110    *
111    * @return Vector of items primary keys (can be less than maxToCollect)
112    * @exception RemoteException if an error occurs
113    * @since 1.0
114    */

115   public Vector JavaDoc getUserWonItems(Integer JavaDoc userId) throws RemoteException;
116
117
118  
119
120
121 }
122
Popular Tags