KickJava   Java API By Example, From Geeks To Geeks.

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


1 package edu.rice.rubis.beans;
2
3 import java.rmi.RemoteException JavaDoc;
4 import java.util.Collection JavaDoc;
5 import javax.ejb.CreateException JavaDoc;
6 import javax.ejb.EJBLocalHome JavaDoc;
7 import javax.ejb.FinderException JavaDoc;
8 import javax.ejb.RemoveException JavaDoc;
9
10 /** This is the LocalHome interface of the User Bean */
11
12 public interface UserLocalHome extends EJBLocalHome JavaDoc {
13   /**
14    * This method is used to create a new User Bean. The user id and the creationDate
15    * are automatically set by the system.
16    *
17    * @param userFirstName user's first name
18    * @param userLastName user's last name
19    * @param userNickName user's nick name
20    * @param userEmail email address of the user
21    * @param userPassword user's password
22    * @param userRegionId region id where the user lives
23    *
24    * @return the local interface on bean User
25    *
26    */

27   public UserLocal create(String JavaDoc userFirstname, String JavaDoc userLastname, String JavaDoc userNickname, String JavaDoc userEmail,
28                      String JavaDoc userPassword, Integer JavaDoc userRegionId) throws CreateException JavaDoc, RemoveException JavaDoc;
29
30   /**
31    * This method is used to retrieve a User Item Bean from its primary key,
32    * that is to say its id.
33    *
34    * @param id user id (primary key)
35    *
36    * @return the User if found else null
37    */

38   public UserLocal findByPrimaryKey(UserPK id) throws FinderException JavaDoc;
39
40   /**
41    * This method is used to retrieve a User from its nick name.
42    *
43    * @param nickName User nick name
44    *
45    * @return the User if found else null
46    */

47   public UserLocal findByNickName(String JavaDoc nickName) throws FinderException JavaDoc;
48
49   /**
50    * This method is used to retrieve all users from the database!
51    *
52    * @return List of all bids (eventually empty)
53    */

54   public Collection JavaDoc findAllUsers() throws FinderException JavaDoc;
55 }
56
Popular Tags