View Javadoc
1   /*
2    * Copyright 2011 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl1.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
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   * @author Kuali Rice Team (rice.collab@kuali.org)
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  }