KickJava   Java API By Example, From Geeks To Geeks.

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


1 package edu.rice.rubis.beans;
2
3 import javax.ejb.*;
4 import java.rmi.*;
5
6 /**
7  * This is the Local 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 CommentLocal extends EJBLocalObject {
12   /**
13    * Get comment's id.
14    *
15    * @return comment id
16    */

17   public Integer JavaDoc getId();
18
19   /**
20    * Get the user id of the author of the comment
21    *
22    * @return author user id
23    */

24   public Integer JavaDoc getFromUserId();
25
26   /**
27    * Get the user id of the user this comment is about.
28    *
29    * @return user id this comment is about
30    */

31   public Integer JavaDoc getToUserId();
32
33   /**
34    * Get the item id which is the primary key in the items table.
35    *
36    * @return item id
37    */

38   public Integer JavaDoc getItemId();
39
40   /**
41    * Get the rating associated to this comment.
42    *
43    * @return rating
44    */

45   public float getRating();
46
47   /**
48    * Time of the Comment in the format 'YYYY-MM-DD hh:mm:ss'
49    *
50    * @return comment time
51    */

52   public String JavaDoc getDate();
53   
54   /**
55    * Get the comment text.
56    *
57    * @return comment text
58    */

59   public String JavaDoc getComment();
60
61
62   /**
63    * Set a new user identifier for the author of the comment.
64    * This id must match the primary key of the users table.
65    *
66    * @param id author user id
67    */

68   public void setFromUserId(Integer JavaDoc id);
69
70   /**
71    * Set a new user identifier for the user this comment is about.
72    * This id must match the primary key of the users table.
73    *
74    * @param id user id comment is about
75    */

76   public void setToUserId(Integer JavaDoc id);
77
78   /**
79    * Set a new item identifier. This id must match
80    * the primary key of the items table.
81    *
82    * @param id item id
83    */

84   public void setItemId(Integer JavaDoc id);
85
86   /**
87    * Set a new rating for the ToUserId.
88    *
89    * @param rating maximum comment price
90    */

91   public void setRating(int rating);
92
93   /**
94    * Set a new date for this comment
95    *
96    * @param newDate comment date
97    */

98   public void setDate(String JavaDoc newDate);
99
100   /**
101    * Set a new comment for ToUserId from FromUserId.
102    *
103    * @param newComment Comment
104    */

105   public void setComment(String JavaDoc newComment);
106
107   /**
108    * Display comment information as an HTML table row
109    *
110    * @return a <code>String</code> containing HTML code
111    * @since 1.0
112    */

113   public String JavaDoc printComment(String JavaDoc userName);
114
115 }
116
Popular Tags