001/* 002 * Copyright 2011 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl1.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package edu.sampleu.travel.dataobject; 017 018import org.kuali.rice.krad.data.provider.annotation.ExtensionFor; 019 020import javax.persistence.Column; 021import javax.persistence.Entity; 022import javax.persistence.FetchType; 023import javax.persistence.Id; 024import javax.persistence.JoinColumn; 025import javax.persistence.OneToOne; 026import javax.persistence.Table; 027import java.io.Serializable; 028 029/** 030 * 031 * @author Kuali Rice Team (rice.collab@kuali.org) 032 */ 033@Entity 034@Table(name = "TRVL_AUTH_DOC_EXT_T") 035@ExtensionFor(TravelAuthorizationDocument.class) 036public class TravelAuthorizationDocumentExtension implements Serializable { 037 private static final long serialVersionUID = 1L; 038 039 @Column(name = "DOC_HDR_ID", insertable=false, updatable=false) 040 protected String documentNumber; 041 042 @Id 043 @OneToOne(fetch=FetchType.LAZY) 044 @JoinColumn(name = "DOC_HDR_ID", referencedColumnName="TRVL_AUTH_DOC_ID") 045 private TravelAuthorizationDocument document; 046 047 @Column(name="ANOTHER_PROP", length=10) 048 protected String anotherProperty; 049 050 public String getAnotherProperty() { 051 return this.anotherProperty; 052 } 053 054 public void setAnotherProperty(String anotherProperty) { 055 this.anotherProperty = anotherProperty; 056 } 057 058 public TravelAuthorizationDocument getDocument() { 059 return this.document; 060 } 061 062 public void setDocument(TravelAuthorizationDocument document) { 063 this.document = document; 064 } 065 066 public String getDocumentNumber() { 067 return this.documentNumber; 068 } 069 070 public void setDocumentNumber(String documentNumber) { 071 this.documentNumber = documentNumber; 072 } 073}