example.cmp.relations.many2many
Class CourseBean
example.cmp.relations.many2many.CourseBean
- public abstract class CourseBean
Implementation class for the Course entity.
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. |
abstract java.lang.String |
getName()
Returns the course name. |
abstract java.util.Collection |
getStudentList()
Returns a Collection of all Students that are taking this course
Resin-CMP will implement this method. |
void |
removeStudent(Student student)
Removes a Student from the Course. |
CourseBean
public CourseBean()
getName
public abstract java.lang.String getName()
- Returns the course name. This method will be implemented by Resin-CMP.
It is also the primary key as defined in the deployment descriptor.
getInstructor
public abstract java.lang.String getInstructor()
- Returns the name of the instructor teaching the
Course.
Resin-CMP will implement this method.
getStudentList
public abstract java.util.Collection getStudentList()
- Returns a Collection of all Students that are taking this course
Resin-CMP will implement this method.
addStudent
public void addStudent(Student student)
- Adds a
Student
to the Course. This will update
the table many2many_student_course_mapping as defined in the
deployment descriptor.
removeStudent
public void removeStudent(Student student)
- Removes a
Student
from the Course. This will
update the table many2many_student_course_mapping as defined in the
deployment descriptor.