001    /**
002     * Copyright 2005-2013 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/ecl2.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     */
016    package edu.sampleu.travel.bo;
017    
018    import org.kuali.rice.krad.bo.PersistableBusinessObjectExtensionBase;
019    
020    import javax.persistence.*;
021    
022    @Entity
023    @Table(name="TRV_ACCT_EXT")
024    public class TravelAccountExtension extends PersistableBusinessObjectExtensionBase {
025        private static final long serialVersionUID = -520222959801026298L;
026    
027            @Id
028            @Column(name="acct_num")
029            private String number;
030        
031        @Column(name="acct_type")
032            private String accountTypeCode;
033        
034        @OneToOne(fetch=FetchType.EAGER)
035            @JoinColumn(name="acct_type", insertable=false, updatable=false)
036            private TravelAccountType accountType; 
037        
038        public String getNumber() {
039            return number;
040        }
041    
042        public void setNumber(String number) {
043            this.number = number;
044        }
045    
046        public String getAccountTypeCode() {
047            return accountTypeCode;
048        }
049    
050        public void setAccountTypeCode(String accountTypeCode) {
051            this.accountTypeCode = accountTypeCode;
052        }
053    
054            public TravelAccountType getAccountType() {
055                    return accountType;
056            }
057    
058            public void setAccountType(TravelAccountType accountType) {
059                    this.accountType = accountType;
060            }
061    
062     
063    }