KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > example > cmp > one2many > House


1 package example.cmp.one2many;
2
3 import java.rmi.*;
4 import java.util.*;
5 import javax.ejb.*;
6
7 /**
8  * Local interface for the House bean.
9  */

10 public interface House extends EJBLocalObject {
11
12   /**
13    * returns the name of the house (CMP field).
14    */

15   String getName();
16
17   /**
18    * returns a list of all students living in this house (CMR field).
19    */

20   Collection getStudentList();
21
22   /**
23    * Adds a student to the house. If the student is already a member
24    * of another house, he will be removed from that house automatically.
25    */

26   void addStudent(Student student);
27
28   /**
29    * Removes a student from the house.
30    */

31   void removeStudent(Student student);
32 }
33
Popular Tags