KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > example > cmp > ejbql > TeacherHome


1 package example.cmp.ejbql;
2
3 import java.rmi.*;
4 import javax.ejb.*;
5 import java.util.*;
6
7 /**
8  * Home interface for the Teacher bean.
9  */

10 public interface TeacherHome extends EJBLocalHome {
11   /**
12    * returns the <code>Teacher</code> entity that has <code>name</code>
13    * as its primary key.
14    */

15   Teacher findByPrimaryKey(String name)
16     throws FinderException;
17
18   /**
19    * Finds the teachers teaching any classes with the named student.
20    *
21    * <code><pre>
22    * SELECT course.teacher
23    * FROM ejbql_student student, IN(student.courseList) course
24    * WHERE student.name=?1
25    * </pre></code>
26    *
27    * @param studentName the student used as a key
28    * @return a collection of Teachers teaching courses to the student.
29    */

30   Collection findByStudent(String studentName)
31     throws FinderException;
32 }
33
Popular Tags