1 package example.cmp.many2one; 2 3 import java.rmi.*; 4 import java.util.*; 5 import javax.ejb.*; 6 7 8 /** 9 * Remote interface for a house instance. 10 */ 11 public interface House extends EJBLocalObject { 12 /** 13 * Returns the house name. 14 */ 15 String getName(); 16 /** 17 * Returns the number of points for the house. 18 */ 19 int getPoints(); 20 /** 21 * Returns a collection of student beans. 22 */ 23 Collection getStudentList(); 24 /** 25 * Adds a student to the house. If the student is already a member 26 * of another house, he will be removed from that house automatically. 27 */ 28 void addStudent(Student student); 29 /** 30 * Removes a student from the house. 31 */ 32 void removeStudent(Student student); 33 } 34