KickJava   Java API By Example, From Geeks To Geeks.

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


1 package edu.rice.rubis.beans;
2
3 import java.rmi.RemoteException JavaDoc;
4 import java.util.Collection JavaDoc;
5 import javax.ejb.CreateException JavaDoc;
6 import javax.ejb.EJBLocalHome JavaDoc;
7 import javax.ejb.FinderException JavaDoc;
8 import javax.ejb.RemoveException JavaDoc;
9
10 /**
11  * This is the Local Home interface of the Bid Bean
12  * @author <a HREF="mailto:cecchet@rice.edu">Emmanuel Cecchet</a> and <a HREF="mailto:julie.marguerite@inrialpes.fr">Julie Marguerite</a>
13  * @version 1.0
14  */

15 public interface BidLocalHome extends EJBLocalHome JavaDoc {
16   /**
17    * This method is used to create a new Bid Bean.
18    * The date is automatically set to the current date when the method is called.
19    *
20    * @param bidUserId user id of the bidder, must match the primary key of table users
21    * @param bidItemId item id, must match the primary key of table items
22    * @param userBid the amount of the user bid
23    * @param userMaxBid the maximum amount the user wants to bid
24    * @param quantity number of items the user wants to buy
25    *
26    * @return pk primary key set to null
27    * @exception CreateException if an error occurs
28    * @exception RemoveException if an error occurs
29    */

30   public BidLocal create(Integer JavaDoc bidUserId, Integer JavaDoc bidItemId, float userBid, float userMaxBid, int quantity) throws CreateException JavaDoc, RemoveException JavaDoc;
31
32   /**
33    * This method is used to retrieve a Bid Bean from its primary key,
34    * that is to say its id.
35    *
36    * @param id Bid id (primary key)
37    *
38    * @return the Bid if found else null
39    * @exception FinderException if an error occurs
40    */

41   public BidLocal findByPrimaryKey(BidPK id) throws FinderException JavaDoc;
42   /**
43    * This method is used to retrieve all Bid Beans related to one item.
44    * You must provide the item id.
45    *
46    * @param id item id
47    *
48    * @return List of Bids found (eventually empty)
49    * @exception FinderException if an error occurs
50    */

51   public Collection JavaDoc findByItem(Integer JavaDoc id) throws FinderException JavaDoc;
52
53   /**
54    * This method is used to retrieve all Bid Beans belonging to
55    * a specific user. You must provide the user id.
56    *
57    * @param id user id
58    *
59    * @return List of Bids found (eventually empty)
60    * @exception FinderException if an error occurs
61    */

62   public Collection JavaDoc findByUser(Integer JavaDoc id) throws FinderException JavaDoc;
63
64   /**
65    * This method is used to retrieve all bids from the database!
66    *
67    * @return List of all bids (eventually empty)
68    * @exception FinderException if an error occurs
69    */

70   public Collection JavaDoc findAllBids() throws FinderException JavaDoc;
71 }
72
Popular Tags