KickJava   Java API By Example, From Geeks To Geeks.

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


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 the Student bean.
11  */

12 public interface Student extends EJBLocalObject {
13
14   /**
15    * Returns the student's name (CMP field).
16    */

17   String getName();
18
19   /**
20    * Returns a <code>Collection</code> of the student's courses (CMR field)
21    */

22   Collection getCourseList();
23
24   /**
25    * Enrolls the <code>Student</code> in a <code>Course</code>.
26    *
27    * @param course Course the student is to enroll in.
28    */

29   void addCourse(Course course);
30
31   /**
32    * Drops a <code>Course</code> for the <code>Student</code>.
33    *
34    * @param course Course the student is to drop
35    */

36   void removeCourse(Course course);
37
38 }
39
Popular Tags