KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > example > cmp > ejbql > HouseBean


1 package example.cmp.ejbql;
2
3 import java.util.*;
4
5 /**
6  * Implementation class for the House bean.
7  *
8  * Each instance of StudentBean maps to a table entry of "one2many_houses",
9  * where student is defined.
10  *
11  * <p>HouseBean is abstract since it's taking advantage of container-managed
12  * persistence. Resin-CMP will create the implementation of the abstract
13  * methods.
14  *
15  * <p>HouseBean also takes advantage of the AbstractEntityBean
16  * implementation. AbstractEntityBean is just a stub
17  * EntityBean implementation with default methods to make life
18  * a little more sane for simple beans.
19  */

20 abstract public class HouseBean extends com.caucho.ejb.AbstractEntityBean {
21
22   /**
23    * returns the name of the house (CMP field). The name is the primary key as
24    * defined in the deployment descriptor.
25    */

26   abstract public String getName();
27
28   /**
29    * returns a <code>Collection</code> of all Students living in this House
30    * (CMR field).
31    */

32   abstract public Collection getStudentList();
33
34 }
35
Popular Tags