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 package org.kuali.kfs.module.bc.businessobject; 018 019 import java.util.LinkedHashMap; 020 021 import org.kuali.kfs.coa.businessobject.Account; 022 import org.kuali.kfs.coa.businessobject.Chart; 023 import org.kuali.kfs.coa.businessobject.SubAccount; 024 import org.kuali.kfs.sys.context.SpringContext; 025 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase; 026 import org.kuali.rice.kim.bo.Person; 027 import org.kuali.rice.kim.service.PersonService; 028 029 /** 030 * 031 */ 032 public class BudgetConstructionFundingLock extends PersistableBusinessObjectBase { 033 034 private String appointmentFundingLockUserId; 035 private String accountNumber; 036 private String subAccountNumber; 037 private String chartOfAccountsCode; 038 private Integer universityFiscalYear; 039 private String fill1; 040 private String fill2; 041 private String fill3; 042 private String fill4; 043 private String fill5; 044 045 private Account account; 046 private Chart chartOfAccounts; 047 private SubAccount subAccount; 048 private Person appointmentFundingLockUser; 049 050 // dummy field associated with locked position 051 // value of "NotFnd" indicates an orphan lock 052 private String positionNumber; 053 054 /** 055 * Default constructor. 056 */ 057 public BudgetConstructionFundingLock() { 058 059 } 060 061 /** 062 * Gets the appointmentFundingLockUserId attribute. 063 * 064 * @return Returns the appointmentFundingLockUserId 065 */ 066 public String getAppointmentFundingLockUserId() { 067 return appointmentFundingLockUserId; 068 } 069 070 /** 071 * Sets the appointmentFundingLockUserId attribute. 072 * 073 * @param appointmentFundingLockUserId The appointmentFundingLockUserId to set. 074 */ 075 public void setAppointmentFundingLockUserId(String appointmentFundingLockUserId) { 076 this.appointmentFundingLockUserId = appointmentFundingLockUserId; 077 } 078 079 080 /** 081 * Gets the accountNumber attribute. 082 * 083 * @return Returns the accountNumber 084 */ 085 public String getAccountNumber() { 086 return accountNumber; 087 } 088 089 /** 090 * Sets the accountNumber attribute. 091 * 092 * @param accountNumber The accountNumber to set. 093 */ 094 public void setAccountNumber(String accountNumber) { 095 this.accountNumber = accountNumber; 096 } 097 098 099 /** 100 * Gets the subAccountNumber attribute. 101 * 102 * @return Returns the subAccountNumber 103 */ 104 public String getSubAccountNumber() { 105 return subAccountNumber; 106 } 107 108 /** 109 * Sets the subAccountNumber attribute. 110 * 111 * @param subAccountNumber The subAccountNumber to set. 112 */ 113 public void setSubAccountNumber(String subAccountNumber) { 114 this.subAccountNumber = subAccountNumber; 115 } 116 117 118 /** 119 * Gets the chartOfAccountsCode attribute. 120 * 121 * @return Returns the chartOfAccountsCode 122 */ 123 public String getChartOfAccountsCode() { 124 return chartOfAccountsCode; 125 } 126 127 /** 128 * Sets the chartOfAccountsCode attribute. 129 * 130 * @param chartOfAccountsCode The chartOfAccountsCode to set. 131 */ 132 public void setChartOfAccountsCode(String chartOfAccountsCode) { 133 this.chartOfAccountsCode = chartOfAccountsCode; 134 } 135 136 137 /** 138 * Gets the universityFiscalYear attribute. 139 * 140 * @return Returns the universityFiscalYear 141 */ 142 public Integer getUniversityFiscalYear() { 143 return universityFiscalYear; 144 } 145 146 /** 147 * Sets the universityFiscalYear attribute. 148 * 149 * @param universityFiscalYear The universityFiscalYear to set. 150 */ 151 public void setUniversityFiscalYear(Integer universityFiscalYear) { 152 this.universityFiscalYear = universityFiscalYear; 153 } 154 155 156 /** 157 * Gets the fill1 attribute. 158 * 159 * @return Returns the fill1 160 */ 161 public String getFill1() { 162 return fill1; 163 } 164 165 /** 166 * Sets the fill1 attribute. 167 * 168 * @param fill1 The fill1 to set. 169 */ 170 public void setFill1(String fill1) { 171 this.fill1 = fill1; 172 } 173 174 175 /** 176 * Gets the fill2 attribute. 177 * 178 * @return Returns the fill2 179 */ 180 public String getFill2() { 181 return fill2; 182 } 183 184 /** 185 * Sets the fill2 attribute. 186 * 187 * @param fill2 The fill2 to set. 188 */ 189 public void setFill2(String fill2) { 190 this.fill2 = fill2; 191 } 192 193 194 /** 195 * Gets the fill3 attribute. 196 * 197 * @return Returns the fill3 198 */ 199 public String getFill3() { 200 return fill3; 201 } 202 203 /** 204 * Sets the fill3 attribute. 205 * 206 * @param fill3 The fill3 to set. 207 */ 208 public void setFill3(String fill3) { 209 this.fill3 = fill3; 210 } 211 212 213 /** 214 * Gets the fill4 attribute. 215 * 216 * @return Returns the fill4 217 */ 218 public String getFill4() { 219 return fill4; 220 } 221 222 /** 223 * Sets the fill4 attribute. 224 * 225 * @param fill4 The fill4 to set. 226 */ 227 public void setFill4(String fill4) { 228 this.fill4 = fill4; 229 } 230 231 232 /** 233 * Gets the fill5 attribute. 234 * 235 * @return Returns the fill5 236 */ 237 public String getFill5() { 238 return fill5; 239 } 240 241 /** 242 * Sets the fill5 attribute. 243 * 244 * @param fill5 The fill5 to set. 245 */ 246 public void setFill5(String fill5) { 247 this.fill5 = fill5; 248 } 249 250 251 /** 252 * Gets the account attribute. 253 * 254 * @return Returns the account 255 */ 256 public Account getAccount() { 257 return account; 258 } 259 260 /** 261 * Sets the account attribute. 262 * 263 * @param account The account to set. 264 * @deprecated 265 */ 266 public void setAccount(Account account) { 267 this.account = account; 268 } 269 270 /** 271 * Gets the chartOfAccounts attribute. 272 * 273 * @return Returns the chartOfAccounts 274 */ 275 public Chart getChartOfAccounts() { 276 return chartOfAccounts; 277 } 278 279 /** 280 * Sets the chartOfAccounts attribute. 281 * 282 * @param chartOfAccounts The chartOfAccounts to set. 283 * @deprecated 284 */ 285 public void setChartOfAccounts(Chart chartOfAccounts) { 286 this.chartOfAccounts = chartOfAccounts; 287 } 288 289 /** 290 * Gets the subAccount attribute. 291 * 292 * @return Returns the subAccount. 293 */ 294 public SubAccount getSubAccount() { 295 return subAccount; 296 } 297 298 /** 299 * Sets the subAccount attribute value. 300 * 301 * @param subAccount The subAccount to set. 302 * @deprecated 303 */ 304 public void setSubAccount(SubAccount subAccount) { 305 this.subAccount = subAccount; 306 } 307 308 /** 309 * Gets the appointmentFundingLockUser attribute. 310 * 311 * @return Returns the appointmentFundingLockUser. 312 */ 313 public Person getAppointmentFundingLockUser() { 314 appointmentFundingLockUser = SpringContext.getBean(org.kuali.rice.kim.service.PersonService.class).updatePersonIfNecessary(appointmentFundingLockUserId, appointmentFundingLockUser); 315 return appointmentFundingLockUser; 316 } 317 318 /** 319 * Sets the appointmentFundingLockUser attribute. 320 * 321 * @param appointmentFundingLockUser The appointmentFundingLockUser to set. 322 * @deprecated 323 */ 324 public void setAppointmentFundingLockUser(Person appointmentFundingLockUser) { 325 this.appointmentFundingLockUser = appointmentFundingLockUser; 326 } 327 328 /** 329 * Gets the positionNumber attribute. 330 * 331 * @return Returns the positionNumber. 332 */ 333 public String getPositionNumber() { 334 return positionNumber; 335 } 336 337 /** 338 * Sets the positionNumber attribute. 339 * 340 * @param positionNumber The positionNumber to set. 341 */ 342 public void setPositionNumber(String positionNumber) { 343 this.positionNumber = positionNumber; 344 } 345 346 /** 347 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper() 348 */ 349 protected LinkedHashMap toStringMapper() { 350 LinkedHashMap m = new LinkedHashMap(); 351 m.put("appointmentFundingLockUserId", this.appointmentFundingLockUserId); 352 m.put("accountNumber", this.accountNumber); 353 m.put("subAccountNumber", this.subAccountNumber); 354 m.put("chartOfAccountsCode", this.chartOfAccountsCode); 355 if (this.universityFiscalYear != null) { 356 m.put("universityFiscalYear", this.universityFiscalYear.toString()); 357 } 358 m.put("fill1", this.fill1); 359 return m; 360 } 361 } 362