001/* 002 * Copyright 2006 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 017package org.kuali.ole.coa.businessobject; 018 019import java.util.ArrayList; 020import java.util.Collection; 021import java.util.List; 022 023import org.kuali.rice.krad.bo.PersistableBusinessObject; 024import org.kuali.rice.krad.bo.PersistableBusinessObjectBase; 025 026/** 027 * 028 */ 029public class A21SubAccount extends PersistableBusinessObjectBase { 030 031 private static final long serialVersionUID = 2983753447370117974L; 032 033 protected String chartOfAccountsCode; 034 protected String accountNumber; 035 protected String subAccountNumber; 036 protected String subAccountTypeCode; 037 protected String indirectCostRecoveryTypeCode; 038 protected String financialIcrSeriesIdentifier; 039 protected boolean offCampusCode; 040 protected String costShareChartOfAccountCode; 041 protected String costShareSourceAccountNumber; 042 protected String costShareSourceSubAccountNumber; 043 044 protected Chart costShareChartOfAccount; 045 protected Account costShareAccount; 046 protected SubAccount costShareSourceSubAccount; 047 protected IndirectCostRecoveryType indirectCostRecoveryType; 048 protected Chart chartOfAccounts; 049 protected Account account; 050 051 protected List<A21IndirectCostRecoveryAccount> a21IndirectCostRecoveryAccounts; 052 053 /** 054 * 055 */ 056 public A21SubAccount() { 057 super(); 058 a21IndirectCostRecoveryAccounts = new ArrayList<A21IndirectCostRecoveryAccount>(); 059 } 060 061 /** 062 * Gets the serialVersionUID attribute. 063 * 064 * @return Returns the serialVersionUID. 065 */ 066 public static long getSerialVersionUID() { 067 return serialVersionUID; 068 } 069 070 /** 071 * Gets the accountNumber attribute. 072 * 073 * @return Returns the accountNumber. 074 */ 075 public String getAccountNumber() { 076 return accountNumber; 077 } 078 079 /** 080 * Sets the accountNumber attribute value. 081 * 082 * @param accountNumber The accountNumber to set. 083 */ 084 public void setAccountNumber(String accountNumber) { 085 this.accountNumber = accountNumber; 086 } 087 088 /** 089 * Gets the chartOfAccountsCode attribute. 090 * 091 * @return Returns the chartOfAccountsCode. 092 */ 093 public String getChartOfAccountsCode() { 094 return chartOfAccountsCode; 095 } 096 097 /** 098 * Sets the chartOfAccountsCode attribute value. 099 * 100 * @param chartOfAccountsCode The chartOfAccountsCode to set. 101 */ 102 public void setChartOfAccountsCode(String chartOfAccountsCode) { 103 this.chartOfAccountsCode = chartOfAccountsCode; 104 } 105 106 /** 107 * Gets the indirectCostRecoveryType attribute. 108 * 109 * @return Returns the indirectCostRecoveryType. 110 */ 111 public IndirectCostRecoveryType getIndirectCostRecoveryType() { 112 return indirectCostRecoveryType; 113 } 114 115 /** 116 * Sets the indirectCostRecoveryType attribute value. 117 * 118 * @param indirectCostRecoveryType The indirectCostRecoveryType to set. 119 */ 120 public void setIndirectCostRecoveryType(IndirectCostRecoveryType icrTypeCode) { 121 this.indirectCostRecoveryType = icrTypeCode; 122 } 123 124 /** 125 * Gets the indirectCostRecoveryTypeCode attribute. 126 * 127 * @return Returns the indirectCostRecoveryTypeCode. 128 */ 129 public String getIndirectCostRecoveryTypeCode() { 130 return indirectCostRecoveryTypeCode; 131 } 132 133 /** 134 * Sets the indirectCostRecoveryTypeCode attribute value. 135 * 136 * @param indirectCostRecoveryTypeCode The indirectCostRecoveryTypeCode to set. 137 */ 138 public void setIndirectCostRecoveryTypeCode(String indirectCostRecoveryTypeCode) { 139 this.indirectCostRecoveryTypeCode = indirectCostRecoveryTypeCode; 140 } 141 142 /** 143 * Gets the financialIcrSeriesIdentifier attribute. 144 * 145 * @return Returns the financialIcrSeriesIdentifier. 146 */ 147 public String getFinancialIcrSeriesIdentifier() { 148 return financialIcrSeriesIdentifier; 149 } 150 151 /** 152 * Sets the financialIcrSeriesIdentifier attribute value. 153 * 154 * @param financialIcrSeriesIdentifier The financialIcrSeriesIdentifier to set. 155 */ 156 public void setFinancialIcrSeriesIdentifier(String financialIcrSeriesIdentifier) { 157 this.financialIcrSeriesIdentifier = financialIcrSeriesIdentifier; 158 } 159 160 /** 161 * Gets the subAccountNumber attribute. 162 * 163 * @return Returns the subAccountNumber. 164 */ 165 public String getSubAccountNumber() { 166 return subAccountNumber; 167 } 168 169 /** 170 * Sets the subAccountNumber attribute value. 171 * 172 * @param subAccountNumber The subAccountNumber to set. 173 */ 174 public void setSubAccountNumber(String subAccountNumber) { 175 this.subAccountNumber = subAccountNumber; 176 } 177 178 /** 179 * Gets the subAccountTypeCode attribute. 180 * 181 * @return Returns the subAccountTypeCode. 182 */ 183 public String getSubAccountTypeCode() { 184 return subAccountTypeCode; 185 } 186 187 /** 188 * Sets the subAccountTypeCode attribute value. 189 * 190 * @param subAccountTypeCode The subAccountTypeCode to set. 191 */ 192 public void setSubAccountTypeCode(String subAccountTypeCode) { 193 this.subAccountTypeCode = subAccountTypeCode; 194 } 195 196 /** 197 * Gets the costShareAccount attribute. 198 * 199 * @return Returns the costShareAccount. 200 */ 201 public Account getCostShareAccount() { 202 return costShareAccount; 203 } 204 205 /** 206 * Sets the costShareAccount attribute value. 207 * 208 * @param costShareAccount The costShareAccount to set. 209 */ 210 public void setCostShareAccount(Account costShareAccount) { 211 this.costShareAccount = costShareAccount; 212 } 213 214 /** 215 * Gets the costShareChartOfAccount attribute. 216 * 217 * @return Returns the costShareChartOfAccount. 218 */ 219 public Chart getCostShareChartOfAccount() { 220 return costShareChartOfAccount; 221 } 222 223 /** 224 * Sets the costShareChartOfAccount attribute value. 225 * 226 * @param costShareChartOfAccount The costShareChartOfAccount to set. 227 */ 228 public void setCostShareChartOfAccount(Chart costShareChartOfAccount) { 229 this.costShareChartOfAccount = costShareChartOfAccount; 230 } 231 232 /** 233 * Gets the costShareChartOfAccountCode attribute. 234 * 235 * @return Returns the costShareChartOfAccountCode. 236 */ 237 public String getCostShareChartOfAccountCode() { 238 return costShareChartOfAccountCode; 239 } 240 241 /** 242 * Sets the costShareChartOfAccountCode attribute value. 243 * 244 * @param costShareChartOfAccountCode The costShareChartOfAccountCode to set. 245 */ 246 public void setCostShareChartOfAccountCode(String costShareChartOfAccountCode) { 247 this.costShareChartOfAccountCode = costShareChartOfAccountCode; 248 } 249 250 /** 251 * Gets the costShareSourceAccountNumber attribute. 252 * 253 * @return Returns the costShareSourceAccountNumber. 254 */ 255 public String getCostShareSourceAccountNumber() { 256 return costShareSourceAccountNumber; 257 } 258 259 /** 260 * Sets the costShareSourceAccountNumber attribute value. 261 * 262 * @param costShareSourceAccountNumber The costShareSourceAccountNumber to set. 263 */ 264 public void setCostShareSourceAccountNumber(String costShareSourceAccountNumber) { 265 this.costShareSourceAccountNumber = costShareSourceAccountNumber; 266 } 267 268 /** 269 * Gets the costShareSourceSubAccount attribute. 270 * 271 * @return Returns the costShareSourceSubAccount. 272 */ 273 public SubAccount getCostShareSourceSubAccount() { 274 return costShareSourceSubAccount; 275 } 276 277 /** 278 * Sets the costShareSourceSubAccount attribute value. 279 * 280 * @param costShareSourceSubAccount The costShareSourceSubAccount to set. 281 */ 282 public void setCostShareSourceSubAccount(SubAccount costShareSourceSubAccount) { 283 this.costShareSourceSubAccount = costShareSourceSubAccount; 284 } 285 286 /** 287 * Gets the costShareSourceSubAccountNumber attribute. 288 * 289 * @return Returns the costShareSourceSubAccountNumber. 290 */ 291 public String getCostShareSourceSubAccountNumber() { 292 return costShareSourceSubAccountNumber; 293 } 294 295 /** 296 * Sets the costShareSourceSubAccountNumber attribute value. 297 * 298 * @param costShareSourceSubAccountNumber The costShareSourceSubAccountNumber to set. 299 */ 300 public void setCostShareSourceSubAccountNumber(String costShareSourceSubAccountNumber) { 301 this.costShareSourceSubAccountNumber = costShareSourceSubAccountNumber; 302 } 303 304 /** 305 * Gets the offCampusCode attribute. 306 * 307 * @return Returns the offCampusCode. 308 */ 309 public boolean getOffCampusCode() { 310 return offCampusCode; 311 } 312 313 /** 314 * Sets the offCampusCode attribute value. 315 * 316 * @param offCampusCode The offCampusCode to set. 317 */ 318 public void setOffCampusCode(boolean offCampusCode) { 319 this.offCampusCode = offCampusCode; 320 } 321 322 /** 323 * Gets the account attribute. 324 * 325 * @return Returns the account. 326 */ 327 public Account getAccount() { 328 return account; 329 } 330 331 /** 332 * Sets the account attribute value. 333 * 334 * @param account The account to set. 335 * @deprecated 336 */ 337 public void setAccount(Account account) { 338 this.account = account; 339 } 340 341 /** 342 * Gets the chartOfAccounts attribute. 343 * 344 * @return Returns the chartOfAccounts. 345 */ 346 public Chart getChartOfAccounts() { 347 return chartOfAccounts; 348 } 349 350 /** 351 * Sets the chartOfAccounts attribute value. 352 * 353 * @param chartOfAccounts The chartOfAccounts to set. 354 * @deprecated 355 */ 356 public void setChartOfAccounts(Chart chartOfAccounts) { 357 this.chartOfAccounts = chartOfAccounts; 358 } 359 360 public List<A21IndirectCostRecoveryAccount> getA21IndirectCostRecoveryAccounts() { 361 return a21IndirectCostRecoveryAccounts; 362 } 363 364 public List<A21IndirectCostRecoveryAccount> getA21ActiveIndirectCostRecoveryAccounts() { 365 List<A21IndirectCostRecoveryAccount> activeList = new ArrayList<A21IndirectCostRecoveryAccount>(); 366 for (A21IndirectCostRecoveryAccount icr : getA21IndirectCostRecoveryAccounts()){ 367 if (icr.isActive()){ 368 activeList.add(A21IndirectCostRecoveryAccount.copyICRAccount(icr)); 369 } 370 } 371 return activeList; 372 } 373 374 public void setA21IndirectCostRecoveryAccounts(List<A21IndirectCostRecoveryAccount> a21IndirectCostRecoveryAccounts) { 375 this.a21IndirectCostRecoveryAccounts = a21IndirectCostRecoveryAccounts; 376 } 377 378 /** 379 * @see org.kuali.rice.krad.bo.PersistableBusinessObjectBase#buildListOfDeletionAwareLists() 380 */ 381 @Override 382 public List buildListOfDeletionAwareLists() { 383 List<Collection<PersistableBusinessObject>> managedLists = super.buildListOfDeletionAwareLists(); 384 managedLists.add( new ArrayList<PersistableBusinessObject>( getA21IndirectCostRecoveryAccounts() ) ); 385 return managedLists; 386 } 387 388}