KickJava   Java API By Example, From Geeks To Geeks.

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


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.EJBHome JavaDoc;
7 import javax.ejb.FinderException JavaDoc;
8 import javax.ejb.RemoveException JavaDoc;
9
10 /** This is the Home interface of the Region Bean */
11
12 public interface RegionHome extends EJBHome JavaDoc {
13
14   /**
15    * This method is used to create a new Region Bean. Note that the region
16    * id is automatically generated by the database (AUTO_INCREMENT) on the
17    * primary key.
18    *
19    * @param name Region name
20    *
21    * @return pk primary key set to null
22    */

23   public Region create(String JavaDoc name) throws CreateException JavaDoc, RemoteException JavaDoc, RemoveException JavaDoc;
24
25
26   /**
27    * This method is used to retrieve a Region Bean from its primary key,
28    * that is to say its id.
29    *
30    * @param id Region id (primary key)
31    *
32    * @return the Region if found else null
33    */

34   public Region findByPrimaryKey(RegionPK id) throws FinderException JavaDoc, RemoteException JavaDoc;
35
36
37   /**
38    * This method is used to retrieve a Region Bean from its name.
39    *
40    * @param regionName Region name
41    *
42    * @return the Region if found else null
43    */

44   public Region findByName(String JavaDoc regionName) throws FinderException JavaDoc, RemoteException JavaDoc;
45
46
47   /**
48    * This method is used to retrieve all categories from the database!
49    *
50    * @return List of all categories (eventually empty)
51    */

52   public Collection JavaDoc findAllRegions() throws RemoteException JavaDoc, FinderException JavaDoc;
53 }
54
Popular Tags