|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
example.cmp.relation_n_1.HouseBean
Implementation of the HouseBean. Each instance of HouseBean maps to a table entry of "student_house", where student_house is defined as
CREATE TABLE student_house ( name VARCHAR(250), points INTEGER )HouseBean is abstract since it's taking advantage of container-managed persistence. Resin-EJB will create the implementation of the abstract methods. HouseBean also takes advantage of the AbstractEntityBean implementation. AbstractEntityBean is just a stub EntityBean implementation with default methods to make life a little more sane for simple beans.
Constructor Summary | |
HouseBean()
|
Method Summary | |
void |
addStudent(Student student)
Adds a student to the house. |
abstract java.lang.String |
getName()
Returns the house name. |
abstract int |
getPoints()
Returns the number of points for the house. |
abstract java.util.Collection |
getStudentList()
Returns a collection of the students. |
java.util.Collection |
getStudents()
Return a new ArrayList of the students since entity beans can't directly return the persistent collection. |
void |
removeStudent(Student student)
Removes a student from the house. |
Constructor Detail |
public HouseBean()
Method Detail |
public abstract java.lang.String getName()
public abstract int getPoints()
public abstract java.util.Collection getStudentList()
public void addStudent(Student student)
public void removeStudent(Student student)
public java.util.Collection getStudents()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |