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