example.cmp.map
Class StudentBean

example.cmp.map.StudentBean

public abstract class StudentBean

Implementation class for the Student bean.

Each instance of StudentBean maps to a table entry of "map_students".

Each Student may have an associated Quidditch entry if the Student is on the house team. Since the Quidditch entry is an identifying relation, there is no corresponding entry in the SQL.

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 map_students (
     name VARCHAR(250) NOT NULL,

     PRIMARY KEY(name)
   );
 


Constructor Summary
StudentBean()
           
 
Method Summary
abstract  java.util.Map getGrades()
          Returns a map of the student's grades.
abstract  java.lang.String getName()
          Returns the name of the student.
 

Constructor Detail

StudentBean

public StudentBean()
Method Detail

getName

public abstract java.lang.String getName()
Returns the name of the student. The name is also the primary key as defined in the deployment descriptor.

getGrades

public abstract java.util.Map getGrades()
Returns a map of the student's grades.