|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
example.cmp.id.QuidditchBean
Implementation class for the Quidditch bean.
Each instance of QuidditchBean maps to a table entry of "id_quidditch".
The Quidditch entry is tied to a Student, using the Student as its primary key.
StudentBean is abstract since it's taking advantage of container-managed persistence. Resin-CMP will create the implementation of the abstract methods.
StudentBean 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 id_quidditch (
student VARCHAR(250) NOT NULL REFERENCES id_student(name),
position VARCHAR(250),
points INTEGER,
PRIMARY KEY(student)
);
Constructor Summary | |
QuidditchBean()
|
Method Summary | |
Student |
ejbCreate(Student student,
java.lang.String position)
Creates the student's scores, setting primary keys and fields. |
void |
ejbPostCreate(Student student,
java.lang.String position)
Sets any relations. |
abstract int |
getPoints()
Returns the number of points the student has earned. |
abstract java.lang.String |
getPosition()
Returns the position the student plays on the team. |
abstract Student |
getStudent()
Returns the owning student. |
abstract void |
setPoints(int points)
Sets the number of points the student has earned. |
abstract void |
setPosition(java.lang.String position)
Sets the position the student plays on the team. |
abstract void |
setStudent(Student student)
Sets the owning student. |
Constructor Detail |
public QuidditchBean()
Method Detail |
public abstract Student getStudent()
public abstract void setStudent(Student student)
public abstract java.lang.String getPosition()
public abstract void setPosition(java.lang.String position)
public abstract int getPoints()
public abstract void setPoints(int points)
public Student ejbCreate(Student student, java.lang.String position) throws javax.ejb.CreateException
public void ejbPostCreate(Student student, java.lang.String position)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |