@Transactional public class BalanceServiceImpl extends Object implements BalanceService
Modifier and Type | Field and Description |
---|---|
protected BalanceDao |
balanceDao |
protected BalanceTypeService |
balanceTypService |
protected ObjectTypeService |
objectTypeService |
protected OptionsService |
optionsService |
protected static String |
PARAMETER_PREFIX |
protected org.kuali.rice.coreservice.framework.parameter.ParameterService |
parameterService |
protected SubFundGroupService |
subFundGroupService |
Constructor and Description |
---|
BalanceServiceImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
beginningBalanceLoaded(Account account)
Returns whether or not the beginning budget is loaded for the given account.
|
int |
countBalancesForFiscalYear(Integer year)
Uses the DAO to count the number of balances associated with the given fiscal year
|
protected org.kuali.rice.core.api.util.type.KualiDecimal |
expenseBalances(Account account)
Sums all the balances associated with a given account that would be considered "expense" balances
|
Iterator |
findBalance(Map fieldValues,
boolean isConsolidated)
This method gets the size of balance entries according to input fields and values
|
Iterator<Balance> |
findBalancesForFiscalYear(Integer fiscalYear)
Defers to the DAO to find all balances in the fiscal year.
|
Iterator<Balance> |
findCumulativeBalancesToForwardForFiscalYear(Integer year)
Returns all the balances to be forwarded for the "cumulative" rule
|
Iterator<Balance> |
findGeneralBalancesToForwardForFiscalYear(Integer year)
Returns all the balances specifically to be processed by the balance forwards job for the "general" rule
|
Iterator<Balance> |
findNominalActivityBalancesForFiscalYear(Integer year)
This method returns all of the balances specifically for the nominal activity closing job
|
Iterator<Balance> |
findOrganizationReversionBalancesForFiscalYear(Integer year,
boolean endOfYear)
Returns all of the balances to be forwarded for the organization reversion process
|
boolean |
fundBalanceWillNetToZero(Account account)
Checks to see if the total income balances for the given account equal the total expense balances for the given account
|
protected Collection<String> |
getActualBalanceCodes()
Use the options table to get a list of all the balance type codes associated with actual balances
|
protected Collection<String> |
getAssetLiabilityFundBalanceBalanceTypeCodes()
Uses the options table to find all the balance type codes associated with asset/liability
|
Integer |
getBalanceRecordCount(Map fieldValues,
boolean isConsolidated)
This method finds the summary records of balance entries according to input fields and values
|
Integer |
getCashBalanceRecordCount(Map fieldValues,
boolean isConsolidated)
This method gets the size of cash balance entries according to input fields and values
|
protected List<String> |
getEncumbranceBalanceTypes(Map fieldValues)
Gets the encumbrance balance types.
|
protected Collection<String> |
getEncumbranceBaseBudgetBalanceTypeCodes()
Uses the options table to create a list of all the balance type codes associated with encumbrances
|
protected Collection<String> |
getExpenseObjectTypeCodes()
Uses the options table to find all the balance type codes associated with expenses
|
List<GlSummary> |
getGlSummary(int universityFiscalYear,
List<String> balanceTypeCodes)
Get the GL Balance summary for the GL Summary report
|
protected Collection<String> |
getIncomeObjectTypeCodes()
Uses the options table to find all the balance type codes associated with income
|
boolean |
hasAssetLiabilityFundBalanceBalances(Account account)
Checks the given account to see if there are any non zero asset fund liability fund balances for them
|
boolean |
hasAssetLiabilityOrFundBalance(Account account)
Determines if the account has asset/liability balances associated with it that will have a net impact
|
boolean |
hasEncumbrancesOrBaseBudgets(Account account)
Finds all of the encumbrance balances for the given account, and figures out if those encumbrances will have a net impact on
the budget
|
protected org.kuali.rice.core.api.util.type.KualiDecimal |
incomeBalances(Account account)
Returns the sum of balances considered as income for the given account
|
protected void |
loadConstantsFromOptions()
Private method to load the values from the system options service and store them locally for later use.
|
Iterator |
lookupCashBalance(Map fieldValues,
boolean isConsolidated)
This method finds the summary records of balance entries according to input fields an values, using the DAO.
|
void |
purgeYearByChart(String chart,
int year)
Purge the balance table by year/chart
|
void |
setBalanceDao(BalanceDao balanceDao) |
void |
setBalanceTypService(BalanceTypeService balanceTypService)
Sets the balanceTypService.
|
void |
setObjectTypeService(ObjectTypeService objectTypeService)
Sets the objectTypeService.
|
void |
setOptionsService(OptionsService optionsService) |
void |
setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
Sets the parameterService.
|
void |
setSubFundGroupService(SubFundGroupService subFundGroupService)
Sets the subFundGroupService.
|
protected org.kuali.rice.core.api.util.type.KualiDecimal |
sumBalances(Iterator balances)
Given an iterator of balances, this returns the sum of each balance's beginning balance line amount + annual account linge
balance amount
|
protected static final String PARAMETER_PREFIX
protected BalanceDao balanceDao
protected OptionsService optionsService
protected ObjectTypeService objectTypeService
protected SubFundGroupService subFundGroupService
protected org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService
protected BalanceTypeService balanceTypService
public BalanceServiceImpl()
public List<GlSummary> getGlSummary(int universityFiscalYear, List<String> balanceTypeCodes)
BalanceService
getGlSummary
in interface BalanceService
universityFiscalYear
- the fiscal year to find balances forbalanceTypeCodes
- the balance types to summarizeBalanceService.getGlSummary(int, java.util.List)
public Iterator<Balance> findBalancesForFiscalYear(Integer fiscalYear)
findBalancesForFiscalYear
in interface BalanceService
fiscalYear
- the fiscal year to find balances forBalanceService.findBalancesForFiscalYear(java.lang.Integer)
public boolean hasAssetLiabilityFundBalanceBalances(Account account)
hasAssetLiabilityFundBalanceBalances
in interface BalanceService
account
- an account to find balances forBalanceService.hasAssetLiabilityFundBalanceBalances(org.kuali.ole.coa.businessobject.Account)
protected org.kuali.rice.core.api.util.type.KualiDecimal sumBalances(Iterator balances)
balances
- an Iterator of balances to sumprotected org.kuali.rice.core.api.util.type.KualiDecimal incomeBalances(Account account)
account
- the account to find income balances forprotected org.kuali.rice.core.api.util.type.KualiDecimal expenseBalances(Account account)
account
- an account to find expense balances forpublic boolean fundBalanceWillNetToZero(Account account)
fundBalanceWillNetToZero
in interface BalanceService
an
- account to find balances forBalanceService.fundBalanceWillNetToZero(org.kuali.ole.coa.businessobject.Account)
public boolean hasEncumbrancesOrBaseBudgets(Account account)
hasEncumbrancesOrBaseBudgets
in interface BalanceService
account
- an account to find balances forBalanceService.hasEncumbrancesOrBaseBudgets(org.kuali.ole.coa.businessobject.Account)
public boolean beginningBalanceLoaded(Account account)
beginningBalanceLoaded
in interface BalanceService
an
- account to check whether the beginning balance is loaded forBalanceService.beginningBalanceLoaded(org.kuali.ole.coa.businessobject.Account)
public boolean hasAssetLiabilityOrFundBalance(Account account)
hasAssetLiabilityOrFundBalance
in interface BalanceService
account
- an account to check balances forBalanceService.hasAssetLiabilityOrFundBalance(org.kuali.ole.coa.businessobject.Account)
public void setBalanceDao(BalanceDao balanceDao)
public void setOptionsService(OptionsService optionsService)
public Iterator lookupCashBalance(Map fieldValues, boolean isConsolidated)
lookupCashBalance
in interface BalanceService
fieldValues
- the input fields an valuesisConsolidated
- consolidation option is applied or notBalanceService.lookupCashBalance(java.util.Map, boolean)
public Integer getCashBalanceRecordCount(Map fieldValues, boolean isConsolidated)
getCashBalanceRecordCount
in interface BalanceService
fieldValues
- the input fields and valuesisConsolidated
- consolidation option is applied or notBalanceService.getCashBalanceRecordCount(java.util.Map, boolean)
public Iterator findBalance(Map fieldValues, boolean isConsolidated)
findBalance
in interface BalanceService
fieldValues
- the input fields and valuesisConsolidated
- consolidation option is applied or notBalanceService.findBalance(java.util.Map, boolean)
public Integer getBalanceRecordCount(Map fieldValues, boolean isConsolidated)
getBalanceRecordCount
in interface BalanceService
fieldValues
- the input fields and valuesisConsolidated
- consolidation option is applied or notBalanceService.getBalanceRecordCount(java.util.Map, boolean)
public void purgeYearByChart(String chart, int year)
purgeYearByChart
in interface BalanceService
chart
- the chart of balances to purgeyear
- the year of balances to purgeprotected void loadConstantsFromOptions()
protected Collection<String> getActualBalanceCodes()
protected Collection<String> getIncomeObjectTypeCodes()
protected Collection<String> getExpenseObjectTypeCodes()
protected Collection<String> getAssetLiabilityFundBalanceBalanceTypeCodes()
protected Collection<String> getEncumbranceBaseBudgetBalanceTypeCodes()
public int countBalancesForFiscalYear(Integer year)
countBalancesForFiscalYear
in interface BalanceService
fiscal
- year a fiscal year to count balances forBalanceService.countBalancesForFiscalYear(java.lang.Integer)
public Iterator<Balance> findNominalActivityBalancesForFiscalYear(Integer year)
findNominalActivityBalancesForFiscalYear
in interface BalanceService
year
- year to find balances forBalanceService.findNominalActivityBalancesForFiscalYear(java.lang.Integer)
public Iterator<Balance> findCumulativeBalancesToForwardForFiscalYear(Integer year)
findCumulativeBalancesToForwardForFiscalYear
in interface BalanceService
year
- the fiscal year to find balances forBalanceService.findCumulativeBalancesToForwardForFiscalYear(java.lang.Integer)
public Iterator<Balance> findGeneralBalancesToForwardForFiscalYear(Integer year)
findGeneralBalancesToForwardForFiscalYear
in interface BalanceService
year
- the fiscal year to find balances forBalanceService.findGeneralBalancesToForwardForFiscalYear(java.lang.Integer)
public Iterator<Balance> findOrganizationReversionBalancesForFiscalYear(Integer year, boolean endOfYear)
findOrganizationReversionBalancesForFiscalYear
in interface BalanceService
year
- the year of balances to findendOfYear
- whether the organization reversion process is running end of year (before the fiscal year change over) or
beginning of year (after the fiscal year change over)BalanceService.findOrganizationReversionBalancesForFiscalYear(java.lang.Integer, boolean)
protected List<String> getEncumbranceBalanceTypes(Map fieldValues)
fieldValues
- public void setObjectTypeService(ObjectTypeService objectTypeService)
objectTypeService
- public void setSubFundGroupService(SubFundGroupService subFundGroupService)
subFundGroupService
- public void setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
parameterService
- public void setBalanceTypService(BalanceTypeService balanceTypService)
balanceTypService
- Copyright © 2004-2014 The Kuali Foundation. All Rights Reserved.