KickJava   Java API By Example, From Geeks To Geeks.

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


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 User Bean.
8  * @author <a HREF="mailto:">Emmanuel Cecchet</a>
9  * @version 1.0
10  */

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

18   public Integer JavaDoc getId() throws RemoteException;
19
20   /**
21    * Get user first name.
22    *
23    * @return user first name
24    * @exception RemoteException if an error occurs
25    */

26   public String JavaDoc getFirstName() throws RemoteException;
27
28   /**
29    * Get user last name.
30    *
31    * @return user last name
32    * @exception RemoteException if an error occurs
33    */

34   public String JavaDoc getLastName() throws RemoteException;
35
36   /**
37    * Get user nick name. This name is unique for each user and is used for login.
38    *
39    * @return user nick name
40    * @exception RemoteException if an error occurs
41    */

42   public String JavaDoc getNickName() throws RemoteException;
43
44   /**
45    * Get user password.
46    *
47    * @return user password
48    * @exception RemoteException if an error occurs
49    */

50   public String JavaDoc getPassword() throws RemoteException;
51
52   /**
53    * Get user email address.
54    *
55    * @return user email address
56    * @exception RemoteException if an error occurs
57    */

58   public String JavaDoc getEmail() throws RemoteException;
59   
60   /**
61    * Get user rating. The higher the rating is, the most reliable the user is.
62    *
63    * @return user rating
64    * @exception RemoteException if an error occurs
65    */

66   public int getRating() throws RemoteException;
67   
68   /**
69    * Get user's account current balance. This account is used when a user want to sell items.
70    * There is a charge for each item to sell.
71    *
72    * @return user's account current balance
73    * @exception RemoteException if an error occurs
74    */

75   public float getBalance() throws RemoteException;
76
77   /**
78    * Get user creation date.
79    *
80    * @return user creation date
81    * @exception RemoteException if an error occurs
82    */

83   public String JavaDoc getCreationDate() throws RemoteException;
84   
85   /**
86    * Get region identifier of user's region.
87    *
88    * @return region id of the user
89    * @exception RemoteException if an error occurs
90    */

91   public Integer JavaDoc getRegionId() throws RemoteException;
92     
93
94   /**
95    * Set user's first name
96    *
97    * @param newName user first name
98    * @exception RemoteException if an error occurs
99    */

100   public void setFirstName(String JavaDoc newName) throws RemoteException;
101
102   /**
103    * Set user's last name
104    *
105    * @param newName user last name
106    * @exception RemoteException if an error occurs
107    */

108   public void setLastName(String JavaDoc newName) throws RemoteException;
109
110   /**
111    * Set user's nick name
112    *
113    * @param newName user nick name
114    * @exception RemoteException if an error occurs
115    */

116   public void setNickName(String JavaDoc newName) throws RemoteException;
117
118   /**
119    * Set user's password
120    *
121    * @param newPassword a <code>String</code> value
122    * @exception RemoteException if an error occurs
123    */

124   public void setPassword(String JavaDoc newPassword) throws RemoteException;
125
126   /**
127    * Set user's email address
128    *
129    * @param newEmail a <code>String</code> value
130    * @exception RemoteException if an error occurs
131    */

132   public void setEmail(String JavaDoc newEmail) throws RemoteException;
133
134   /**
135    * Set a new creation date for this user account
136    *
137    * @param newCreationDate new user account creation date
138    * @exception RemoteException if an error occurs
139    */

140   public void setCreationDate(String JavaDoc newCreationDate) throws RemoteException;
141
142   /**
143    * Set a new region identifier. This id must match
144    * the primary key of the region table.
145    *
146    * @param id region id
147    * @exception RemoteException if an error occurs
148    */

149   public void setRegionId(Integer JavaDoc id) throws RemoteException;
150
151   /**
152    * Set user rating. The higher the rating is, the most reliable the user is.
153    *
154    * @param newRating new user rating
155    * @exception RemoteException if an error occurs
156    */

157   public void setRating(int newRating) throws RemoteException;
158
159   /**
160    * Update the current rating by adding a new value to it. This value can
161    * be negative if someone wants to decrease the user rating.
162    *
163    * @param diff value to add to the rating
164    * @exception RemoteException if an error occurs
165    */

166   public void updateRating(int diff) throws RemoteException;
167   
168   /**
169    * Set user's account current balance. This account is used when a user want to sell items.
170    * There is a charge for each sold item.
171    *
172    * @param newBalance set user's account current balance
173    * @exception RemoteException if an error occurs
174    */

175   public void setBalance(float newBalance) throws RemoteException;
176
177
178   /**
179    * Returns a string displaying general information about the user.
180    * The string contains HTML tags.
181    *
182    * @return string containing general user information
183    * @exception RemoteException if an error occurs
184    */

185   public String JavaDoc getHTMLGeneralUserInformation() throws RemoteException;
186 }
187
Popular Tags