KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > example > cmp > basic > CourseHome


1 package example.cmp.basic;
2
3 import javax.ejb.*;
4
5 /**
6  * Minimal home interface for courses taught at Hogwarts, containing methods
7  * to find any Course.
8  *
9  * <p>The example's <code>CourseHome</code> provides the minimal
10  * implementation of a home interface: a single findByPrimaryKey
11  * method to find any course. Home interfaces can also provide
12  * create methods as described in example.cmp.create.CourseHome.
13  *
14  * <p>Applications Use the home interface to obtain references
15  * to whatever entities you're interested in. Each entity that you
16  * get from the home interface (using its create or finder methods)
17  * is then represented by its local interface.
18  *
19  * @see example.cmp.create.CourseHome.
20  */

21 public interface CourseHome extends EJBLocalHome {
22   /**
23    * Returns the <code>Course</code> with <code>courseId</code>
24    * as its primary key. Every home interface must define the
25    * findByPrimaryKey method. The argument must be the primary key type
26    * and the return value must be the local interface.
27    *
28    * @param courseId ID of the course that is to be retreived
29    *
30    * @return the local interface of the specified course.
31    *
32    * @exception ObjectNotFoundException if no such course exists.
33    */

34   Course findByPrimaryKey(String courseId)
35     throws FinderException;
36 }
37
Popular Tags