1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.sampleu.travel.dataobject;
17
18 import org.kuali.rice.krad.data.provider.annotation.ExtensionFor;
19
20 import javax.persistence.Column;
21 import javax.persistence.Entity;
22 import javax.persistence.FetchType;
23 import javax.persistence.Id;
24 import javax.persistence.JoinColumn;
25 import javax.persistence.OneToOne;
26 import javax.persistence.Table;
27 import java.io.Serializable;
28
29
30
31
32
33 @Entity
34 @Table(name = "TRVL_AUTH_DOC_EXT_T")
35 @ExtensionFor(TravelAuthorizationDocument.class)
36 public class TravelAuthorizationDocumentExtension implements Serializable {
37 private static final long serialVersionUID = 1L;
38
39 @Column(name = "DOC_HDR_ID", insertable=false, updatable=false)
40 protected String documentNumber;
41
42 @Id
43 @OneToOne(fetch=FetchType.LAZY)
44 @JoinColumn(name = "DOC_HDR_ID", referencedColumnName="TRVL_AUTH_DOC_ID")
45 private TravelAuthorizationDocument document;
46
47 @Column(name="ANOTHER_PROP", length=10)
48 protected String anotherProperty;
49
50 public String getAnotherProperty() {
51 return this.anotherProperty;
52 }
53
54 public void setAnotherProperty(String anotherProperty) {
55 this.anotherProperty = anotherProperty;
56 }
57
58 public TravelAuthorizationDocument getDocument() {
59 return this.document;
60 }
61
62 public void setDocument(TravelAuthorizationDocument document) {
63 this.document = document;
64 }
65
66 public String getDocumentNumber() {
67 return this.documentNumber;
68 }
69
70 public void setDocumentNumber(String documentNumber) {
71 this.documentNumber = documentNumber;
72 }
73 }