KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > example > cmp > one2one > CourseBean


1 package example.cmp.one2one;
2
3 import java.util.*;
4
5 /**
6  * Implementation class for the Course bean.
7  *
8  * <p>This CMP bean uses the following schema:
9  *
10  * <pre><code>
11  * CREATE TABLE one2one_teacher (
12  * name VARCHAR(250) NOT NULL,
13  * course VARCHAR(250) NOT NULL,
14  *
15  * PRIMARY KEY(name)
16  * );
17  * </code></pre>
18  */

19 abstract public class CourseBean extends com.caucho.ejb.AbstractEntityBean {
20
21   /**
22    * Returns the name of the course (CMP field). This method will be
23    * implemented by Resin-CMP.
24    * It is also the primary key as defined in the deployment descriptor.
25    */

26   abstract public String getName();
27
28   /**
29    * Returns the Teacher who is teaching this Course (CMR field).
30    * Resin-CMP will implement this method.
31    */

32   abstract public Teacher getTeacher();
33 }
34
Popular Tags