1 package myorg.relex.one2one;
2
3 import javax.persistence.*;
4
5
6
7
8
9 @Entity
10 @Table(name="RELATIONEX_APPLICANT")
11 public class Applicant {
12 @Id @GeneratedValue
13 private int id;
14 @Column(length=32)
15 private String name;
16
17 @OneToOne(
18 mappedBy="applicant",
19 fetch=FetchType.LAZY)
20
21 private Application application;
22
23 public Applicant(){}
24 public Applicant(int id) {
25 this.id = id;
26 }
27
28 public int getId() { return id; }
29
30 public String getName() { return name; }
31 public void setName(String name) {
32 this.name = name;
33 }
34
35 public Application getApplication() { return application; }
36 public void setApplication(Application application) {
37 this.application = application;
38 }
39 }