example.cmp.relation_n_1
Interface House

All Superinterfaces:
javax.ejb.EJBLocalObject

public interface House
extends javax.ejb.EJBLocalObject

Remote interface for a house instance.


Method Summary
 void addStudent(Student student)
          Adds a student to the house.
 java.lang.String getName()
          Returns the house name.
 int getPoints()
          Returns the number of points for the house.
 java.util.Collection getStudentList()
          Returns a collection of student beans.
 void removeStudent(Student student)
          Removes a student from the house.
 
Methods inherited from interface javax.ejb.EJBLocalObject
getEJBLocalHome, getPrimaryKey, isIdentical, remove
 

Method Detail

getName

public java.lang.String getName()
Returns the house name.

getPoints

public int getPoints()
Returns the number of points for the house.

getStudentList

public java.util.Collection getStudentList()
Returns a collection of student beans.

addStudent

public void addStudent(Student student)
Adds a student to the house. If the student is already a member of another house, he will be removed from that house automatically.

removeStudent

public void removeStudent(Student student)
Removes a student from the house.