KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > ejb > cmr > EmployeeAddressBean


1 /*
2  * $Id: EmployeeAddressBean.java,v 1.3 2003/03/04 04:48:48 topping Exp $
3  */

4 package test.ejb.cmr;
5
6 import javax.ejb.EntityBean JavaDoc;
7 import javax.ejb.CreateException JavaDoc;
8
9 import test.ejb.cmr.EmployeeAddressValue;
10
11 /**
12  * @ejb.bean
13  * name="EmployeeAddress"
14  * type="CMP"
15  * cmp-version="2.x"
16  * primkey-field="id"
17  * view-type="local"
18  *
19  * @ejb.persistence
20  * table-name="address"
21  * @ejb.value-object
22  * name="EmployeeAddress"
23  * match="*"
24  *
25  * @author mvsbrito
26  * @version $Revision: 1.3 $ $Date: 2003/03/04 04:48:48 $
27  */

28 public abstract class EmployeeAddressBean implements EntityBean JavaDoc
29 {
30     /**
31      * @ejb.interface-method
32      * view-type="local"
33      * @ejb.persistence
34      * column-name="addr_id"
35      */

36     public abstract Integer JavaDoc getId();
37     public abstract void setId(Integer JavaDoc id);
38
39     /**
40      * @ejb.interface-method
41      * view-type="local"
42      * @ejb.persistence
43      * column-name="addr_description"
44      */

45     public abstract String JavaDoc getDescription();
46
47     /**
48      * @ejb.interface-method
49      * view-type="local"
50      */

51     public abstract void setDescription(String JavaDoc description);
52
53     /**
54      * @ejb.interface-method
55      * view-type="local"
56      */

57     public abstract EmployeeAddressValue getEmployeeAddressValue();
58
59     /**
60      * @ejb.interface-method
61      * view-type="local"
62      */

63     public abstract void setEmployeeAddressValue(EmployeeAddressValue value);
64
65     /**
66      * @ejb:create-method
67      */

68     public Integer JavaDoc ejbCreate(EmployeeAddressValue eav) throws CreateException JavaDoc {
69         setId(eav.getId());
70         return eav.getId();
71     }
72 }
73
Popular Tags