edu.rice.rubis.beans
Interface CommentLocalHome

All Superinterfaces:
javax.ejb.EJBLocalHome

public interface CommentLocalHome
extends javax.ejb.EJBLocalHome

This is the Local Home interface of the Comment Bean


Method Summary
 CommentLocal create(java.lang.Integer FromUserId, java.lang.Integer ToUserId, java.lang.Integer ItemId, int Rating, java.lang.String Comment)
          This method is used to create a new Comment Bean.
 java.util.Collection findAllComments()
          This method is used to retrieve all comments from the database!
 java.util.Collection findByFromUser(java.lang.Integer id)
          This method is used to retrieve all Comment Beans belonging to a specific author.
 java.util.Collection findByItem(java.lang.Integer id)
          This method is used to retrieve all Comment Beans related to one item.
 CommentLocal findByPrimaryKey(CommentPK id)
          This method is used to retrieve a Comment Bean from its primary key, that is to say its id.
 java.util.Collection findByToUser(java.lang.Integer id)
          This method is used to retrieve all Comment Beans related to a specific user.
 
Methods inherited from interface javax.ejb.EJBLocalHome
remove
 

Method Detail

create

public CommentLocal create(java.lang.Integer FromUserId,
                           java.lang.Integer ToUserId,
                           java.lang.Integer ItemId,
                           int Rating,
                           java.lang.String Comment)
                    throws javax.ejb.CreateException,
                           javax.ejb.RemoveException
This method is used to create a new Comment Bean. The date is automatically set to the current date when the method is called.
Parameters:
FromUserId - user id of the comment author, must match the primary key of table users
ToUserId - user id of the user this comment is about, must match the primary key of table users
ItemId - item id, must match the primary key of table items
Rating - user (ToUserId) rating given by the author (FromUserId)
Comment - comment text
Returns:
pk primary key set to null

findByPrimaryKey

public CommentLocal findByPrimaryKey(CommentPK id)
                              throws javax.ejb.FinderException
This method is used to retrieve a Comment Bean from its primary key, that is to say its id.
Parameters:
id - Comment id (primary key)
Returns:
the Comment if found else null

findByItem

public java.util.Collection findByItem(java.lang.Integer id)
                                throws javax.ejb.FinderException
This method is used to retrieve all Comment Beans related to one item. You must provide the item id.
Parameters:
id - item id
Returns:
List of Comments found (eventually empty)

findByFromUser

public java.util.Collection findByFromUser(java.lang.Integer id)
                                    throws javax.ejb.FinderException
This method is used to retrieve all Comment Beans belonging to a specific author. You must provide the author user id.
Parameters:
id - user id
Returns:
List of Comments found (eventually empty)

findByToUser

public java.util.Collection findByToUser(java.lang.Integer id)
                                  throws javax.ejb.FinderException
This method is used to retrieve all Comment Beans related to a specific user. You must provide the user id.
Parameters:
id - user id
Returns:
List of Comments found (eventually empty)

findAllComments

public java.util.Collection findAllComments()
                                     throws javax.ejb.FinderException
This method is used to retrieve all comments from the database!
Returns:
List of all comments (eventually empty)


Copyright © 2003 - ObjectWeb Consortium - All Rights Reserved.