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/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 * Created on Jul 12, 2004 018 * 019 */ 020 package org.kuali.kfs.pdp.businessobject; 021 022 import java.sql.Date; 023 import java.util.LinkedHashMap; 024 025 import org.kuali.kfs.pdp.PdpPropertyConstants; 026 import org.kuali.kfs.sys.KFSPropertyConstants; 027 import org.kuali.kfs.sys.businessobject.Bank; 028 import org.kuali.kfs.sys.context.SpringContext; 029 import org.kuali.rice.kns.bo.Campus; 030 import org.kuali.rice.kns.bo.Inactivateable; 031 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase; 032 import org.kuali.rice.kns.service.KualiModuleService; 033 import org.kuali.rice.kns.util.KualiInteger; 034 035 public class DisbursementNumberRange extends PersistableBusinessObjectBase implements Inactivateable { 036 037 private String physCampusProcCode; 038 private KualiInteger beginDisbursementNbr; 039 private KualiInteger lastAssignedDisbNbr; 040 private KualiInteger endDisbursementNbr; 041 private Date disbNbrRangeStartDt; 042 private String bankCode; 043 private String disbursementTypeCode; 044 private boolean active; 045 046 private Campus campus; 047 private Bank bank; 048 private DisbursementType disbursementType; 049 050 public DisbursementNumberRange() { 051 super(); 052 } 053 054 /** 055 * @return 056 */ 057 public Bank getBank() { 058 return bank; 059 } 060 061 /** 062 * Gets the bankCode attribute. 063 * 064 * @return Returns the bankCode. 065 */ 066 public String getBankCode() { 067 return bankCode; 068 } 069 070 /** 071 * Sets the bankCode attribute value. 072 * 073 * @param bankCode The bankCode to set. 074 */ 075 public void setBankCode(String bankCode) { 076 this.bankCode = bankCode; 077 } 078 079 /** 080 * @return 081 * @hibernate.property column="BEG_DISB_NBR" 082 */ 083 public KualiInteger getBeginDisbursementNbr() { 084 return beginDisbursementNbr; 085 } 086 087 /** 088 * @return 089 * @hibernate.property column="END_DISB_NBR" 090 */ 091 public KualiInteger getEndDisbursementNbr() { 092 return endDisbursementNbr; 093 } 094 095 /** 096 * @return 097 * @hibernate.property column="LST_ASND_DISB_NBR" 098 */ 099 public KualiInteger getLastAssignedDisbNbr() { 100 return lastAssignedDisbNbr; 101 } 102 103 /** 104 * @return 105 * @hibernate.property column="PHYS_CMP_PROC_CD" length="2" 106 */ 107 public String getPhysCampusProcCode() { 108 return physCampusProcCode; 109 } 110 111 /** 112 * @param Bank 113 */ 114 @Deprecated 115 public void setBank(Bank bank) { 116 this.bank = bank; 117 } 118 119 /** 120 * @param integer 121 */ 122 public void setBeginDisbursementNbr(KualiInteger integer) { 123 beginDisbursementNbr = integer; 124 } 125 126 /** 127 * @param integer 128 */ 129 public void setEndDisbursementNbr(KualiInteger integer) { 130 endDisbursementNbr = integer; 131 } 132 133 /** 134 * @param integer 135 */ 136 public void setLastAssignedDisbNbr(KualiInteger integer) { 137 lastAssignedDisbNbr = integer; 138 } 139 140 /** 141 * @param string 142 */ 143 public void setPhysCampusProcCode(String string) { 144 physCampusProcCode = string; 145 } 146 147 /** 148 * Gets the disbursementTypeCode attribute. 149 * 150 * @return Returns the disbursementTypeCode. 151 */ 152 public String getDisbursementTypeCode() { 153 return disbursementTypeCode; 154 } 155 156 /** 157 * Sets the disbursementTypeCode attribute value. 158 * 159 * @param disbursementTypeCode The disbursementTypeCode to set. 160 */ 161 public void setDisbursementTypeCode(String disbursementTypeCode) { 162 this.disbursementTypeCode = disbursementTypeCode; 163 } 164 165 /** 166 * Gets the disbursementType attribute. 167 * 168 * @return Returns the disbursementType. 169 */ 170 public DisbursementType getDisbursementType() { 171 return disbursementType; 172 } 173 174 /** 175 * Sets the disbursementType attribute value. 176 * 177 * @param disbursementType The disbursementType to set. 178 */ 179 public void setDisbursementType(DisbursementType disbursementType) { 180 this.disbursementType = disbursementType; 181 } 182 183 /** 184 * Gets the campus attribute. 185 * 186 * @return Returns the campus. 187 */ 188 public Campus getCampus() { 189 return campus = (Campus) SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(Campus.class).retrieveExternalizableBusinessObjectIfNecessary(this, campus, "campus"); 190 } 191 192 /** 193 * Sets the campus attribute value. 194 * 195 * @param campus The campus to set. 196 */ 197 public void setCampus(Campus campus) { 198 this.campus = campus; 199 } 200 201 /** 202 * @see org.kuali.rice.kns.bo.Inactivateable#isActive() 203 */ 204 public boolean isActive() { 205 return active; 206 } 207 208 /** 209 * @see org.kuali.rice.kns.bo.Inactivateable#setActive(boolean) 210 */ 211 public void setActive(boolean active) { 212 this.active = active; 213 } 214 215 /** 216 * Gets the disbNbrRangeStartDt attribute. 217 * 218 * @return Returns the disbNbrRangeStartDt. 219 */ 220 public Date getDisbNbrRangeStartDt() { 221 return disbNbrRangeStartDt; 222 } 223 224 /** 225 * Sets the disbNbrRangeStartDt attribute value. 226 * 227 * @param disbNbrRangeStartDt The disbNbrRangeStartDt to set. 228 */ 229 public void setDisbNbrRangeStartDt(Date disbNbrRangeStartDt) { 230 this.disbNbrRangeStartDt = disbNbrRangeStartDt; 231 } 232 233 /** 234 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper() 235 */ 236 @Override 237 protected LinkedHashMap toStringMapper() { 238 LinkedHashMap m = new LinkedHashMap(); 239 m.put(PdpPropertyConstants.PHYS_CAMPUS_PROC_CODE, this.physCampusProcCode); 240 m.put(PdpPropertyConstants.DISBURSEMENT_TYPE_CODE, this.disbursementTypeCode); 241 m.put(KFSPropertyConstants.BANK_CODE, this.bankCode); 242 m.put(PdpPropertyConstants.DISBURSEMENT_NUMBER_RANGE_START_DATE, this.disbNbrRangeStartDt); 243 244 return m; 245 } 246 }