KickJava   Java API By Example, From Geeks To Geeks.

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


1 package example.cmp.ejbql;
2
3 import javax.ejb.*;
4 import java.util.Collection;
5
6 /**
7  * Local interface for the Course bean.
8  * The Local Interface represents one entity; in this case a <code>Course
9  * </code>.
10  *
11  * <p>The idea is that you use the Home Interface to obtain references
12  * to whatever entities you're interested in. Each entity that you
13  * get from the Home Interface (using its create or finder methods)
14  * is then represented by its Local Interface.
15  *
16  */

17 public interface Course extends EJBLocalObject {
18
19   /**
20    * Get the ID of the course (CMP field).
21    * This is also the primary key as defined in the deployment descriptor.
22    */

23   public String getName();
24
25   /**
26    * Returns a <code>Collection</code> of all Students who are currently
27    * enrolled in this Course (CMR field).
28    */

29   public Collection getStudentList();
30
31
32   /**
33    * returns the Teacher who is teaching this Course (CMR field).
34    */

35   public Teacher getTeacher();
36 }
37
Popular Tags