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 java.io.Serializable;
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;
027
028import org.kuali.rice.krad.data.provider.annotation.ExtensionFor;
029
030/**
031 *
032 * @author Kuali Rice Team (rice.collab@kuali.org)
033 */
034@Entity
035@Table(name = "TRVL_AUTH_DOC_EXT_T")
036@ExtensionFor(TravelAuthorizationDocument.class)
037public class TravelAuthorizationDocumentExtension implements Serializable {
038    private static final long serialVersionUID = 1L;
039
040    @Column(name = "DOC_HDR_ID", insertable=false, updatable=false)
041    protected String documentNumber;
042
043    @Id
044    @OneToOne(fetch=FetchType.LAZY)
045    @JoinColumn(name = "DOC_HDR_ID", referencedColumnName="TRVL_AUTH_DOC_ID")
046    private TravelAuthorizationDocument document;
047
048    @Column(name="ANOTHER_PROP", length=10)
049    protected String anotherProperty;
050
051    public String getAnotherProperty() {
052        return this.anotherProperty;
053    }
054
055    public void setAnotherProperty(String anotherProperty) {
056        this.anotherProperty = anotherProperty;
057    }
058
059    public TravelAuthorizationDocument getDocument() {
060        return this.document;
061    }
062
063    public void setDocument(TravelAuthorizationDocument document) {
064        this.document = document;
065    }
066
067    public String getDocumentNumber() {
068        return this.documentNumber;
069    }
070
071    public void setDocumentNumber(String documentNumber) {
072        this.documentNumber = documentNumber;
073    }
074}