1 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 14 @Entity 15 @Table(name = "PERSON_TABLE") 16 @Inheritance(strategy = InheritanceType.JOINED) 17 public class Person { 18 private long id; 19 private String name; 20 private String address; 21 private String zip; 22 private String 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 getName() { 43 return name; 44 } 45 46 public void setName(String identity) { 47 this.name = identity; 48 } 49 50 public String getCountry() { 51 return country; 52 } 53 54 public void setCountry(String country) { 55 this.country = country; 56 } 57 58 public String getZip() { 59 return zip; 60 } 61 62 public void setZip(String zip) { 63 this.zip = zip; 64 } 65 66 public String getAddress() { 67 return address; 68 } 69 70 public void setAddress(String address) { 71 this.address = address; 72 } 73 } | Popular Tags |