example.cmp.relation_n_1
Class StudentBean
example.cmp.relation_n_1.StudentBean
- public abstract class StudentBean
Implementation of the StudentBean. Each instance of StudentBean
maps to a table entry of "student", where student is defined as
CREATE TABLE student_house (
name VARCHAR(250) NOT NULL,
house VARCHAR(250),
PRIMARY KEY(name)
)
StudentBean is abstract since it's taking advantage of container-managed
persistence. Resin-EJB 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.
Method Summary |
abstract House |
getHouse()
Returns the house the student belongs to. |
abstract java.lang.String |
getName()
Returns the student name. |
abstract void |
setHouse(House house)
Sets the student's house. |
StudentBean
public StudentBean()
getName
public abstract java.lang.String getName()
- Returns the student name. The name is the primary key.
getHouse
public abstract House getHouse()
- Returns the house the student belongs to.
setHouse
public abstract void setHouse(House house)
- Sets the student's house.