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