001    /**
002     * Copyright 2005-2014 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.core.api.util.type.KualiPercent;
019    import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
020    
021    import javax.persistence.CascadeType;
022    import javax.persistence.Column;
023    import javax.persistence.Entity;
024    import javax.persistence.FetchType;
025    import javax.persistence.Id;
026    import javax.persistence.JoinColumn;
027    import javax.persistence.ManyToOne;
028    import javax.persistence.Table;
029    import java.util.Date;
030    
031    @Entity
032    @Table(name="TRV_ACCT")
033    public class TravelAccount extends PersistableBusinessObjectBase {
034        
035            private static final long serialVersionUID = -7739303391609093875L;
036            
037            @Id
038            @Column(name="acct_num")
039            private String number;
040            
041            private String subAccount;
042        
043            @Column(name="acct_name")
044            private String name;
045            
046            private String subAccountName;
047            
048            private KualiPercent subsidizedPercent;
049            
050            private Date createDate;
051        
052            public Date getCreateDate() {
053            return this.createDate;
054        }
055    
056        @Column(name="acct_fo_id")
057            private Long foId;
058        
059        @ManyToOne(fetch=FetchType.EAGER, cascade={CascadeType.PERSIST, CascadeType.MERGE})
060            @JoinColumn(name="acct_fo_id", insertable=false, updatable=false)
061            private FiscalOfficer fiscalOfficer;  
062        
063        public String getName() {
064            return name;
065        }
066    
067        public void setName(String name) {
068            this.name = name;
069        }
070    
071        public String getNumber() {
072            return number;
073        }
074    
075        public void setNumber(String number) {
076            this.number = number;
077        }
078    
079        public FiscalOfficer getFiscalOfficer() {
080            return fiscalOfficer;
081        }
082    
083        public void setFiscalOfficer(FiscalOfficer fiscalOfficer) {
084            this.fiscalOfficer = fiscalOfficer;
085        }
086    
087        public Long getFoId() {
088            return foId;
089        }
090    
091        public void setFoId(Long foId) {
092            this.foId = foId;
093        }
094    
095        public String getSubAccount() {
096            return this.subAccount;
097        }
098    
099        public void setSubAccount(String subAccount) {
100            this.subAccount = subAccount;
101        }
102    
103        public String getSubAccountName() {
104            return this.subAccountName;
105        }
106    
107        public void setSubAccountName(String subAccountName) {
108            this.subAccountName = subAccountName;
109        }
110    
111        public KualiPercent getSubsidizedPercent() {
112            return this.subsidizedPercent;
113        }
114    
115        public void setSubsidizedPercent(KualiPercent subsidizedPercent) {
116            this.subsidizedPercent = subsidizedPercent;
117        }
118    
119        public void setCreateDate(Date createDate) {
120            this.createDate = createDate;
121        }
122        
123    }