edu.rice.rubis.beans
Interface Comment

All Superinterfaces:
javax.ejb.EJBObject, java.rmi.Remote

public interface Comment
extends javax.ejb.EJBObject

This is the Remote Interface for the Comment Bean

Version:
1.0
Author:
Emmanuel Cecchet and Julie Marguerite

Method Summary
 java.lang.String getComment()
          Get the comment text.
 java.lang.String getDate()
          Time of the Comment in the format 'YYYY-MM-DD hh:mm:ss'
 java.lang.Integer getFromUserId()
          Get the user id of the author of the comment
 java.lang.Integer getId()
          Get comment's id.
 java.lang.Integer getItemId()
          Get the item id which is the primary key in the items table.
 float getRating()
          Get the rating associated to this comment.
 java.lang.Integer getToUserId()
          Get the user id of the user this comment is about.
 java.lang.String printComment(java.lang.String userName)
          Display comment information as an HTML table row
 void setComment(java.lang.String newComment)
          Set a new comment for ToUserId from FromUserId.
 void setDate(java.lang.String newDate)
          Set a new date for this comment
 void setFromUserId(java.lang.Integer id)
          Set a new user identifier for the author of the comment.
 void setItemId(java.lang.Integer id)
          Set a new item identifier.
 void setRating(int rating)
          Set a new rating for the ToUserId.
 void setToUserId(java.lang.Integer id)
          Set a new user identifier for the user this comment is about.
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

getId

public java.lang.Integer getId()
                        throws java.rmi.RemoteException
Get comment's id.
Returns:
comment id
Throws:
java.rmi.RemoteException - if an error occurs

getFromUserId

public java.lang.Integer getFromUserId()
                                throws java.rmi.RemoteException
Get the user id of the author of the comment
Returns:
author user id
Throws:
java.rmi.RemoteException - if an error occurs

getToUserId

public java.lang.Integer getToUserId()
                              throws java.rmi.RemoteException
Get the user id of the user this comment is about.
Returns:
user id this comment is about
Throws:
java.rmi.RemoteException - if an error occurs

getItemId

public java.lang.Integer getItemId()
                            throws java.rmi.RemoteException
Get the item id which is the primary key in the items table.
Returns:
item id
Throws:
java.rmi.RemoteException - if an error occurs

getRating

public float getRating()
                throws java.rmi.RemoteException
Get the rating associated to this comment.
Returns:
rating
Throws:
java.rmi.RemoteException - if an error occurs

getDate

public java.lang.String getDate()
                         throws java.rmi.RemoteException
Time of the Comment in the format 'YYYY-MM-DD hh:mm:ss'
Returns:
comment time
Throws:
java.rmi.RemoteException - if an error occurs

getComment

public java.lang.String getComment()
                            throws java.rmi.RemoteException
Get the comment text.
Returns:
comment text
Throws:
java.rmi.RemoteException - if an error occurs

setFromUserId

public void setFromUserId(java.lang.Integer id)
                   throws java.rmi.RemoteException
Set a new user identifier for the author of the comment. This id must match the primary key of the users table.
Parameters:
id - author user id
Throws:
java.rmi.RemoteException - if an error occurs

setToUserId

public void setToUserId(java.lang.Integer id)
                 throws java.rmi.RemoteException
Set a new user identifier for the user this comment is about. This id must match the primary key of the users table.
Parameters:
id - user id comment is about
Throws:
java.rmi.RemoteException - if an error occurs

setItemId

public void setItemId(java.lang.Integer id)
               throws java.rmi.RemoteException
Set a new item identifier. This id must match the primary key of the items table.
Parameters:
id - item id
Throws:
java.rmi.RemoteException - if an error occurs

setRating

public void setRating(int rating)
               throws java.rmi.RemoteException
Set a new rating for the ToUserId.
Parameters:
rating - maximum comment price
Throws:
java.rmi.RemoteException - if an error occurs

setDate

public void setDate(java.lang.String newDate)
             throws java.rmi.RemoteException
Set a new date for this comment
Parameters:
newDate - comment date
Throws:
java.rmi.RemoteException - if an error occurs

setComment

public void setComment(java.lang.String newComment)
                throws java.rmi.RemoteException
Set a new comment for ToUserId from FromUserId.
Parameters:
newComment - Comment
Throws:
java.rmi.RemoteException - if an error occurs

printComment

public java.lang.String printComment(java.lang.String userName)
                              throws java.rmi.RemoteException
Display comment information as an HTML table row
Returns:
a String containing HTML code
Throws:
java.rmi.RemoteException - if an error occurs
Since:
1.0


Copyright © 2003 - ObjectWeb Consortium - All Rights Reserved.