example.cmp.basic
Interface CourseHome
- All Superinterfaces:
- javax.ejb.EJBLocalHome
- public interface CourseHome
- extends javax.ejb.EJBLocalHome
Minimal home interface for courses taught at Hogwarts, containing methods
to find any Course.
The example's CourseHome
provides the minimal
implementation of a home interface: a single findByPrimaryKey
method to find any course. Home interfaces can also provide
create methods as described in example.cmp.create.CourseHome.
Applications Use the home interface to obtain references
to whatever entities you're interested in. Each entity that you
get from the home interface (using its create or finder methods)
is then represented by its local interface.
- See Also:
example.cmp.create.CourseHome.
Method Summary |
Course |
findByPrimaryKey(java.lang.String courseId)
Returns the Course with courseId
as its primary key. |
Methods inherited from interface javax.ejb.EJBLocalHome |
remove |
findByPrimaryKey
public Course findByPrimaryKey(java.lang.String courseId)
throws javax.ejb.FinderException
- Returns the
Course
with courseId
as its primary key. Every home interface must define the
findByPrimaryKey method. The argument must be the primary key type
and the return value must be the local interface.
- Parameters:
courseId
- ID of the course that is to be retreived- Returns:
- the local interface of the specified course.
- Throws:
ObjectNotFoundException
- if no such course exists.