KickJava   Java API By Example, From Geeks To Geeks.

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


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 Comment 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 Comment extends EJBObject {
12   /**
13    * Get comment's id.
14    *
15    * @return comment id
16    * @exception RemoteException if an error occurs
17    */

18   public Integer JavaDoc getId() throws RemoteException;
19
20   /**
21    * Get the user id of the author of the comment
22    *
23    * @return author user id
24    * @exception RemoteException if an error occurs
25    */

26   public Integer JavaDoc getFromUserId() throws RemoteException;
27
28   /**
29    * Get the user id of the user this comment is about.
30    *
31    * @return user id this comment is about
32    * @exception RemoteException if an error occurs
33    */

34   public Integer JavaDoc getToUserId() throws RemoteException;
35
36   /**
37    * Get the item id which is the primary key in the items table.
38    *
39    * @return item id
40    * @exception RemoteException if an error occurs
41    */

42   public Integer JavaDoc getItemId() throws RemoteException;
43
44   /**
45    * Get the rating associated to this comment.
46    *
47    * @return rating
48    * @exception RemoteException if an error occurs
49    */

50   public float getRating() throws RemoteException;
51
52   /**
53    * Time of the Comment in the format 'YYYY-MM-DD hh:mm:ss'
54    *
55    * @return comment time
56    * @exception RemoteException if an error occurs
57    */

58   public String JavaDoc getDate() throws RemoteException;
59   
60   /**
61    * Get the comment text.
62    *
63    * @return comment text
64    * @exception RemoteException if an error occurs
65    */

66   public String JavaDoc getComment() throws RemoteException;
67
68
69   /**
70    * Set a new user identifier for the author of the comment.
71    * This id must match the primary key of the users table.
72    *
73    * @param id author user id
74    * @exception RemoteException if an error occurs
75    */

76   public void setFromUserId(Integer JavaDoc id) throws RemoteException;
77
78   /**
79    * Set a new user identifier for the user this comment is about.
80    * This id must match the primary key of the users table.
81    *
82    * @param id user id comment is about
83    * @exception RemoteException if an error occurs
84    */

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

94   public void setItemId(Integer JavaDoc id) throws RemoteException;
95
96   /**
97    * Set a new rating for the ToUserId.
98    *
99    * @param rating maximum comment price
100    * @exception RemoteException if an error occurs
101    */

102   public void setRating(int rating) throws RemoteException;
103
104   /**
105    * Set a new date for this comment
106    *
107    * @param newDate comment date
108    * @exception RemoteException if an error occurs
109    */

110   public void setDate(String JavaDoc newDate) throws RemoteException;
111
112   /**
113    * Set a new comment for ToUserId from FromUserId.
114    *
115    * @param newComment Comment
116    * @exception RemoteException if an error occurs
117    */

118   public void setComment(String JavaDoc newComment) throws RemoteException;
119
120   /**
121    * Display comment information as an HTML table row
122    *
123    * @return a <code>String</code> containing HTML code
124    * @exception RemoteException if an error occurs
125    * @since 1.0
126    */

127   public String JavaDoc printComment(String JavaDoc userName) throws RemoteException;
128
129 }
130
Popular Tags