1 package edu.rice.rubis.beans; 2 3 import java.rmi.RemoteException; 4 import java.util.Collection; 5 import javax.ejb.CreateException; 6 import javax.ejb.EJBLocalHome; 7 import javax.ejb.FinderException; 8 import javax.ejb.RemoveException; 9 10 /** This is the local home interface of the Region Bean */ 11 12 public interface RegionLocalHome extends EJBLocalHome { 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 name) throws CreateException, RemoveException; 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; 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 regionName) throws FinderException; 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 findAllRegions() throws FinderException; 51 } 52