1 22 package org.jboss.ejb3.test.regression; 23 24 import javax.persistence.Entity; 25 import javax.persistence.Inheritance; 26 import javax.persistence.InheritanceType; 27 import javax.persistence.JoinColumn; 28 import javax.persistence.ManyToOne; 29 import javax.persistence.ManyToOne; 30 import javax.persistence.Inheritance; 31 import javax.persistence.InheritanceType; 32 33 @Entity(name = "Employee") 34 @Inheritance(strategy = InheritanceType.JOINED) 35 public class Employee extends Contact 36 { 37 38 private String first; 39 private String last; 40 private String cell; 41 private Branch branch; 42 43 public Employee() 44 { 45 } 46 47 public String getFirst() 48 { 49 return this.first; 50 } 51 52 public void setFirst(String first) 53 { 54 this.first = first; 55 } 56 57 public String getLast() 58 { 59 return this.last; 60 } 61 62 public void setLast(String last) 63 { 64 this.last = last; 65 } 66 67 public String getCell() 68 { 69 return this.cell; 70 } 71 72 public void setCell(String cell) 73 { 74 this.cell = cell; 75 } 76 77 @ManyToOne 78 @JoinColumn(name = "branch") 79 public Branch getBranch() 80 { 81 return this.branch; 82 } 83 84 public void setBranch(Branch branch) 85 { 86 this.branch = branch; 87 } 88 } 89 | Popular Tags |