KickJava   Java API By Example, From Geeks To Geeks.

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


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

18 abstract public class TeacherBean extends com.caucho.ejb.AbstractEntityBean {
19
20   /**
21    * returns the <code>Teacher</code>'s name
22    */

23   abstract public String getName();
24
25   /**
26    * returns the <code>Course</code> taught by the <code>Teacher</code>
27    */

28   abstract public Course getCourse();
29
30 // abstract public void setCourse(Course course);
31

32 }
33
Popular Tags