|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
example.cmp.one2many.HouseBean
Implementation class for the House bean. Each instance of StudentBean maps to a table entry of "one2many_houses", where student is defined.
HouseBean is abstract since it's taking advantage of container-managed persistence. Resin-CMP 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.
This CMP bean uses the following schema:
CREATE TABLE one2many_houses (
name VARCHAR(250) NOT NULL,
PRIMARY KEY(name)
);
Constructor Summary | |
HouseBean()
|
Method Summary | |
void |
addStudent(Student student)
Adds a student to the house. |
abstract java.lang.String |
getName()
returns the name of the house (CMP field). |
abstract java.util.Collection |
getStudentList()
returns a Collection of all Students s managed by
the container (CMR field). |
void |
removeStudent(Student student)
Removes a student from the house. |
Constructor Detail |
public HouseBean()
Method Detail |
public abstract java.lang.String getName()
public abstract java.util.Collection getStudentList()
Collection
of all Students
s managed by
the container (CMR field).
This method needs to exist
because the field studentList
is defined as a CMR field.
public void addStudent(Student student)
public void removeStudent(Student student)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |