KickJava   Java API By Example, From Geeks To Geeks.

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


1 //$Id: Customer.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.Inheritance;
6 import javax.persistence.InheritanceType;
7 import javax.persistence.JoinColumn;
8 import javax.persistence.OneToOne;
9 import javax.persistence.Table;
10
11 /**
12  * @author Emmanuel Bernard
13  */

14 @Entity
15         @Table(name = "CUSTOMER_TABLE")
16         @Inheritance(strategy = InheritanceType.JOINED)
17         public class Customer extends Person {
18     private Employee salesperson;
19     private String JavaDoc comments;
20
21     @OneToOne
22             @JoinColumn(name = "salesperson")
23             public Employee getSalesperson() {
24         return salesperson;
25     }
26
27     public void setSalesperson(Employee salesperson) {
28         this.salesperson = salesperson;
29     }
30
31     public String JavaDoc getComments() {
32         return comments;
33     }
34
35     public void setComments(String JavaDoc comments) {
36         this.comments = comments;
37     }
38 }
39
Popular Tags