1 22 package org.jboss.ejb3.test.regression; 23 24 import javax.persistence.Entity; 25 import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; 26 import javax.persistence.Id; 27 import javax.persistence.Inheritance; 28 import javax.persistence.InheritanceType; 29 import javax.persistence.Id; 30 import javax.persistence.InheritanceType; 31 import java.io.Serializable ; 32 33 @Entity(name = "Contact") 34 @Inheritance(strategy = InheritanceType.JOINED) 35 public class Contact implements Serializable 36 { 37 38 private long id; 39 private String name; 40 private String email; 41 private String phone; 42 43 public Contact() 44 { 45 } 46 47 @Id @GeneratedValue(strategy=GenerationType.AUTO) 48 public long getId() 49 { 50 return this.id; 51 } 52 53 public void setId(long id) 54 { 55 this.id = id; 56 } 57 58 public String getName() 59 { 60 return this.name; 61 } 62 63 public void setName(String name) 64 { 65 this.name = name; 66 } 67 68 public String getEmail() 69 { 70 return this.email; 71 } 72 73 public void setEmail(String email) 74 { 75 this.email = email; 76 } 77 78 public String getPhone() 79 { 80 return this.phone; 81 } 82 83 public void setPhone(String phone) 84 { 85 this.phone = phone; 86 } 87 } 88 | Popular Tags |