KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > ejb > test > callbacks > Person


1 //$Id: Person.java,v 1.1 2005/07/21 00:08:34 epbernard Exp $
2
package org.hibernate.ejb.test.callbacks;
3
4 import javax.persistence.Entity;
5 import javax.persistence.GeneratorType;
6 import javax.persistence.Id;
7 import javax.persistence.Inheritance;
8 import javax.persistence.InheritanceType;
9 import javax.persistence.Table;
10
11 /**
12  * @author Emmanuel Bernard
13  */

14 @Entity
15         @Table(name = "PERSON_TABLE")
16         @Inheritance(strategy = InheritanceType.JOINED)
17         public class Person {
18     private long id;
19     private String JavaDoc name;
20     private String JavaDoc address;
21     private String JavaDoc zip;
22     private String JavaDoc country;
23     private char sex;
24
25     @Id(generate = GeneratorType.AUTO)
26             public long getId() {
27         return id;
28     }
29
30     public void setId(long id) {
31         this.id = id;
32     }
33
34     public char getSex() {
35         return sex;
36     }
37
38     public void setSex(char sex) {
39         this.sex = sex;
40     }
41
42     public String JavaDoc getName() {
43         return name;
44     }
45
46     public void setName(String JavaDoc identity) {
47         this.name = identity;
48     }
49
50     public String JavaDoc getCountry() {
51         return country;
52     }
53
54     public void setCountry(String JavaDoc country) {
55         this.country = country;
56     }
57
58     public String JavaDoc getZip() {
59         return zip;
60     }
61
62     public void setZip(String JavaDoc zip) {
63         this.zip = zip;
64     }
65
66     public String JavaDoc getAddress() {
67         return address;
68     }
69
70     public void setAddress(String JavaDoc address) {
71         this.address = address;
72     }
73 }
Popular Tags