example.cmp.ejbql
Interface TeacherHome
- All Superinterfaces:
- javax.ejb.EJBLocalHome
- public interface TeacherHome
- extends javax.ejb.EJBLocalHome
Home interface for the Teacher bean.
Method Summary |
Teacher |
findByPrimaryKey(java.lang.String name)
returns the Teacher entity that has name
as its primary key. |
java.util.Collection |
findByStudent(java.lang.String studentName)
Finds the teachers teaching any classes with the named student. |
Methods inherited from interface javax.ejb.EJBLocalHome |
remove |
findByPrimaryKey
public Teacher findByPrimaryKey(java.lang.String name)
throws javax.ejb.FinderException
- returns the
Teacher
entity that has name
as its primary key.
findByStudent
public java.util.Collection findByStudent(java.lang.String studentName)
throws javax.ejb.FinderException
- Finds the teachers teaching any classes with the named student.
SELECT course.teacher
FROM ejbql_student student, IN(student.courseList) course
WHERE student.name=?1
- Parameters:
studentName
- the student used as a key- Returns:
- a collection of Teachers teaching courses to the student.