example.cmp.relations.one2many
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.
 java.util.Collection getStudentList()
          Returns a list of all students living in this house
 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.

getStudentList

public java.util.Collection getStudentList()
Returns a list of all students living in this house

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.