View Javadoc
1   /*
2    * Copyright 2005-2006 The Kuali Foundation
3    * 
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    * http://www.opensource.org/licenses/ecl2.php
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.kuali.ole.coa.businessobject;
18  
19  import java.sql.Date;
20  import java.util.ArrayList;
21  import java.util.Calendar;
22  import java.util.HashMap;
23  import java.util.List;
24  import java.util.Map;
25  
26  import org.apache.commons.lang.StringUtils;
27  import org.apache.commons.lang.time.DateUtils;
28  import org.kuali.ole.coa.service.SubFundGroupService;
29  import org.kuali.ole.sys.OLEConstants;
30  import org.kuali.ole.sys.context.SpringContext;
31  import org.kuali.rice.core.api.datetime.DateTimeService;
32  import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
33  import org.kuali.rice.kim.api.identity.Person;
34  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
35  import org.kuali.rice.krad.service.KualiModuleService;
36  import org.kuali.rice.krad.service.ModuleService;
37  import org.kuali.rice.location.api.LocationConstants;
38  import org.kuali.rice.location.framework.campus.CampusEbo;
39  import org.kuali.rice.location.framework.postalcode.PostalCodeEbo;
40  import org.kuali.rice.location.framework.state.StateEbo;
41  
42  /**
43   * 
44   */
45  public class PriorYearAccount extends PersistableBusinessObjectBase implements AccountIntf, MutableInactivatable {
46      protected static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(PriorYearAccount.class);
47  
48      protected String chartOfAccountsCode;
49      protected String accountNumber;
50      protected String accountName;
51      protected boolean accountsFringesBnftIndicator;
52      protected Date accountRestrictedStatusDate;
53      protected String accountCityName;
54      protected String accountStateCode;
55      protected String accountStreetAddress;
56      protected String accountZipCode;
57      protected Date accountCreateDate;
58      protected Date accountEffectiveDate;
59      protected Date accountExpirationDate;
60      protected String acctIndirectCostRcvyTypeCd;
61      protected String acctCustomIndCstRcvyExclCd;
62      protected String financialIcrSeriesIdentifier;
63      protected boolean accountInFinancialProcessingIndicator;
64      protected String budgetRecordingLevelCode;
65      protected String accountSufficientFundsCode;
66      protected boolean pendingAcctSufficientFundsIndicator;
67      protected boolean extrnlFinEncumSufficntFndIndicator;
68      protected boolean intrnlFinEncumSufficntFndIndicator;
69      protected boolean finPreencumSufficientFundIndicator;
70      protected boolean financialObjectivePrsctrlIndicator;
71      protected String accountCfdaNumber;
72      protected boolean accountOffCampusIndicator;
73      protected boolean active;
74  
75      protected String accountFiscalOfficerSystemIdentifier;
76      protected String accountsSupervisorySystemsIdentifier;
77      protected String accountManagerSystemIdentifier;
78      protected String organizationCode;
79      protected String accountTypeCode;
80      protected String accountPhysicalCampusCode;
81      protected String subFundGroupCode;
82      protected String financialHigherEdFunctionCd;
83      protected String accountRestrictedStatusCode;
84      protected String reportsToChartOfAccountsCode;
85      protected String reportsToAccountNumber;
86      protected String continuationFinChrtOfAcctCd;
87      protected String continuationAccountNumber;
88      protected String endowmentIncomeAcctFinCoaCd;
89      protected String endowmentIncomeAccountNumber;
90      protected String contractControlFinCoaCode;
91      protected String contractControlAccountNumber;
92      protected String incomeStreamFinancialCoaCode;
93      protected String incomeStreamAccountNumber;
94  
95      protected Chart chartOfAccounts;
96      protected Organization organization;
97      protected AccountType accountType;
98      protected CampusEbo accountPhysicalCampus;
99      protected StateEbo accountState;
100     protected SubFundGroup subFundGroup;
101     protected HigherEducationFunction financialHigherEdFunction;
102     protected RestrictedStatus accountRestrictedStatus;
103     protected Account reportsToAccount;
104     protected Account continuationAccount;
105     protected Account endowmentIncomeAccount;
106     protected Account contractControlAccount;
107     protected Account incomeStreamAccount;
108     protected Person accountFiscalOfficerUser;
109     protected Person accountSupervisoryUser;
110     protected Person accountManagerUser;
111     protected PostalCodeEbo postalZipCode;
112     protected BudgetRecordingLevel budgetRecordingLevel;
113     protected SufficientFundsCode sufficientFundsCode;
114 
115     // Several kinds of Dummy Attributes for dividing sections on Inquiry page
116     protected String accountResponsibilitySectionBlank;
117     protected String accountResponsibilitySection;
118     protected String contractsAndGrantsSectionBlank;
119     protected String contractsAndGrantsSection;
120     protected String guidelinesAndPurposeSectionBlank;
121     protected String guidelinesAndPurposeSection;
122     protected String accountDescriptionSectionBlank;
123     protected String accountDescriptionSection;
124 
125     protected AccountGuideline accountGuideline;
126     protected AccountDescription accountDescription;
127 
128     protected List subAccounts;
129     protected Boolean forContractsAndGrants;
130 
131     protected List<PriorYearIndirectCostRecoveryAccount> indirectCostRecoveryAccounts;
132 
133     /**
134      * Default no-arg constructor.
135      */
136     public PriorYearAccount() {
137         indirectCostRecoveryAccounts = new ArrayList<PriorYearIndirectCostRecoveryAccount>();
138     }
139 
140     /**
141      * Constructs a PriorYearAccount by populating fields from an Account object.
142      */
143     public PriorYearAccount(Account account) {
144         chartOfAccountsCode = account.getChartOfAccountsCode();
145         accountNumber = account.getAccountNumber();
146         accountName = account.getAccountName();
147         accountsFringesBnftIndicator = account.isAccountsFringesBnftIndicator();
148         accountRestrictedStatusDate = account.getAccountRestrictedStatusDate();
149         accountCityName = account.getAccountCityName();
150         accountStateCode = account.getAccountStateCode();
151         accountStreetAddress = account.getAccountStreetAddress();
152         accountZipCode = account.getAccountZipCode();
153         accountCreateDate = account.getAccountCreateDate();
154         accountEffectiveDate = account.getAccountEffectiveDate();
155         accountExpirationDate = account.getAccountExpirationDate();
156         acctIndirectCostRcvyTypeCd = account.getAcctIndirectCostRcvyTypeCd();
157         acctCustomIndCstRcvyExclCd = account.getAcctCustomIndCstRcvyExclCd();
158         financialIcrSeriesIdentifier = account.getFinancialIcrSeriesIdentifier();
159         accountInFinancialProcessingIndicator = account.getAccountInFinancialProcessingIndicator();
160         budgetRecordingLevelCode = account.getBudgetRecordingLevelCode();
161         accountSufficientFundsCode = account.getAccountSufficientFundsCode();
162         pendingAcctSufficientFundsIndicator = account.isPendingAcctSufficientFundsIndicator();
163         extrnlFinEncumSufficntFndIndicator = account.isExtrnlFinEncumSufficntFndIndicator();
164         intrnlFinEncumSufficntFndIndicator = account.isIntrnlFinEncumSufficntFndIndicator();
165         finPreencumSufficientFundIndicator = account.isFinPreencumSufficientFundIndicator();
166         financialObjectivePrsctrlIndicator = account.isFinancialObjectivePrsctrlIndicator();
167         accountCfdaNumber = account.getAccountCfdaNumber();
168         accountOffCampusIndicator = account.isAccountOffCampusIndicator();
169         active = account.isActive();
170 
171         accountFiscalOfficerSystemIdentifier = account.getAccountFiscalOfficerSystemIdentifier();
172         accountsSupervisorySystemsIdentifier = account.getAccountsSupervisorySystemsIdentifier();
173         accountManagerSystemIdentifier = account.getAccountManagerSystemIdentifier();
174         organizationCode = account.getOrganizationCode();
175         accountTypeCode = account.getAccountTypeCode();
176         accountPhysicalCampusCode = account.getAccountPhysicalCampusCode();
177         subFundGroupCode = account.getSubFundGroupCode();
178         financialHigherEdFunctionCd = account.getFinancialHigherEdFunctionCd();
179         accountRestrictedStatusCode = account.getAccountRestrictedStatusCode();
180         reportsToChartOfAccountsCode = account.getReportsToChartOfAccountsCode();
181         reportsToAccountNumber = account.getReportsToAccountNumber();
182         continuationFinChrtOfAcctCd = account.getContinuationFinChrtOfAcctCd();
183         continuationAccountNumber = account.getContinuationAccountNumber();
184         endowmentIncomeAcctFinCoaCd = account.getEndowmentIncomeAcctFinCoaCd();
185         endowmentIncomeAccountNumber = account.getEndowmentIncomeAccountNumber();
186         contractControlFinCoaCode = account.getContractControlFinCoaCode();
187         contractControlAccountNumber = account.getContractControlAccountNumber();
188         incomeStreamFinancialCoaCode = account.getIncomeStreamFinancialCoaCode();
189         incomeStreamAccountNumber = account.getIncomeStreamAccountNumber();
190         
191         refresh();
192     }
193 
194     /**
195      * Gets the accountNumber attribute.
196      * 
197      * @return Returns the accountNumber
198      */
199     @Override
200     public String getAccountNumber() {
201         return accountNumber;
202     }
203 
204     /**
205      * Sets the accountNumber attribute.
206      * 
207      * @param accountNumber The accountNumber to set.
208      */
209     @Override
210     public void setAccountNumber(String accountNumber) {
211         this.accountNumber = accountNumber;
212     }
213 
214     /**
215      * Gets the accountName attribute.
216      * 
217      * @return Returns the accountName
218      */
219     @Override
220     public String getAccountName() {
221         return accountName;
222     }
223 
224     /**
225      * Sets the accountName attribute.
226      * 
227      * @param accountName The accountName to set.
228      */
229     @Override
230     public void setAccountName(String accountName) {
231         this.accountName = accountName;
232     }
233 
234     /**
235      * Gets the _AccountsFringesBnftIndicator_ attribute.
236      * 
237      * @return Returns the _AccountsFringesBnftIndicator_
238      */
239     @Override
240     public boolean isAccountsFringesBnftIndicator() {
241         return accountsFringesBnftIndicator;
242     }
243 
244     /**
245      * Sets the _AccountsFringesBnftIndicator_ attribute.
246      * 
247      * @param _AccountsFringesBnftIndicator_ The _AccountsFringesBnftIndicator_ to set.
248      */
249     @Override
250     public void setAccountsFringesBnftIndicator(boolean _AccountsFringesBnftIndicator_) {
251         this.accountsFringesBnftIndicator = _AccountsFringesBnftIndicator_;
252     }
253 
254     /**
255      * Gets the accountRestrictedStatusDate attribute.
256      * 
257      * @return Returns the accountRestrictedStatusDate
258      */
259     @Override
260     public Date getAccountRestrictedStatusDate() {
261         return accountRestrictedStatusDate;
262     }
263 
264     /**
265      * Sets the accountRestrictedStatusDate attribute.
266      * 
267      * @param accountRestrictedStatusDate The accountRestrictedStatusDate to set.
268      */
269     @Override
270     public void setAccountRestrictedStatusDate(Date accountRestrictedStatusDate) {
271         this.accountRestrictedStatusDate = accountRestrictedStatusDate;
272     }
273 
274     /**
275      * Gets the accountCityName attribute.
276      * 
277      * @return Returns the accountCityName
278      */
279     @Override
280     public String getAccountCityName() {
281         return accountCityName;
282     }
283 
284     /**
285      * Sets the accountCityName attribute.
286      * 
287      * @param accountCityName The accountCityName to set.
288      */
289     @Override
290     public void setAccountCityName(String accountCityName) {
291         this.accountCityName = accountCityName;
292     }
293 
294     /**
295      * Gets the accountStateCode attribute.
296      * 
297      * @return Returns the accountStateCode
298      */
299     @Override
300     public String getAccountStateCode() {
301         return accountStateCode;
302     }
303 
304     /**
305      * Sets the accountStateCode attribute.
306      * 
307      * @param accountStateCode The accountStateCode to set.
308      */
309     @Override
310     public void setAccountStateCode(String accountStateCode) {
311         this.accountStateCode = accountStateCode;
312     }
313 
314     /**
315      * Gets the accountStreetAddress attribute.
316      * 
317      * @return Returns the accountStreetAddress
318      */
319     @Override
320     public String getAccountStreetAddress() {
321         return accountStreetAddress;
322     }
323 
324     /**
325      * Sets the accountStreetAddress attribute.
326      * 
327      * @param accountStreetAddress The accountStreetAddress to set.
328      */
329     @Override
330     public void setAccountStreetAddress(String accountStreetAddress) {
331         this.accountStreetAddress = accountStreetAddress;
332     }
333 
334     /**
335      * Gets the accountZipCode attribute.
336      * 
337      * @return Returns the accountZipCode
338      */
339     @Override
340     public String getAccountZipCode() {
341         return accountZipCode;
342     }
343 
344     /**
345      * Sets the accountZipCode attribute.
346      * 
347      * @param accountZipCode The accountZipCode to set.
348      */
349     @Override
350     public void setAccountZipCode(String accountZipCode) {
351         this.accountZipCode = accountZipCode;
352     }
353 
354     /**
355      * Gets the accountCreateDate attribute.
356      * 
357      * @return Returns the accountCreateDate
358      */
359     @Override
360     public Date getAccountCreateDate() {
361         return accountCreateDate;
362     }
363 
364     /**
365      * Sets the accountCreateDate attribute.
366      * 
367      * @param accountCreateDate The accountCreateDate to set.
368      */
369     @Override
370     public void setAccountCreateDate(Date accountCreateDate) {
371         this.accountCreateDate = accountCreateDate;
372     }
373 
374     /**
375      * Gets the accountEffectiveDate attribute.
376      * 
377      * @return Returns the accountEffectiveDate
378      */
379     @Override
380     public Date getAccountEffectiveDate() {
381         return accountEffectiveDate;
382     }
383 
384     /**
385      * Sets the accountEffectiveDate attribute.
386      * 
387      * @param accountEffectiveDate The accountEffectiveDate to set.
388      */
389     @Override
390     public void setAccountEffectiveDate(Date accountEffectiveDate) {
391         this.accountEffectiveDate = accountEffectiveDate;
392     }
393 
394     /**
395      * Gets the accountExpirationDate attribute.
396      * 
397      * @return Returns the accountExpirationDate
398      */
399     @Override
400     public Date getAccountExpirationDate() {
401         return accountExpirationDate;
402     }
403 
404     /**
405      * Sets the accountExpirationDate attribute.
406      * 
407      * @param accountExpirationDate The accountExpirationDate to set.
408      */
409     @Override
410     public void setAccountExpirationDate(Date accountExpirationDate) {
411         this.accountExpirationDate = accountExpirationDate;
412     }
413 
414     /**
415      * This method determines whether the account is expired or not. Note that if Expiration Date is the same as today, then this
416      * will return false. It will only return true if the account expiration date is one day earlier than today or earlier. Note
417      * that this logic ignores all time components when doing the comparison. It only does the before/after comparison based on date
418      * values, not time-values.
419      * 
420      * @return true or false based on the logic outlined above
421      */
422     @Override
423     public boolean isExpired() {
424         LOG.debug("entering isExpired()");
425         // dont even bother trying to test if the accountExpirationDate is null
426         if (this.accountExpirationDate == null) {
427             return false;
428         }
429 
430         return this.isExpired(SpringContext.getBean(DateTimeService.class).getCurrentCalendar());
431     }
432 
433     /**
434      * This method determines whether the account is expired or not. Note that if Expiration Date is the same date as testDate, then
435      * this will return false. It will only return true if the account expiration date is one day earlier than testDate or earlier.
436      * Note that this logic ignores all time components when doing the comparison. It only does the before/after comparison based on
437      * date values, not time-values.
438      * 
439      * @param testDate - Calendar instance with the date to test the Account's Expiration Date against. This is most commonly set to
440      *        today's date.
441      * @return true or false based on the logic outlined above
442      */
443     @Override
444     public boolean isExpired(Calendar testDate) {
445         if (LOG.isDebugEnabled()) {
446             LOG.debug("entering isExpired(" + testDate + ")");
447         }
448 
449         // dont even bother trying to test if the accountExpirationDate is null
450         if (this.accountExpirationDate == null) {
451             return false;
452         }
453 
454         // remove any time-components from the testDate
455         testDate = DateUtils.truncate(testDate, Calendar.DAY_OF_MONTH);
456 
457         // get a calendar reference to the Account Expiration
458         // date, and remove any time components
459         Calendar acctDate = Calendar.getInstance();
460         acctDate.setTime(this.accountExpirationDate);
461         acctDate = DateUtils.truncate(acctDate, Calendar.DAY_OF_MONTH);
462 
463         // if the Account Expiration Date is before the testDate
464         if (acctDate.before(testDate)) {
465             return true;
466         }
467         else {
468             return false;
469         }
470     }
471 
472     /**
473      * This method determines whether the account is expired or not. Note that if Expiration Date is the same date as testDate, then
474      * this will return false. It will only return true if the account expiration date is one day earlier than testDate or earlier.
475      * Note that this logic ignores all time components when doing the comparison. It only does the before/after comparison based on
476      * date values, not time-values.
477      * 
478      * @param testDate - java.util.Date instance with the date to test the Account's Expiration Date against. This is most commonly
479      *        set to today's date.
480      * @return true or false based on the logic outlined above
481      */
482     @Override
483     public boolean isExpired(Date testDate) {
484 
485         // dont even bother trying to test if the accountExpirationDate is null
486         if (this.accountExpirationDate == null) {
487             return false;
488         }
489 
490         Calendar acctDate = Calendar.getInstance();
491         acctDate.setTime(testDate);
492         return isExpired(acctDate);
493     }
494     
495     /**
496      * Gets the acctIndirectCostRcvyTypeCd attribute.
497      * 
498      * @return Returns the acctIndirectCostRcvyTypeCd
499      */
500     @Override
501     public String getAcctIndirectCostRcvyTypeCd() {
502         return acctIndirectCostRcvyTypeCd;
503     }
504 
505     /**
506      * Sets the acctIndirectCostRcvyTypeCd attribute.
507      * 
508      * @param acctIndirectCostRcvyTypeCd The acctIndirectCostRcvyTypeCd to set.
509      */
510     @Override
511     public void setAcctIndirectCostRcvyTypeCd(String acctIndirectCostRcvyTypeCd) {
512         this.acctIndirectCostRcvyTypeCd = acctIndirectCostRcvyTypeCd;
513     }
514 
515     /**
516      * Gets the acctCustomIndCstRcvyExclCd attribute.
517      * 
518      * @return Returns the acctCustomIndCstRcvyExclCd
519      */
520     @Override
521     public String getAcctCustomIndCstRcvyExclCd() {
522         return acctCustomIndCstRcvyExclCd;
523     }
524 
525     /**
526      * Sets the acctCustomIndCstRcvyExclCd attribute.
527      * 
528      * @param acctCustomIndCstRcvyExclCd The acctCustomIndCstRcvyExclCd to set.
529      */
530     @Override
531     public void setAcctCustomIndCstRcvyExclCd(String acctCustomIndCstRcvyExclCd) {
532         this.acctCustomIndCstRcvyExclCd = acctCustomIndCstRcvyExclCd;
533     }
534 
535     /**
536      * Gets the financialIcrSeriesIdentifier attribute.
537      * 
538      * @return Returns the financialIcrSeriesIdentifier
539      */
540     @Override
541     public String getFinancialIcrSeriesIdentifier() {
542         return financialIcrSeriesIdentifier;
543     }
544 
545     /**
546      * Sets the financialIcrSeriesIdentifier attribute.
547      * 
548      * @param financialIcrSeriesIdentifier The financialIcrSeriesIdentifier to set.
549      */
550     @Override
551     public void setFinancialIcrSeriesIdentifier(String financialIcrSeriesIdentifier) {
552         this.financialIcrSeriesIdentifier = financialIcrSeriesIdentifier;
553     }
554 
555     /**
556      * Gets the accountInFinancialProcessingIndicator attribute.
557      * 
558      * @return Returns the accountInFinancialProcessingIndicator
559      */
560     @Override
561     public boolean getAccountInFinancialProcessingIndicator() {
562         return accountInFinancialProcessingIndicator;
563     }
564 
565     /**
566      * Sets the accountInFinancialProcessingIndicator attribute.
567      * 
568      * @param accountInFinancialProcessingIndicator The accountInFinancialProcessingIndicator to set.
569      */
570     @Override
571     public void setAccountInFinancialProcessingIndicator(boolean accountInFinancialProcessingIndicator) {
572         this.accountInFinancialProcessingIndicator = accountInFinancialProcessingIndicator;
573     }
574 
575     /**
576      * Gets the budgetRecordingLevelCode attribute.
577      * 
578      * @return Returns the budgetRecordingLevelCode
579      */
580     @Override
581     public String getBudgetRecordingLevelCode() {
582         return budgetRecordingLevelCode;
583     }
584 
585     /**
586      * Sets the budgetRecordingLevelCode attribute.
587      * 
588      * @param budgetRecordingLevelCode The budgetRecordingLevelCode to set.
589      */
590     @Override
591     public void setBudgetRecordingLevelCode(String budgetRecordingLevelCode) {
592         this.budgetRecordingLevelCode = budgetRecordingLevelCode;
593     }
594 
595     /**
596      * Gets the accountSufficientFundsCode attribute.
597      * 
598      * @return Returns the accountSufficientFundsCode
599      */
600     @Override
601     public String getAccountSufficientFundsCode() {
602         return accountSufficientFundsCode;
603     }
604 
605     /**
606      * Sets the accountSufficientFundsCode attribute.
607      * 
608      * @param accountSufficientFundsCode The accountSufficientFundsCode to set.
609      */
610     @Override
611     public void setAccountSufficientFundsCode(String accountSufficientFundsCode) {
612         this.accountSufficientFundsCode = accountSufficientFundsCode;
613     }
614 
615     /**
616      * Gets the pendingAcctSufficientFundsIndicator attribute.
617      * 
618      * @return Returns the pendingAcctSufficientFundsIndicator
619      */
620     @Override
621     public boolean isPendingAcctSufficientFundsIndicator() {
622         return pendingAcctSufficientFundsIndicator;
623     }
624 
625     /**
626      * Sets the pendingAcctSufficientFundsIndicator attribute.
627      * 
628      * @param pendingAcctSufficientFundsIndicator The pendingAcctSufficientFundsIndicator to set.
629      */
630     @Override
631     public void setPendingAcctSufficientFundsIndicator(boolean pendingAcctSufficientFundsIndicator) {
632         this.pendingAcctSufficientFundsIndicator = pendingAcctSufficientFundsIndicator;
633     }
634 
635     /**
636      * Gets the extrnlFinEncumSufficntFndIndicator attribute.
637      * 
638      * @return Returns the extrnlFinEncumSufficntFndIndicator
639      */
640     @Override
641     public boolean isExtrnlFinEncumSufficntFndIndicator() {
642         return extrnlFinEncumSufficntFndIndicator;
643     }
644 
645     /**
646      * Sets the extrnlFinEncumSufficntFndIndicator attribute.
647      * 
648      * @param extrnlFinEncumSufficntFndIndicator The extrnlFinEncumSufficntFndIndicator to set.
649      */
650     @Override
651     public void setExtrnlFinEncumSufficntFndIndicator(boolean extrnlFinEncumSufficntFndIndicator) {
652         this.extrnlFinEncumSufficntFndIndicator = extrnlFinEncumSufficntFndIndicator;
653     }
654 
655     /**
656      * Gets the intrnlFinEncumSufficntFndIndicator attribute.
657      * 
658      * @return Returns the intrnlFinEncumSufficntFndIndicator
659      */
660     @Override
661     public boolean isIntrnlFinEncumSufficntFndIndicator() {
662         return intrnlFinEncumSufficntFndIndicator;
663     }
664 
665     /**
666      * Sets the intrnlFinEncumSufficntFndIndicator attribute.
667      * 
668      * @param intrnlFinEncumSufficntFndIndicator The intrnlFinEncumSufficntFndIndicator to set.
669      */
670     @Override
671     public void setIntrnlFinEncumSufficntFndIndicator(boolean intrnlFinEncumSufficntFndIndicator) {
672         this.intrnlFinEncumSufficntFndIndicator = intrnlFinEncumSufficntFndIndicator;
673     }
674 
675     /**
676      * Gets the finPreencumSufficientFundIndicator attribute.
677      * 
678      * @return Returns the finPreencumSufficientFundIndicator
679      */
680     @Override
681     public boolean isFinPreencumSufficientFundIndicator() {
682         return finPreencumSufficientFundIndicator;
683     }
684 
685     /**
686      * Sets the finPreencumSufficientFundIndicator attribute.
687      * 
688      * @param finPreencumSufficientFundIndicator The finPreencumSufficientFundIndicator to set.
689      */
690     @Override
691     public void setFinPreencumSufficientFundIndicator(boolean finPreencumSufficientFundIndicator) {
692         this.finPreencumSufficientFundIndicator = finPreencumSufficientFundIndicator;
693     }
694 
695     /**
696      * Gets the _FinancialObjectivePrsctrlIndicator_ attribute.
697      * 
698      * @return Returns the _FinancialObjectivePrsctrlIndicator_
699      */
700     @Override
701     public boolean isFinancialObjectivePrsctrlIndicator() {
702         return financialObjectivePrsctrlIndicator;
703     }
704 
705     /**
706      * Sets the _FinancialObjectivePrsctrlIndicator_ attribute.
707      * 
708      * @param _FinancialObjectivePrsctrlIndicator_ The _FinancialObjectivePrsctrlIndicator_ to set.
709      */
710     @Override
711     public void setFinancialObjectivePrsctrlIndicator(boolean _FinancialObjectivePrsctrlIndicator_) {
712         this.financialObjectivePrsctrlIndicator = _FinancialObjectivePrsctrlIndicator_;
713     }
714 
715     /**
716      * Gets the accountCfdaNumber attribute.
717      * 
718      * @return Returns the accountCfdaNumber
719      */
720     @Override
721     public String getAccountCfdaNumber() {
722         return accountCfdaNumber;
723     }
724 
725     /**
726      * Sets the accountCfdaNumber attribute.
727      * 
728      * @param accountCfdaNumber The accountCfdaNumber to set.
729      */
730     @Override
731     public void setAccountCfdaNumber(String accountCfdaNumber) {
732         this.accountCfdaNumber = accountCfdaNumber;
733     }
734 
735     /**
736      * Gets the accountOffCampusIndicator attribute.
737      * 
738      * @return Returns the accountOffCampusIndicator
739      */
740     @Override
741     public boolean isAccountOffCampusIndicator() {
742         return accountOffCampusIndicator;
743     }
744 
745     /**
746      * Sets the accountOffCampusIndicator attribute.
747      * 
748      * @param accountOffCampusIndicator The accountOffCampusIndicator to set.
749      */
750     @Override
751     public void setAccountOffCampusIndicator(boolean accountOffCampusIndicator) {
752         this.accountOffCampusIndicator = accountOffCampusIndicator;
753     }
754 
755     /**
756      * Gets the active attribute.
757      * 
758      * @return Returns the active
759      */
760     @Override
761     public boolean isActive() {
762         return active;
763     }
764 
765     /**
766      * Sets the active attribute.
767      * 
768      * @param active The active to set.
769      */
770     @Override
771     public void setActive(boolean active) {
772         this.active = active;
773     }
774 
775     /**
776      * Gets the chartOfAccounts attribute.
777      * 
778      * @return Returns the chartOfAccounts
779      */
780     @Override
781     public Chart getChartOfAccounts() {
782         return chartOfAccounts;
783     }
784 
785     /**
786      * Sets the chartOfAccounts attribute.
787      * 
788      * @param chartOfAccounts The chartOfAccounts to set.
789      * @deprecated
790      */
791     @Override
792     public void setChartOfAccounts(Chart chartOfAccounts) {
793         this.chartOfAccounts = chartOfAccounts;
794     }
795 
796     /**
797      * Gets the organization attribute.
798      * 
799      * @return Returns the organization
800      */
801     @Override
802     public Organization getOrganization() {
803         return organization;
804     }
805 
806     /**
807      * Sets the organization attribute.
808      * 
809      * @param organization The organization to set.
810      * @deprecated
811      */
812     @Override
813     public void setOrganization(Organization organization) {
814         this.organization = organization;
815     }
816 
817     /**
818      * Gets the accountType attribute.
819      * 
820      * @return Returns the accountType
821      */
822     @Override
823     public AccountType getAccountType() {
824         return accountType;
825     }
826 
827     /**
828      * Sets the accountType attribute.
829      * 
830      * @param accountType The accountType to set.
831      * @deprecated
832      */
833     @Override
834     public void setAccountType(AccountType accountType) {
835         this.accountType = accountType;
836     }
837 
838     /**
839      * Gets the accountPhysicalCampus attribute.
840      * 
841      * @return Returns the accountPhysicalCampus
842      */
843     @Override
844     public CampusEbo getAccountPhysicalCampus() {
845         if ( StringUtils.isBlank(accountPhysicalCampusCode) ) {
846             accountPhysicalCampus = null;
847         } else {
848             if ( accountPhysicalCampus == null || !StringUtils.equals( accountPhysicalCampus.getCode(),accountPhysicalCampusCode) ) {
849                 ModuleService moduleService = SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(CampusEbo.class);
850                 if ( moduleService != null ) {
851                     Map<String,Object> keys = new HashMap<String, Object>(1);
852                     keys.put(LocationConstants.PrimaryKeyConstants.CODE, accountPhysicalCampusCode);
853                     accountPhysicalCampus = moduleService.getExternalizableBusinessObject(CampusEbo.class, keys);
854                 } else {
855                     throw new RuntimeException( "CONFIGURATION ERROR: No responsible module found for EBO class.  Unable to proceed." );
856                 }
857             }
858         }
859         return accountPhysicalCampus;
860     }
861 
862     /**
863      * Sets the accountPhysicalCampus attribute.
864      * 
865      * @param accountPhysicalCampus The accountPhysicalCampus to set.
866      * @deprecated
867      */
868     @Override
869     public void setAccountPhysicalCampus(CampusEbo accountPhysicalCampus) {
870         this.accountPhysicalCampus = accountPhysicalCampus;
871     }
872 
873     /**
874      * Gets the accountState attribute
875      * 
876      * @return Returns the accountState
877      */
878     @Override
879     public StateEbo getAccountState() {
880         if ( StringUtils.isBlank(accountStateCode) || StringUtils.isBlank(OLEConstants.COUNTRY_CODE_UNITED_STATES ) ) {
881             accountState = null;
882         } else {
883             if ( accountState == null || !StringUtils.equals( accountState.getCode(),accountStateCode) || !StringUtils.equals(accountState.getCountryCode(), OLEConstants.COUNTRY_CODE_UNITED_STATES ) ) {
884                 ModuleService moduleService = SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(StateEbo.class);
885                 if ( moduleService != null ) {
886                     Map<String,Object> keys = new HashMap<String, Object>(2);
887                     keys.put(LocationConstants.PrimaryKeyConstants.COUNTRY_CODE, OLEConstants.COUNTRY_CODE_UNITED_STATES);/*RICE20_REFACTORME*/
888                     keys.put(LocationConstants.PrimaryKeyConstants.CODE, accountStateCode);
889                     accountState = moduleService.getExternalizableBusinessObject(StateEbo.class, keys);
890                 } else {
891                     throw new RuntimeException( "CONFIGURATION ERROR: No responsible module found for EBO class.  Unable to proceed." );
892                 }
893             }
894         }
895         return accountState;
896     }
897 
898     /**
899      * Sets the accountState attribute
900      * 
901      * @param state
902      * @deprecated
903      */
904     @Override
905     public void setAccountState(StateEbo state) {
906         this.accountState = state;
907     }
908 
909     /**
910      * Gets the subFundGroup attribute.
911      * 
912      * @return Returns the subFundGroup
913      */
914     @Override
915     public SubFundGroup getSubFundGroup() {
916         return subFundGroup;
917     }
918 
919     /**
920      * Sets the subFundGroup attribute.
921      * 
922      * @param subFundGroup The subFundGroup to set.
923      * @deprecated
924      */
925     @Override
926     public void setSubFundGroup(SubFundGroup subFundGroup) {
927         this.subFundGroup = subFundGroup;
928     }
929 
930     /**
931      * Gets the financialHigherEdFunction attribute.
932      * 
933      * @return Returns the financialHigherEdFunction
934      */
935     @Override
936     public HigherEducationFunction getFinancialHigherEdFunction() {
937         return financialHigherEdFunction;
938     }
939 
940     /**
941      * Sets the financialHigherEdFunction attribute.
942      * 
943      * @param financialHigherEdFunction The financialHigherEdFunction to set.
944      * @deprecated
945      */
946     @Override
947     public void setFinancialHigherEdFunction(HigherEducationFunction financialHigherEdFunction) {
948         this.financialHigherEdFunction = financialHigherEdFunction;
949     }
950 
951     /**
952      * Gets the accountRestrictedStatus attribute.
953      * 
954      * @return Returns the accountRestrictedStatus
955      */
956     @Override
957     public RestrictedStatus getAccountRestrictedStatus() {
958         return accountRestrictedStatus;
959     }
960 
961     /**
962      * Sets the accountRestrictedStatus attribute.
963      * 
964      * @param accountRestrictedStatus The accountRestrictedStatus to set.
965      * @deprecated
966      */
967     @Override
968     public void setAccountRestrictedStatus(RestrictedStatus accountRestrictedStatus) {
969         this.accountRestrictedStatus = accountRestrictedStatus;
970     }
971 
972     /**
973      * Gets the reportsToAccount attribute.
974      * 
975      * @return Returns the reportsToAccount
976      */
977     @Override
978     public Account getReportsToAccount() {
979         return reportsToAccount;
980     }
981 
982     /**
983      * Sets the reportsToAccount attribute.
984      * 
985      * @param reportsToAccount The reportsToAccount to set.
986      * @deprecated
987      */
988     @Override
989     public void setReportsToAccount(Account reportsToAccount) {
990         this.reportsToAccount = reportsToAccount;
991     }
992 
993     /**
994      * Gets the endowmentIncomeAccount attribute.
995      * 
996      * @return Returns the endowmentIncomeAccount
997      */
998     @Override
999     public Account getEndowmentIncomeAccount() {
1000         return endowmentIncomeAccount;
1001     }
1002 
1003     /**
1004      * Sets the endowmentIncomeAccount attribute.
1005      * 
1006      * @param endowmentIncomeAccount The endowmentIncomeAccount to set.
1007      * @deprecated
1008      */
1009     @Override
1010     public void setEndowmentIncomeAccount(Account endowmentIncomeAccount) {
1011         this.endowmentIncomeAccount = endowmentIncomeAccount;
1012     }
1013 
1014     /**
1015      * Gets the contractControlAccount attribute.
1016      * 
1017      * @return Returns the contractControlAccount
1018      */
1019     @Override
1020     public Account getContractControlAccount() {
1021         return contractControlAccount;
1022     }
1023 
1024     /**
1025      * Sets the contractControlAccount attribute.
1026      * 
1027      * @param contractControlAccount The contractControlAccount to set.
1028      * @deprecated
1029      */
1030     @Override
1031     public void setContractControlAccount(Account contractControlAccount) {
1032         this.contractControlAccount = contractControlAccount;
1033     }
1034 
1035 
1036     /**
1037      * Gets the incomeStreamAccount attribute.
1038      * 
1039      * @return Returns the incomeStreamAccount
1040      */
1041     @Override
1042     public Account getIncomeStreamAccount() {
1043         return incomeStreamAccount;
1044     }
1045 
1046     /**
1047      * Sets the incomeStreamAccount attribute.
1048      * 
1049      * @param incomeStreamAccount The incomeStreamAccount to set.
1050      * @deprecated
1051      */
1052     @Override
1053     public void setIncomeStreamAccount(Account incomeStreamAccount) {
1054         this.incomeStreamAccount = incomeStreamAccount;
1055     }
1056 
1057     @Override
1058     public Person getAccountFiscalOfficerUser() {
1059         accountFiscalOfficerUser = SpringContext.getBean(org.kuali.rice.kim.api.identity.PersonService.class).updatePersonIfNecessary(accountFiscalOfficerSystemIdentifier, accountFiscalOfficerUser);
1060         return accountFiscalOfficerUser;
1061     }
1062 
1063 
1064     /**
1065      * @param accountFiscalOfficerUser The accountFiscalOfficerUser to set.
1066      * @deprecated
1067      */
1068     @Override
1069     public void setAccountFiscalOfficerUser(Person accountFiscalOfficerUser) {
1070         this.accountFiscalOfficerUser = accountFiscalOfficerUser;
1071     }
1072 
1073     @Override
1074     public Person getAccountManagerUser() {
1075         accountManagerUser = SpringContext.getBean(org.kuali.rice.kim.api.identity.PersonService.class).updatePersonIfNecessary(accountManagerSystemIdentifier, accountManagerUser);
1076         return accountManagerUser;
1077     }
1078 
1079     /**
1080      * @param accountManagerUser The accountManagerUser to set.
1081      * @deprecated
1082      */
1083     @Override
1084     public void setAccountManagerUser(Person accountManagerUser) {
1085         this.accountManagerUser = accountManagerUser;
1086     }
1087 
1088 
1089     @Override
1090     public Person getAccountSupervisoryUser() {
1091         accountSupervisoryUser = SpringContext.getBean(org.kuali.rice.kim.api.identity.PersonService.class).updatePersonIfNecessary(accountsSupervisorySystemsIdentifier, accountSupervisoryUser);
1092         return accountSupervisoryUser;
1093     }
1094 
1095 
1096     /**
1097      * @param accountSupervisoryUser The accountSupervisoryUser to set.
1098      * @deprecated
1099      */
1100     @Override
1101     public void setAccountSupervisoryUser(Person accountSupervisoryUser) {
1102         this.accountSupervisoryUser = accountSupervisoryUser;
1103     }
1104 
1105 
1106     /**
1107      * @return Returns the continuationAccount.
1108      */
1109     @Override
1110     public Account getContinuationAccount() {
1111         return continuationAccount;
1112     }
1113 
1114 
1115     /**
1116      * @param continuationAccount The continuationAccount to set.
1117      * @deprecated
1118      */
1119     @Override
1120     public void setContinuationAccount(Account continuationAccount) {
1121         this.continuationAccount = continuationAccount;
1122     }
1123 
1124 
1125     /**
1126      * @return Returns the accountGuideline.
1127      */
1128     @Override
1129     public AccountGuideline getAccountGuideline() {
1130         return accountGuideline;
1131     }
1132 
1133     /**
1134      * @param accountGuideline The accountGuideline to set.
1135      * @deprecated
1136      */
1137     @Override
1138     public void setAccountGuideline(AccountGuideline accountGuideline) {
1139         this.accountGuideline = accountGuideline;
1140     }
1141 
1142 
1143     /**
1144      * Gets the accountDescription attribute.
1145      * 
1146      * @return Returns the accountDescription.
1147      */
1148     @Override
1149     public AccountDescription getAccountDescription() {
1150         return accountDescription;
1151     }
1152 
1153     /**
1154      * Sets the accountDescription attribute value.
1155      * 
1156      * @param accountDescription The accountDescription to set.
1157      */
1158     @Override
1159     public void setAccountDescription(AccountDescription accountDescription) {
1160         this.accountDescription = accountDescription;
1161     }
1162 
1163     /**
1164      * @return Returns the subAccounts.
1165      */
1166     @Override
1167     public List getSubAccounts() {
1168         return subAccounts;
1169     }
1170 
1171 
1172     /**
1173      * @param subAccounts The subAccounts to set.
1174      */
1175     @Override
1176     public void setSubAccounts(List subAccounts) {
1177         this.subAccounts = subAccounts;
1178     }
1179 
1180 
1181     /**
1182      * @return Returns the chartOfAccountsCode.
1183      */
1184     @Override
1185     public String getChartOfAccountsCode() {
1186         return chartOfAccountsCode;
1187     }
1188 
1189 
1190     /**
1191      * @param chartOfAccountsCode The chartOfAccountsCode to set.
1192      */
1193     @Override
1194     public void setChartOfAccountsCode(String chartOfAccountsCode) {
1195         this.chartOfAccountsCode = chartOfAccountsCode;
1196     }
1197 
1198 
1199     /**
1200      * @return Returns the accountFiscalOfficerSystemIdentifier.
1201      */
1202     @Override
1203     public String getAccountFiscalOfficerSystemIdentifier() {
1204         return accountFiscalOfficerSystemIdentifier;
1205     }
1206 
1207     /**
1208      * @param accountFiscalOfficerSystemIdentifier The accountFiscalOfficerSystemIdentifier to set.
1209      */
1210     @Override
1211     public void setAccountFiscalOfficerSystemIdentifier(String accountFiscalOfficerSystemIdentifier) {
1212         this.accountFiscalOfficerSystemIdentifier = accountFiscalOfficerSystemIdentifier;
1213     }
1214 
1215     /**
1216      * @return Returns the accountManagerSystemIdentifier.
1217      */
1218     @Override
1219     public String getAccountManagerSystemIdentifier() {
1220         return accountManagerSystemIdentifier;
1221     }
1222 
1223     /**
1224      * @param accountManagerSystemIdentifier The accountManagerSystemIdentifier to set.
1225      */
1226     @Override
1227     public void setAccountManagerSystemIdentifier(String accountManagerSystemIdentifier) {
1228         this.accountManagerSystemIdentifier = accountManagerSystemIdentifier;
1229     }
1230 
1231     /**
1232      * @return Returns the accountPhysicalCampusCode.
1233      */
1234     @Override
1235     public String getAccountPhysicalCampusCode() {
1236         return accountPhysicalCampusCode;
1237     }
1238 
1239     /**
1240      * @param accountPhysicalCampusCode The accountPhysicalCampusCode to set.
1241      */
1242     @Override
1243     public void setAccountPhysicalCampusCode(String accountPhysicalCampusCode) {
1244         this.accountPhysicalCampusCode = accountPhysicalCampusCode;
1245     }
1246 
1247     /**
1248      * @return Returns the accountRestrictedStatusCode.
1249      */
1250     @Override
1251     public String getAccountRestrictedStatusCode() {
1252         return accountRestrictedStatusCode;
1253     }
1254 
1255     /**
1256      * @param accountRestrictedStatusCode The accountRestrictedStatusCode to set.
1257      */
1258     @Override
1259     public void setAccountRestrictedStatusCode(String accountRestrictedStatusCode) {
1260         this.accountRestrictedStatusCode = accountRestrictedStatusCode;
1261     }
1262 
1263     /**
1264      * @return Returns the accountsSupervisorySystemsIdentifier.
1265      */
1266     @Override
1267     public String getAccountsSupervisorySystemsIdentifier() {
1268         return accountsSupervisorySystemsIdentifier;
1269     }
1270 
1271     /**
1272      * @param accountsSupervisorySystemsIdentifier The accountsSupervisorySystemsIdentifier to set.
1273      */
1274     @Override
1275     public void setAccountsSupervisorySystemsIdentifier(String accountsSupervisorySystemsIdentifier) {
1276         this.accountsSupervisorySystemsIdentifier = accountsSupervisorySystemsIdentifier;
1277     }
1278 
1279     /**
1280      * @return Returns the accountTypeCode.
1281      */
1282     @Override
1283     public String getAccountTypeCode() {
1284         return accountTypeCode;
1285     }
1286 
1287     /**
1288      * @param accountTypeCode The accountTypeCode to set.
1289      */
1290     @Override
1291     public void setAccountTypeCode(String accountTypeCode) {
1292         this.accountTypeCode = accountTypeCode;
1293     }
1294 
1295     /**
1296      * @return Returns the continuationAccountNumber.
1297      */
1298     @Override
1299     public String getContinuationAccountNumber() {
1300         return continuationAccountNumber;
1301     }
1302 
1303     /**
1304      * @param continuationAccountNumber The continuationAccountNumber to set.
1305      */
1306     @Override
1307     public void setContinuationAccountNumber(String continuationAccountNumber) {
1308         this.continuationAccountNumber = continuationAccountNumber;
1309     }
1310 
1311     /**
1312      * @return Returns the continuationFinChrtOfAcctCd.
1313      */
1314     @Override
1315     public String getContinuationFinChrtOfAcctCd() {
1316         return continuationFinChrtOfAcctCd;
1317     }
1318 
1319     /**
1320      * @param continuationFinChrtOfAcctCd The continuationFinChrtOfAcctCd to set.
1321      */
1322     @Override
1323     public void setContinuationFinChrtOfAcctCd(String continuationFinChrtOfAcctCd) {
1324         this.continuationFinChrtOfAcctCd = continuationFinChrtOfAcctCd;
1325     }
1326 
1327     /**
1328      * @return Returns the contractControlAccountNumber.
1329      */
1330     @Override
1331     public String getContractControlAccountNumber() {
1332         return contractControlAccountNumber;
1333     }
1334 
1335     /**
1336      * @param contractControlAccountNumber The contractControlAccountNumber to set.
1337      */
1338     @Override
1339     public void setContractControlAccountNumber(String contractControlAccountNumber) {
1340         this.contractControlAccountNumber = contractControlAccountNumber;
1341     }
1342 
1343     /**
1344      * @return Returns the contractControlFinCoaCode.
1345      */
1346     @Override
1347     public String getContractControlFinCoaCode() {
1348         return contractControlFinCoaCode;
1349     }
1350 
1351     /**
1352      * @param contractControlFinCoaCode The contractControlFinCoaCode to set.
1353      */
1354     @Override
1355     public void setContractControlFinCoaCode(String contractControlFinCoaCode) {
1356         this.contractControlFinCoaCode = contractControlFinCoaCode;
1357     }
1358 
1359     /**
1360      * @return Returns the endowmentIncomeAccountNumber.
1361      */
1362     @Override
1363     public String getEndowmentIncomeAccountNumber() {
1364         return endowmentIncomeAccountNumber;
1365     }
1366 
1367     /**
1368      * @param endowmentIncomeAccountNumber The endowmentIncomeAccountNumber to set.
1369      */
1370     @Override
1371     public void setEndowmentIncomeAccountNumber(String endowmentIncomeAccountNumber) {
1372         this.endowmentIncomeAccountNumber = endowmentIncomeAccountNumber;
1373     }
1374 
1375     /**
1376      * @return Returns the endowmentIncomeAcctFinCoaCd.
1377      */
1378     @Override
1379     public String getEndowmentIncomeAcctFinCoaCd() {
1380         return endowmentIncomeAcctFinCoaCd;
1381     }
1382 
1383     /**
1384      * @param endowmentIncomeAcctFinCoaCd The endowmentIncomeAcctFinCoaCd to set.
1385      */
1386     @Override
1387     public void setEndowmentIncomeAcctFinCoaCd(String endowmentIncomeAcctFinCoaCd) {
1388         this.endowmentIncomeAcctFinCoaCd = endowmentIncomeAcctFinCoaCd;
1389     }
1390 
1391     /**
1392      * @return Returns the financialHigherEdFunctionCd.
1393      */
1394     @Override
1395     public String getFinancialHigherEdFunctionCd() {
1396         return financialHigherEdFunctionCd;
1397     }
1398 
1399     /**
1400      * @param financialHigherEdFunctionCd The financialHigherEdFunctionCd to set.
1401      */
1402     @Override
1403     public void setFinancialHigherEdFunctionCd(String financialHigherEdFunctionCd) {
1404         this.financialHigherEdFunctionCd = financialHigherEdFunctionCd;
1405     }
1406 
1407     /**
1408      * @return Returns the incomeStreamAccountNumber.
1409      */
1410     @Override
1411     public String getIncomeStreamAccountNumber() {
1412         return incomeStreamAccountNumber;
1413     }
1414 
1415     /**
1416      * @param incomeStreamAccountNumber The incomeStreamAccountNumber to set.
1417      */
1418     @Override
1419     public void setIncomeStreamAccountNumber(String incomeStreamAccountNumber) {
1420         this.incomeStreamAccountNumber = incomeStreamAccountNumber;
1421     }
1422 
1423     /**
1424      * @return Returns the incomeStreamFinancialCoaCode.
1425      */
1426     @Override
1427     public String getIncomeStreamFinancialCoaCode() {
1428         return incomeStreamFinancialCoaCode;
1429     }
1430 
1431     /**
1432      * @param incomeStreamFinancialCoaCode The incomeStreamFinancialCoaCode to set.
1433      */
1434     @Override
1435     public void setIncomeStreamFinancialCoaCode(String incomeStreamFinancialCoaCode) {
1436         this.incomeStreamFinancialCoaCode = incomeStreamFinancialCoaCode;
1437     }
1438 
1439     /**
1440      * @return Returns the organizationCode.
1441      */
1442     @Override
1443     public String getOrganizationCode() {
1444         return organizationCode;
1445     }
1446 
1447     /**
1448      * @param organizationCode The organizationCode to set.
1449      */
1450     @Override
1451     public void setOrganizationCode(String organizationCode) {
1452         this.organizationCode = organizationCode;
1453     }
1454 
1455     /**
1456      * @return Returns the reportsToAccountNumber.
1457      */
1458     @Override
1459     public String getReportsToAccountNumber() {
1460         return reportsToAccountNumber;
1461     }
1462 
1463     /**
1464      * @param reportsToAccountNumber The reportsToAccountNumber to set.
1465      */
1466     @Override
1467     public void setReportsToAccountNumber(String reportsToAccountNumber) {
1468         this.reportsToAccountNumber = reportsToAccountNumber;
1469     }
1470 
1471     /**
1472      * @return Returns the reportsToChartOfAccountsCode.
1473      */
1474     @Override
1475     public String getReportsToChartOfAccountsCode() {
1476         return reportsToChartOfAccountsCode;
1477     }
1478 
1479     /**
1480      * @param reportsToChartOfAccountsCode The reportsToChartOfAccountsCode to set.
1481      */
1482     @Override
1483     public void setReportsToChartOfAccountsCode(String reportsToChartOfAccountsCode) {
1484         this.reportsToChartOfAccountsCode = reportsToChartOfAccountsCode;
1485     }
1486 
1487     /**
1488      * @return Returns the subFundGroupCode.
1489      */
1490     @Override
1491     public String getSubFundGroupCode() {
1492         return subFundGroupCode;
1493     }
1494 
1495     /**
1496      * @param subFundGroupCode The subFundGroupCode to set.
1497      */
1498     @Override
1499     public void setSubFundGroupCode(String subFundGroupCode) {
1500         this.subFundGroupCode = subFundGroupCode;
1501         forContractsAndGrants = null;
1502     }
1503 
1504     /**
1505      * Gets the postalZipCode attribute.
1506      * 
1507      * @return Returns the postalZipCode.
1508      */
1509     @Override
1510     public PostalCodeEbo getPostalZipCode() {
1511         if ( StringUtils.isBlank(accountZipCode) || StringUtils.isBlank(OLEConstants.COUNTRY_CODE_UNITED_STATES ) ) {
1512             postalZipCode = null;
1513         } else {
1514             if ( postalZipCode == null || !StringUtils.equals( postalZipCode.getCode(),accountZipCode) || !StringUtils.equals(postalZipCode.getCountryCode(), OLEConstants.COUNTRY_CODE_UNITED_STATES ) ) {
1515                 ModuleService moduleService = SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(PostalCodeEbo.class);
1516                 if ( moduleService != null ) {
1517                     Map<String,Object> keys = new HashMap<String, Object>(2);
1518                     keys.put(LocationConstants.PrimaryKeyConstants.COUNTRY_CODE, OLEConstants.COUNTRY_CODE_UNITED_STATES);/*RICE20_REFACTORME*/
1519                     keys.put(LocationConstants.PrimaryKeyConstants.CODE, accountZipCode);
1520                     postalZipCode = moduleService.getExternalizableBusinessObject(PostalCodeEbo.class, keys);
1521                 } else {
1522                     throw new RuntimeException( "CONFIGURATION ERROR: No responsible module found for EBO class.  Unable to proceed." );
1523                 }
1524             }
1525         }
1526         return postalZipCode;
1527     }
1528 
1529     /**
1530      * Sets the postalZipCode attribute value.
1531      * 
1532      * @param postalZipCode The postalZipCode to set.
1533      */
1534     @Override
1535     public void setPostalZipCode(PostalCodeEbo postalZipCode) {
1536         this.postalZipCode = postalZipCode;
1537     }
1538 
1539     /**
1540      * Gets the budgetRecordingLevel attribute.
1541      * 
1542      * @return Returns the budgetRecordingLevel.
1543      */
1544     @Override
1545     public BudgetRecordingLevel getBudgetRecordingLevel() {
1546         return budgetRecordingLevel;
1547     }
1548 
1549     /**
1550      * Sets the budgetRecordingLevel attribute value.
1551      * 
1552      * @param budgetRecordingLevel The budgetRecordingLevel to set.
1553      */
1554     @Override
1555     public void setBudgetRecordingLevel(BudgetRecordingLevel budgetRecordingLevel) {
1556         this.budgetRecordingLevel = budgetRecordingLevel;
1557     }
1558 
1559     /**
1560      * Gets the sufficientFundsCode attribute.
1561      * 
1562      * @return Returns the sufficientFundsCode.
1563      */
1564     @Override
1565     public SufficientFundsCode getSufficientFundsCode() {
1566         return sufficientFundsCode;
1567     }
1568 
1569     /**
1570      * Sets the sufficientFundsCode attribute value.
1571      * 
1572      * @param sufficientFundsCode The sufficientFundsCode to set.
1573      */
1574     @Override
1575     public void setSufficientFundsCode(SufficientFundsCode sufficientFundsCode) {
1576         this.sufficientFundsCode = sufficientFundsCode;
1577     }
1578 
1579     /**
1580      * Implementing equals since I need contains to behave reasonably in a hashed datastructure.
1581      * 
1582      * @see java.lang.Object#equals(java.lang.Object)
1583      */
1584     @Override
1585     public boolean equals(Object obj) {
1586         boolean equal = false;
1587 
1588         if (obj != null) {
1589             if (this.getClass().equals(obj.getClass())) {
1590                 Account other = (Account) obj;
1591 
1592                 if (StringUtils.equals(this.getChartOfAccountsCode(), other.getChartOfAccountsCode())) {
1593                     if (StringUtils.equals(this.getAccountNumber(), other.getAccountNumber())) {
1594                         equal = true;
1595                     }
1596                 }
1597             }
1598         }
1599 
1600         return equal;
1601     }
1602 
1603     /**
1604      * Calcluates hashCode based on current values of chartOfAccountsCode and accountNumber fields. Somewhat dangerous, since both
1605      * of those fields are mutable, but I don't expect people to be editing those values directly for Accounts stored in hashed
1606      * datastructures.
1607      * 
1608      * @see java.lang.Object#hashCode()
1609      */
1610     @Override
1611     public int hashCode() {
1612         String hashString = getChartOfAccountsCode() + "|" + getAccountNumber();
1613 
1614         return hashString.hashCode();
1615     }
1616 
1617 
1618     /**
1619      * Convenience method to make the primitive account fields from this Account easier to compare to the account fields from
1620      * another Account or an AccountingLine
1621      * 
1622      * @return String representing the account associated with this Accounting
1623      */
1624     @Override
1625     public String getAccountKey() {
1626         String key = getChartOfAccountsCode() + ":" + getAccountNumber();
1627         return key;
1628     }
1629 
1630     /**
1631      * Gets the dummy attribute.
1632      * 
1633      * @return Returns the dummy.
1634      */
1635 
1636     /**
1637      * Gets the accountResponsibilitySection attribute.
1638      * 
1639      * @return Returns the accountResponsibilitySection.
1640      */
1641     @Override
1642     public String getAccountResponsibilitySection() {
1643         return accountResponsibilitySection;
1644     }
1645 
1646     /**
1647      * Sets the accountResponsibilitySection attribute value.
1648      * 
1649      * @param accountResponsibilitySection The accountResponsibilitySection to set.
1650      */
1651     @Override
1652     public void setAccountResponsibilitySection(String accountResponsibilitySection) {
1653         this.accountResponsibilitySection = accountResponsibilitySection;
1654     }
1655 
1656     /**
1657      * Gets the contractsAndGrantsSection attribute.
1658      * 
1659      * @return Returns the contractsAndGrantsSection.
1660      */
1661     @Override
1662     public String getContractsAndGrantsSection() {
1663         return contractsAndGrantsSection;
1664     }
1665 
1666     /**
1667      * Sets the contractsAndGrantsSection attribute value.
1668      * 
1669      * @param contractsAndGrantsSection The contractsAndGrantsSection to set.
1670      */
1671     @Override
1672     public void setContractsAndGrantsSection(String contractsAndGrantsSection) {
1673         this.contractsAndGrantsSection = contractsAndGrantsSection;
1674     }
1675 
1676     /**
1677      * Gets the accountDescriptionSection attribute.
1678      * 
1679      * @return Returns the accountDescriptionSection.
1680      */
1681     @Override
1682     public String getAccountDescriptionSection() {
1683         return accountDescriptionSection;
1684     }
1685 
1686     /**
1687      * Sets the accountDescriptionSection attribute value.
1688      * 
1689      * @param accountDescriptionSection The accountDescriptionSection to set.
1690      */
1691     @Override
1692     public void setAccountDescriptionSection(String accountDescriptionSection) {
1693         this.accountDescriptionSection = accountDescriptionSection;
1694     }
1695 
1696     /**
1697      * Gets the guidelinesAndPurposeSection attribute.
1698      * 
1699      * @return Returns the guidelinesAndPurposeSection.
1700      */
1701     @Override
1702     public String getGuidelinesAndPurposeSection() {
1703         return guidelinesAndPurposeSection;
1704     }
1705 
1706     /**
1707      * Sets the guidelinesAndPurposeSection attribute value.
1708      * 
1709      * @param guidelinesAndPurposeSection The guidelinesAndPurposeSection to set.
1710      */
1711     @Override
1712     public void setGuidelinesAndPurposeSection(String guidelinesAndPurposeSection) {
1713         this.guidelinesAndPurposeSection = guidelinesAndPurposeSection;
1714     }
1715 
1716     /**
1717      * Gets the accountResponsibilitySectionBlank attribute.
1718      * 
1719      * @return Returns the accountResponsibilitySectionBlank.
1720      */
1721     @Override
1722     public String getAccountResponsibilitySectionBlank() {
1723         return accountResponsibilitySectionBlank;
1724     }
1725 
1726     /**
1727      * Gets the contractsAndGrantsSectionBlank attribute.
1728      * 
1729      * @return Returns the contractsAndGrantsSectionBlank.
1730      */
1731     @Override
1732     public String getContractsAndGrantsSectionBlank() {
1733         return contractsAndGrantsSectionBlank;
1734     }
1735 
1736     /**
1737      * Gets the accountDescriptionSectionBlank attribute.
1738      * 
1739      * @return Returns the accountDescriptionSectionBlank.
1740      */
1741     @Override
1742     public String getAccountDescriptionSectionBlank() {
1743         return accountDescriptionSectionBlank;
1744     }
1745 
1746     /**
1747      * Gets the guidelinesAndPurposeSectionBlank attribute.
1748      * 
1749      * @return Returns the guidelinesAndPurposeSectionBlank.
1750      */
1751     @Override
1752     public String getGuidelinesAndPurposeSectionBlank() {
1753         return guidelinesAndPurposeSectionBlank;
1754     }
1755 
1756     /**
1757      * Gets the forContractsAndGrants attribute.
1758      * 
1759      * @return Returns the forContractsAndGrants.
1760      */
1761     @Override
1762     public boolean isForContractsAndGrants() {
1763         if ( forContractsAndGrants == null ) {
1764             forContractsAndGrants = SpringContext.getBean(SubFundGroupService.class).isForContractsAndGrants(getSubFundGroup());
1765         }
1766         return forContractsAndGrants;
1767     }
1768 
1769     /**
1770      * @see org.kuali.ole.coa.businessobject.AccountIntf#isClosed()
1771      */
1772     @Override
1773     public boolean isClosed() {
1774         return !active;
1775     }
1776 
1777     @Override
1778     public List<PriorYearIndirectCostRecoveryAccount> getIndirectCostRecoveryAccounts() {
1779         return indirectCostRecoveryAccounts;
1780     }
1781 
1782     @Override
1783     public void setIndirectCostRecoveryAccounts(List<? extends IndirectCostRecoveryAccount> indirectCostRecoveryAccounts) {
1784         List<PriorYearIndirectCostRecoveryAccount> priorYearAccountIcrList = new ArrayList<PriorYearIndirectCostRecoveryAccount>();
1785         for (IndirectCostRecoveryAccount icr : indirectCostRecoveryAccounts){
1786             priorYearAccountIcrList.add(new PriorYearIndirectCostRecoveryAccount(icr));
1787         }
1788         this.indirectCostRecoveryAccounts = priorYearAccountIcrList;
1789     }
1790     
1791 }