1 package example.cmp.transaction; 2 3 import javax.ejb.CreateException; 4 import javax.ejb.EJBLocalHome; 5 import javax.ejb.EJBHome; 6 import javax.ejb.FinderException; 7 8 import java.util.Collection; 9 10 /** 11 * Home interface for the Course bean. 12 * The Home Interface enables you to create new entities and to obtain 13 * references to existing ones. 14 * 15 * <p>The idea is that you use the Home Interface to obtain references 16 * to whatever entities you're interested in. Each entity that you 17 * get from the Home Interface (using its create or finder methods) 18 * is then accessible through its Local Interface. 19 * 20 */ 21 public interface CourseHome extends EJBLocalHome { 22 /** 23 * Returns the Course identified by the given primary key. 24 */ 25 Course findByPrimaryKey(int primaryKey) 26 throws FinderException; 27 28 /** 29 * Returns a <code>Collection</code> of all Courses taught. 30 */ 31 Collection findAll() 32 throws FinderException; 33 34 } 35