KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > hibernate > Human


1 package test.hibernate;
2
3 /**
4  * @author Administrator
5  *
6  * @hibernate.joined-subclass
7  * table="HUMANS"
8  * dynamic-update="true"
9  * @hibernate.joined-subclass-key
10  * column="ANIMAL_ID"
11  */

12 public class Human extends Animal {
13
14     private Name name;
15     private String JavaDoc occupation;
16
17     /**
18      * Constructor for Human.
19      */

20     public Human() {
21         super();
22     }
23     
24     /**
25      * @hibernate.component
26      * Returns the name.
27      * @return Name
28      */

29     public Name getName() {
30         return name;
31     }
32
33     /**
34      * Sets the name.
35      * @param name The name to set
36      */

37     public void setName(Name name) {
38         this.name = name;
39     }
40
41     /**
42      * @hibernate.property
43      * Returns the occupation.
44      * @return String
45      */

46     public String JavaDoc getOccupation() {
47         return occupation;
48     }
49
50     /**
51      * Sets the occupation.
52      * @param occupation The occupation to set
53      */

54     public void setOccupation(String JavaDoc occupation) {
55         this.occupation = occupation;
56     }
57
58 }
59
Popular Tags