|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
example.cmp.many2many.CourseBean
Implementation class for the Course bean.
This CMP bean uses the following schema:
CREATE TABLE many2many_courses (
name VARCHAR(250) NOT NULL,
instructor VARCHAR(250),
PRIMARY KEY(name)
);
Constructor Summary | |
CourseBean()
|
Method Summary | |
void |
addStudent(Student student)
Adds a Student to the Course. |
abstract java.lang.String |
getInstructor()
Returns the name of the instructor teaching the Course
(CMP field). |
abstract java.lang.String |
getName()
Returns the name of the Course (CMP field). |
abstract java.util.Collection |
getStudentList()
Returns a Collection of all Students that are taking this
course (CMR field). |
void |
removeStudent(Student student)
Removes a Student from the Course. |
Constructor Detail |
public CourseBean()
Method Detail |
public abstract java.lang.String getName()
Course
(CMP field). This method will
be implemented by Resin-CMP.
It is also the primary key as defined in the deployment descriptor.public abstract java.lang.String getInstructor()
Course
(CMP field).
Resin-CMP will implement this method.
public abstract java.util.Collection getStudentList()
Collection
of all Students that are taking this
course (CMR field).
Resin-CMP will implement this method.public void addStudent(Student student)
Student
to the Course. This will update
the table many2many_student_course_mapping as defined in the
deployment descriptor.
public void removeStudent(Student student)
Student
from the Course. This will
update the table many2many_student_course_mapping as defined in the
deployment descriptor.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |