org.kuali.kfs.module.ld.dataaccess.impl
Class LaborLedgerBalanceDaoOjb

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springmodules.orm.ojb.support.PersistenceBrokerDaoSupport
          extended by org.kuali.rice.kns.dao.impl.PlatformAwareDaoBaseOjb
              extended by org.kuali.kfs.module.ld.dataaccess.impl.LaborLedgerBalanceDaoOjb
All Implemented Interfaces:
LedgerBalanceBalancingDao, LaborLedgerBalanceDao, org.kuali.rice.kns.dao.PlatformAwareDao, org.springframework.beans.factory.InitializingBean

public class LaborLedgerBalanceDaoOjb
extends org.kuali.rice.kns.dao.impl.PlatformAwareDaoBaseOjb
implements LaborLedgerBalanceDao, LedgerBalanceBalancingDao

This is the data access object for ledger balance.

See Also:
LedgerBalance

Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
LaborLedgerBalanceDaoOjb()
           
 
Method Summary
protected  org.apache.ojb.broker.query.Criteria buildCriteriaFromMap(Map fieldValues, LedgerBalance balance)
          This method builds the query criteria based on the input field map
 void deleteLedgerBalancesPriorToYear(Integer fiscalYear, String chartOfAccountsCode)
          delete the ledger balance records that were posted prior to the given fiscal year
 List<List<String>> findAccountsInFundGroups(Integer fiscalYear, Map<String,String> fieldValues, List<String> subFundGroupCodes, List<String> fundGroupCodes)
          find the accounts (chart of accounts code + account number) in the given fund groups
 Iterator<LedgerBalance> findBalance(Map fieldValues, boolean isConsolidated)
          This method finds the records of balance entries according to input fields and values
 Iterator<LedgerBalance> findBalancesForFiscalYear(Integer year)
           
 Iterator<LedgerBalance> findBalancesForFiscalYear(Integer fiscalYear, Map<String,String> fieldValues)
           
 Iterator<LedgerBalanceForYearEndBalanceForward> findBalancesForFiscalYear(Integer fiscalYear, Map<String,String> fieldValues, List<String> subFundGroupCodes, List<String> fundGroupCodes)
           
 List<LaborBalanceSummary> findBalanceSummary(Integer fiscalYear, Collection<String> balanceTypes)
          find the summary of the ledger balances for the given fiscal year and balance types
protected  Iterator<Object[]> findBalanceSummaryRawData(org.apache.ojb.broker.query.Criteria criteria)
           
 Integer findCountGreaterOrEqualThan(Integer year)
           
 List<EmployeeFunding> findCurrentEmployeeFunds(Map fieldValues)
          retrieve the current funds according to the given field values
 List<LedgerBalance> findCurrentFunds(Map fieldValues)
          retrieve the current funds according to the given field values
protected  Iterator<Object[]> findCurrentFundsRawData(Map fieldValues)
           
 List<EmployeeFunding> findEncumbranceEmployeeFunds(Map fieldValues)
          retrieve the encumbrance funds according to the given field values
 List<LedgerBalance> findEncumbranceFunds(Map fieldValues)
          retrieve the encumbrance funds according to the given field values
protected  Iterator<Object[]> findEncumbranceFundsRawData(Map fieldValues)
           
protected  Iterator<Object[]> findFundsRawData(org.apache.ojb.broker.query.Criteria criteria)
           
 Collection<LedgerBalance> findLedgerBalances(Map<String,List<String>> fieldValues, Map<String,List<String>> excludedFieldValues, Set<Integer> fiscalYears, List<String> balanceTypeList, List<String> positionObjectGroupCodes)
          find all ledger balances matching the given criteria within the given fiscal years
protected  List<String> getAttributeListForBalanceSummary(boolean isAttributeNameNeeded)
           
protected  List<String> getAttributeListForFundingInquiry(boolean isAttributeNameNeeded)
           
protected  org.apache.ojb.broker.query.ReportQueryByCriteria getBalanceCountQuery(Map fieldValues)
           
protected  org.apache.ojb.broker.query.Query getBalanceQuery(Map fieldValues, boolean isConsolidated)
           
 Iterator getConsolidatedBalanceRecordCount(Map fieldValues)
          This method gets the size collection of balance entry groups according to input fields and values if the entries are required to be consolidated
protected  List<String> getGroupByListForBalanceSummary()
           
protected  List<String> getGroupByListForFundingInquiry()
           
protected  EmployeeFunding marshalFundsAsEmployeeFunding(Object[] queryResult)
           
protected  LaborBalanceSummary marshalFundsAsLaborBalanceSummary(Object[] queryResult)
           
protected  LedgerBalance marshalFundsAsLedgerBalance(Object[] queryResult)
           
 void save(LedgerBalance ledgerBalance)
          save the given ledger balance into the underlying data store
 void setBalanceTypService(BalanceTypeService balanceTypService)
           
 void setKualiConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService kualiConfigurationService)
          Sets the kualiConfigurationService attribute value.
 
Methods inherited from class org.kuali.rice.kns.dao.impl.PlatformAwareDaoBaseOjb
getDbPlatform, setDbPlatform
 
Methods inherited from class org.springmodules.orm.ojb.support.PersistenceBrokerDaoSupport
checkDaoConfig, convertOjbAccessException, createPersistenceBrokerTemplate, getJcdAlias, getPersistenceBroker, getPersistenceBrokerTemplate, releasePersistenceBroker, setJcdAlias, setPersistenceBrokerTemplate
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LaborLedgerBalanceDaoOjb

public LaborLedgerBalanceDaoOjb()
Method Detail

findBalancesForFiscalYear

public Iterator<LedgerBalance> findBalancesForFiscalYear(Integer year)
Specified by:
findBalancesForFiscalYear in interface LaborLedgerBalanceDao
Parameters:
year - the given fiscal year
Returns:
an iterator over all balances for a given fiscal year
See Also:
LaborLedgerBalanceDao.findBalancesForFiscalYear(java.lang.Integer)

findBalancesForFiscalYear

public Iterator<LedgerBalance> findBalancesForFiscalYear(Integer fiscalYear,
                                                         Map<String,String> fieldValues)
Specified by:
findBalancesForFiscalYear in interface LaborLedgerBalanceDao
Parameters:
fiscalYear - the given fiscal year
fieldValues - the given field values
Returns:
an iterator over all balances for a given fiscal year
See Also:
LaborLedgerBalanceDao.findBalancesForFiscalYear(java.lang.Integer, java.util.Map)

findBalance

public Iterator<LedgerBalance> findBalance(Map fieldValues,
                                           boolean isConsolidated)
Description copied from interface: LaborLedgerBalanceDao
This method finds the records of balance entries according to input fields and values

Specified by:
findBalance in interface LaborLedgerBalanceDao
Parameters:
fieldValues - the input fields and values
isConsolidated - consolidation option is applied or not
Returns:
the records of balance entries
See Also:
LaborLedgerBalanceDao.findBalance(java.util.Map, boolean)

getConsolidatedBalanceRecordCount

public Iterator getConsolidatedBalanceRecordCount(Map fieldValues)
Description copied from interface: LaborLedgerBalanceDao
This method gets the size collection of balance entry groups according to input fields and values if the entries are required to be consolidated

Specified by:
getConsolidatedBalanceRecordCount in interface LaborLedgerBalanceDao
Parameters:
fieldValues - the input fields and values
Returns:
the size collection of balance entry groups
See Also:
LaborLedgerBalanceDao.getConsolidatedBalanceRecordCount(java.util.Map)

getBalanceQuery

protected org.apache.ojb.broker.query.Query getBalanceQuery(Map fieldValues,
                                                            boolean isConsolidated)

getBalanceCountQuery

protected org.apache.ojb.broker.query.ReportQueryByCriteria getBalanceCountQuery(Map fieldValues)

buildCriteriaFromMap

protected org.apache.ojb.broker.query.Criteria buildCriteriaFromMap(Map fieldValues,
                                                                    LedgerBalance balance)
This method builds the query criteria based on the input field map

Parameters:
fieldValues -
balance -
Returns:
a query criteria

findCurrentFunds

public List<LedgerBalance> findCurrentFunds(Map fieldValues)
Description copied from interface: LaborLedgerBalanceDao
retrieve the current funds according to the given field values

Specified by:
findCurrentFunds in interface LaborLedgerBalanceDao
Parameters:
fieldValues - the given field values
Returns:
the current funds according to the given field values
See Also:
LaborLedgerBalanceDao.findCurrentFunds(java.util.Map)

findEncumbranceFunds

public List<LedgerBalance> findEncumbranceFunds(Map fieldValues)
Description copied from interface: LaborLedgerBalanceDao
retrieve the encumbrance funds according to the given field values

Specified by:
findEncumbranceFunds in interface LaborLedgerBalanceDao
Parameters:
fieldValues - the given field values
Returns:
the encumbrance funds according to the given field values
See Also:
LaborLedgerBalanceDao.findEncumbranceFunds(java.util.Map)

findCurrentEmployeeFunds

public List<EmployeeFunding> findCurrentEmployeeFunds(Map fieldValues)
Description copied from interface: LaborLedgerBalanceDao
retrieve the current funds according to the given field values

Specified by:
findCurrentEmployeeFunds in interface LaborLedgerBalanceDao
Parameters:
fieldValues - the given field values
Returns:
the current funds according to the given field values
See Also:
LaborLedgerBalanceDao.findCurrentEmployeeFunds(java.util.Map)

findEncumbranceEmployeeFunds

public List<EmployeeFunding> findEncumbranceEmployeeFunds(Map fieldValues)
Description copied from interface: LaborLedgerBalanceDao
retrieve the encumbrance funds according to the given field values

Specified by:
findEncumbranceEmployeeFunds in interface LaborLedgerBalanceDao
Parameters:
fieldValues - the given field values
Returns:
the encumbrance funds according to the given field values
See Also:
LaborLedgerBalanceDao.findEncumbranceEmployeeFunds(java.util.Map)

findBalanceSummary

public List<LaborBalanceSummary> findBalanceSummary(Integer fiscalYear,
                                                    Collection<String> balanceTypes)
Description copied from interface: LaborLedgerBalanceDao
find the summary of the ledger balances for the given fiscal year and balance types

Specified by:
findBalanceSummary in interface LaborLedgerBalanceDao
Parameters:
fiscalYear - the given fiscal year
balanceTypes - the given balance type codes
Returns:
the ledger balances for the given fiscal year and balance types
See Also:
LaborLedgerBalanceDao.findBalanceSummary(java.lang.Integer, java.util.Collection)

save

public void save(LedgerBalance ledgerBalance)
Description copied from interface: LaborLedgerBalanceDao
save the given ledger balance into the underlying data store

Specified by:
save in interface LaborLedgerBalanceDao
Parameters:
ledgerBalance - the given ledger balance
See Also:
LaborLedgerBalanceDao.save(org.kuali.kfs.module.ld.businessobject.LedgerBalance)

findCurrentFundsRawData

protected Iterator<Object[]> findCurrentFundsRawData(Map fieldValues)

findEncumbranceFundsRawData

protected Iterator<Object[]> findEncumbranceFundsRawData(Map fieldValues)

findFundsRawData

protected Iterator<Object[]> findFundsRawData(org.apache.ojb.broker.query.Criteria criteria)

findBalanceSummaryRawData

protected Iterator<Object[]> findBalanceSummaryRawData(org.apache.ojb.broker.query.Criteria criteria)

marshalFundsAsLedgerBalance

protected LedgerBalance marshalFundsAsLedgerBalance(Object[] queryResult)

marshalFundsAsEmployeeFunding

protected EmployeeFunding marshalFundsAsEmployeeFunding(Object[] queryResult)

marshalFundsAsLaborBalanceSummary

protected LaborBalanceSummary marshalFundsAsLaborBalanceSummary(Object[] queryResult)

getGroupByListForFundingInquiry

protected List<String> getGroupByListForFundingInquiry()

getAttributeListForFundingInquiry

protected List<String> getAttributeListForFundingInquiry(boolean isAttributeNameNeeded)

getGroupByListForBalanceSummary

protected List<String> getGroupByListForBalanceSummary()

getAttributeListForBalanceSummary

protected List<String> getAttributeListForBalanceSummary(boolean isAttributeNameNeeded)

setKualiConfigurationService

public void setKualiConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService kualiConfigurationService)
Sets the kualiConfigurationService attribute value.

Parameters:
kualiConfigurationService - The kualiConfigurationService to set.

setBalanceTypService

public void setBalanceTypService(BalanceTypeService balanceTypService)

findBalancesForFiscalYear

public Iterator<LedgerBalanceForYearEndBalanceForward> findBalancesForFiscalYear(Integer fiscalYear,
                                                                                 Map<String,String> fieldValues,
                                                                                 List<String> subFundGroupCodes,
                                                                                 List<String> fundGroupCodes)
Specified by:
findBalancesForFiscalYear in interface LaborLedgerBalanceDao
Parameters:
fiscalYear - the given fiscal year
fieldValues - the input fields and values
subFundGroupCodes - the given list of qualified sub fund group codes
fundGroupCodes - the given list of qualified group codes
Returns:
an Iterator over all balances for a given year and search criteria that include the accounts of balances must belong to the given sub fund group or fund group
See Also:
LaborLedgerBalanceDao.findBalancesForFiscalYear(java.lang.Integer, java.util.Map, java.util.List, java.util.List)

findAccountsInFundGroups

public List<List<String>> findAccountsInFundGroups(Integer fiscalYear,
                                                   Map<String,String> fieldValues,
                                                   List<String> subFundGroupCodes,
                                                   List<String> fundGroupCodes)
Description copied from interface: LaborLedgerBalanceDao
find the accounts (chart of accounts code + account number) in the given fund groups

Specified by:
findAccountsInFundGroups in interface LaborLedgerBalanceDao
Parameters:
fiscalYear - the given fiscal year
fieldValues - the input fields and values
subFundGroupCodes - the given list of qualified sub fund group codes
fundGroupCodes - the given list of qualified group codes
Returns:
the accounts (chart of accounts code + account number) in the given fund groups
See Also:
LaborLedgerBalanceDao.findAccountsInFundGroups(java.lang.Integer, java.util.Map, java.util.List, java.util.List)

findLedgerBalances

public Collection<LedgerBalance> findLedgerBalances(Map<String,List<String>> fieldValues,
                                                    Map<String,List<String>> excludedFieldValues,
                                                    Set<Integer> fiscalYears,
                                                    List<String> balanceTypeList,
                                                    List<String> positionObjectGroupCodes)
Description copied from interface: LaborLedgerBalanceDao
find all ledger balances matching the given criteria within the given fiscal years

Specified by:
findLedgerBalances in interface LaborLedgerBalanceDao
Parameters:
fieldValues - the given field values
excludedFieldValues - the given field values that must not be matched
fiscalYears - the given fiscal years
balanceTypeList - the given balance type code list
positionObjectGroupCodes - the specified position obejct group codes
Returns:
all ledger balances matching the given criteria within the given fiscal years
See Also:
LaborLedgerBalanceDao.findLedgerBalances(java.util.Map, java.util.Map, java.util.Set, java.util.List, java.util.List)

deleteLedgerBalancesPriorToYear

public void deleteLedgerBalancesPriorToYear(Integer fiscalYear,
                                            String chartOfAccountsCode)
Description copied from interface: LaborLedgerBalanceDao
delete the ledger balance records that were posted prior to the given fiscal year

Specified by:
deleteLedgerBalancesPriorToYear in interface LaborLedgerBalanceDao
Parameters:
fiscalYear - the given fiscal year
chartOfAccountsCode - the given chart of account code
See Also:
LaborLedgerBalanceDao.deleteLedgerBalancesPriorToYear(java.lang.Integer, java.lang.String)

findCountGreaterOrEqualThan

public Integer findCountGreaterOrEqualThan(Integer year)
Specified by:
findCountGreaterOrEqualThan in interface LedgerBalanceBalancingDao
Parameters:
year - the given university fiscal year
Returns:
count of rows for the given fiscal year
See Also:
org.kuali.kfs.gl.dataaccess.BalancingDao#findCountGreaterOrEqualThan(java.lang.Integer)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.