1 package example.cmp.many2one; 2 3 import java.util.*; 4 23 abstract public class HouseBean extends com.caucho.ejb.AbstractEntityBean { 24 27 abstract public String getName(); 28 31 abstract public int getPoints(); 32 35 abstract public Collection getStudentList(); 36 40 public void addStudent(Student student) 41 { 42 getStudentList().add(student); 43 } 44 47 public void removeStudent(Student student) 48 { 49 getStudentList().remove(student); 50 } 51 55 public Collection getStudents() 56 { 57 return new ArrayList(getStudentList()); 58 } 59 } 60 | Popular Tags |