KickJava   Java API By Example, From Geeks To Geeks.

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


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 local Interface of the Query 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 QueryLocal extends EJBLocalObject {
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);
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);
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    * @since 1.0
55    */

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

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

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

89   public Vector JavaDoc getItemBidHistory(Integer JavaDoc itemId);
90   
91   /**
92    * Get all the latest bids for each item the user has bid on.
93    *
94    * @param userId user id
95    *
96    * @return Vector of bids primary keys (can be less than maxToCollect)
97    * @since 1.0
98    */

99   public Vector JavaDoc getUserBids(Integer JavaDoc userId);
100
101   /**
102    * Get all the items the user won in the last 30 days.
103    *
104    * @param userId user id
105    *
106    * @return Vector of items primary keys (can be less than maxToCollect)
107    * @since 1.0
108    */

109   public Vector JavaDoc getUserWonItems(Integer JavaDoc userId);
110
111
112  
113
114
115 }
116
Popular Tags