KickJava   Java API By Example, From Geeks To Geeks.

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


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 local home interface of the Region Bean */
11
12 public interface RegionLocalHome extends EJBLocalHome JavaDoc {
13
14   /**
15    * This method is used to create a new Region Bean.
16    *
17    * @param name Region name
18    *
19    * @return pk primary key set to null
20    */

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

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

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

50   public Collection JavaDoc findAllRegions() throws FinderException JavaDoc;
51 }
52
Popular Tags