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 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   * @author Kuali Rice Team (rice.collab@kuali.org)
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  }