public class AccountingPeriodServiceImpl extends Object implements AccountingPeriodService
Modifier and Type | Field and Description |
---|---|
protected static Set<String> |
_invalidPeriodCodes |
protected org.kuali.rice.krad.service.BusinessObjectService |
businessObjectService |
protected org.kuali.rice.core.api.datetime.DateTimeService |
dateTimeService |
Constructor and Description |
---|
AccountingPeriodServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
clearCache() |
int |
compareAccountingPeriodsByDate(AccountingPeriod tweedleDee,
AccountingPeriod tweedleDum)
This method compares two accounting periods, hopefully by comparing their closing dates.
|
Collection<AccountingPeriod> |
getAllAccountingPeriods()
The default implementation.
|
AccountingPeriod |
getByDate(Date date)
This method is a helper method to get the current period.
|
AccountingPeriod |
getByPeriod(String periodCode,
Integer fiscalYear)
This method is a helper method to easily grab an accounting period by looking up it's period and fiscal year
|
AccountingPeriod |
getByStringDate(String dateString)
This method allows for AccountingPeriod retrieval via String date.
|
Collection<AccountingPeriod> |
getOpenAccountingPeriods()
Implements by choosing only accounting periods that are active.
|
protected boolean |
isInvalidPeriodCode(AccountingPeriod period)
This checks to see if the period code is empty or invalid ("13", "AB", "BB", "CB")
|
void |
setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService) |
void |
setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService) |
protected org.kuali.rice.krad.service.BusinessObjectService businessObjectService
protected org.kuali.rice.core.api.datetime.DateTimeService dateTimeService
protected static final Set<String> _invalidPeriodCodes
public AccountingPeriodServiceImpl()
@Cacheable(value="OLE/AccountingPeriod", key="\'{getAllAccountingPeriods}\'") public Collection<AccountingPeriod> getAllAccountingPeriods()
getAllAccountingPeriods
in interface AccountingPeriodService
AccountingPeriodService.getAllAccountingPeriods()
@Cacheable(value="OLE/AccountingPeriod", key="\'{getOpenAccountingPeriods}\'") public Collection<AccountingPeriod> getOpenAccountingPeriods()
getOpenAccountingPeriods
in interface AccountingPeriodService
AccountingPeriodService.getOpenAccountingPeriods()
@Cacheable(value="OLE/AccountingPeriod", key="#p0+\'-\'+#p1") public AccountingPeriod getByPeriod(String periodCode, Integer fiscalYear)
getByPeriod
in interface AccountingPeriodService
periodCode
- fiscalYear
- public AccountingPeriod getByStringDate(String dateString)
getByStringDate
in interface AccountingPeriodService
String
- @Cacheable(value="OLE/AccountingPeriod", key="\'date=\'+#p0") public AccountingPeriod getByDate(Date date)
getByDate
in interface AccountingPeriodService
AccountingPeriodService.getByDate(java.sql.Date)
protected boolean isInvalidPeriodCode(AccountingPeriod period)
period
- public int compareAccountingPeriodsByDate(AccountingPeriod tweedleDee, AccountingPeriod tweedleDum)
AccountingPeriodService
compareAccountingPeriodsByDate
in interface AccountingPeriodService
tweedleDee
- the first accounting period to comparetweedleDum
- the second accounting period to compareAccountingPeriodService.compareAccountingPeriodsByDate(org.kuali.ole.coa.businessobject.AccountingPeriod,
org.kuali.ole.coa.businessobject.AccountingPeriod)
@CacheEvict(value="OLE/AccountingPeriod", allEntries=true) public void clearCache()
clearCache
in interface AccountingPeriodService
public void setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
public void setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService)
Copyright © 2004–2015 The Kuali Foundation. All rights reserved.