KickJava   Java API By Example, From Geeks To Geeks.

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


1 package edu.rice.rubis.beans;
2
3 import javax.ejb.*;
4 import java.rmi.*;
5
6 /**
7  * This is the Remote Interface for the Bid 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.0
10  */

11 public interface Bid extends EJBObject {
12   /**
13    * Get bid's id.
14    *
15    * @return bid id
16    * @exception RemoteException if an error occurs
17    */

18   public Integer JavaDoc getId() throws RemoteException;
19
20   /**
21    * Get the user id which is the primary key in the users table.
22    *
23    * @return user id
24    * @exception RemoteException if an error occurs
25    */

26   public Integer JavaDoc getUserId() throws RemoteException;
27
28   /**
29    * Get the item id which is the primary key in the items table.
30    *
31    * @return item id
32    * @exception RemoteException if an error occurs
33    */

34   public Integer JavaDoc getItemId() throws RemoteException;
35
36   /**
37    * Get how many of this item the user wants.
38    *
39    * @return quantity of items for this bid.
40    * @exception RemoteException if an error occurs
41    */

42   public int getQuantity() throws RemoteException;
43
44   /**
45    * Get the bid of the user.
46    *
47    * @return user's bid
48    * @exception RemoteException if an error occurs
49    */

50   public float getBid() throws RemoteException;
51
52   /**
53    * Get the maximum bid wanted by the user.
54    *
55    * @return user's maximum bid
56    * @exception RemoteException if an error occurs
57    */

58   public float getMaxBid() throws RemoteException;
59
60   /**
61    * Time of the Bid in the format 'YYYY-MM-DD hh:mm:ss'
62    *
63    * @return bid time
64    * @exception RemoteException if an error occurs
65    */

66   public String JavaDoc getDate() throws RemoteException;
67
68   /**
69    * Give the nick name of the bidder.
70    *
71    * @return bidder's nick name
72    * @exception RemoteException if an error occurs
73    */

74   public String JavaDoc getBidderNickName() throws RemoteException;
75   
76
77   /**
78    * Set a new user identifier. This id must match
79    * the primary key of the users table.
80    *
81    * @param id user id
82    * @exception RemoteException if an error occurs
83    */

84   public void setUserId(Integer JavaDoc id) throws RemoteException;
85
86   /**
87    * Set a new item identifier. This id must match
88    * the primary key of the items table.
89    *
90    * @param id item id
91    * @exception RemoteException if an error occurs
92    */

93   public void setItemId(Integer JavaDoc id) throws RemoteException;
94
95   /**
96    * Set a new quantity for this bid
97    *
98    * @param Qty quantity
99    * @exception RemoteException if an error occurs
100    */

101   public void setQuantity(int Qty) throws RemoteException;
102
103   /**
104    * Set a new bid on the item for the user
105    *
106    * @param newBid bid price
107    * @exception RemoteException if an error occurs
108    */

109   public void setBid(float newBid) throws RemoteException;
110
111   /**
112    * Set a new maximum bid on the item for the user
113    *
114    * @param newBid maximum bid price
115    * @exception RemoteException if an error occurs
116    */

117   public void setMaxBid(float newBid) throws RemoteException;
118
119   /**
120    * Set a new date for this bid
121    *
122    * @param newDate bid date
123    * @exception RemoteException if an error occurs
124    */

125   public void setDate(String JavaDoc newDate) throws RemoteException;
126
127   /**
128    * Display bid history information as an HTML table row
129    *
130    * @return a <code>String</code> containing HTML code
131    * @exception RemoteException if an error occurs
132    * @since 1.0
133    */

134   public String JavaDoc printBidHistory() throws RemoteException;
135 }
136
Popular Tags