1 22 package org.jboss.ejb3.test.tableperinheritance; 23 24 import javax.persistence.Entity; 25 import javax.persistence.JoinColumn; 26 import javax.persistence.OneToOne; 27 28 31 @Entity 32 public class Customer extends Person 34 { 35 private Employee salesperson; 36 private String comments; 37 38 @OneToOne 39 @JoinColumn(name = "salesperson") 40 public Employee getSalesperson() 41 { 42 return salesperson; 43 } 44 45 public void setSalesperson(Employee salesperson) 46 { 47 this.salesperson = salesperson; 48 } 49 50 public String getComments() 51 { 52 return comments; 53 } 54 55 public void setComments(String comments) 56 { 57 this.comments = comments; 58 } 59 } 60 | Popular Tags |