KickJava   Java API By Example, From Geeks To Geeks.

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


1 package example.cmp.many2many;
2
3 import java.rmi.*;
4 import java.util.*;
5 import javax.ejb.*;
6
7 import java.util.*;
8
9 /**
10  * Local interface for Course entity
11  */

12 public interface Course extends EJBLocalObject {
13
14   /**
15    * Returns the name of the <code>Course</code> (CMP field).
16    * This is also the primary key
17    * as defined in the deployment descriptor.
18    */

19   String getName();
20
21   /**
22    * Returns the name of the instructor teaching the <code>Course</course>
23    * (CMP field).
24    */

25   String getInstructor();
26
27   /**
28    * Returns a <code>Collection</code> of all students enrolled in the
29    * <code>Course</course> (CMR field).
30    */

31   Collection getStudentList();
32
33   /**
34    * Adds a <code>Student</code> to the <code>Course</course>. This will update
35    * the table many2many_student_course_mapping as defined in the
36    * deployment descriptor.
37    */

38   void addStudent(Student student);
39
40   /**
41    * Removes a <code>Student</code> from the <code>Course</course>. This will
42    * update the table many2many_student_course_mapping as defined in the
43    * deployment descriptor.
44    */

45   void removeStudent(Student student);
46
47 }
48
Popular Tags