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

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.LaborLedgerEntryDaoOjb
All Implemented Interfaces:
LedgerEntryBalancingDao, LaborLedgerEntryDao, org.kuali.rice.kns.dao.PlatformAwareDao, org.springframework.beans.factory.InitializingBean

public class LaborLedgerEntryDaoOjb
extends org.kuali.rice.kns.dao.impl.PlatformAwareDaoBaseOjb
implements LaborLedgerEntryDao, LedgerEntryBalancingDao

This is the data access object for ledger entry.

See Also:
LedgerEntry

Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
LaborLedgerEntryDaoOjb()
           
 
Method Summary
protected  org.apache.ojb.broker.query.Criteria buildPayTypeCriteria(Map<Integer,Set<String>> payPeriods, List<String> balanceTypes, Map<String,Set<String>> earnCodePayGroupMap)
           
 void deleteLedgerEntriesPriorToYear(Integer fiscalYear, String chartOfAccountsCode)
          delete the ledger entry records that were posted prior to the given fiscal year
 Iterator<LedgerEntry> find(Map<String,String> fieldValues)
          Find the ledger entries that satisfy the all entries in the given field-value pair
 Integer findCountGreaterOrEqualThan(Integer year)
          Finds the count of rows for >= fiscal year passed in.
 List<String> findEmployeesWithPayType(Map<Integer,Set<String>> payPeriods, List<String> balanceTypes, Map<String,Set<String>> earnCodePayGroupMap)
          find the employees who were paid based on a set of specified pay type within the given report periods.
 Object[] findEntryByGroup(Integer universityFiscalYear, String chartOfAccountsCode, String financialObjectCode, String financialBalanceTypeCode, String universityFiscalPeriodCode, String transactionDebitCreditCode)
          Does a group by query on the parameters passed in and returns an object array with the count as first parameter and sum of TRANSACTION_LEDGER_ENTRY_AMOUNT of the second.
protected  Class getEntryClass()
           
 Collection<LedgerEntry> getLedgerEntriesForEmployeeWithPayType(String emplid, Map<Integer,Set<String>> payPeriods, List<String> balanceTypes, Map<String,Set<String>> earnCodePayGroupMap)
          get the ledger entries for the given employee based on a set of specified pay type within the given report periods.
 Integer getMaxSquenceNumber(LedgerEntry ledgerEntry)
          The sequence number is one of the primary keys of ledger entry.
 boolean isEmployeeWithPayType(String emplid, Map<Integer,Set<String>> payPeriods, List<String> balanceTypes, Map<String,Set<String>> earnCodePayGroupMap)
          determine if the given employee is associated with a set of specified pay type within the given report periods.
 void save(LedgerEntry ledgerEntry)
          save the given ledger entry into the underlying data store
 
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

LaborLedgerEntryDaoOjb

public LaborLedgerEntryDaoOjb()
Method Detail

getMaxSquenceNumber

public Integer getMaxSquenceNumber(LedgerEntry ledgerEntry)
Description copied from interface: LaborLedgerEntryDao
The sequence number is one of the primary keys of ledger entry. The entries can be grouped by other keys. This method is used to get the maximum sequence number in the group of entries.

Specified by:
getMaxSquenceNumber in interface LaborLedgerEntryDao
Parameters:
ledgerEntry - the given ledger entry
Returns:
the maximum sequence number in a group of entries. If the group doesn't exist, return 0.
See Also:
LaborLedgerEntryDao.getMaxSquenceNumber(org.kuali.kfs.module.ld.businessobject.LedgerEntry)

find

public Iterator<LedgerEntry> find(Map<String,String> fieldValues)
Description copied from interface: LaborLedgerEntryDao
Find the ledger entries that satisfy the all entries in the given field-value pair

Specified by:
find in interface LaborLedgerEntryDao
Parameters:
fieldValues - the given field-value pair
Returns:
the ledger entries that satisfy the all entries in the given field-value pair
See Also:
LaborLedgerEntryDao.find(java.util.Map)

save

public void save(LedgerEntry ledgerEntry)
Description copied from interface: LaborLedgerEntryDao
save the given ledger entry into the underlying data store

Specified by:
save in interface LaborLedgerEntryDao
Parameters:
ledgerEntry - the given ledger entry
See Also:
LaborLedgerEntryDao.save(org.kuali.kfs.module.ld.businessobject.LedgerEntry)

findEmployeesWithPayType

public List<String> findEmployeesWithPayType(Map<Integer,Set<String>> payPeriods,
                                             List<String> balanceTypes,
                                             Map<String,Set<String>> earnCodePayGroupMap)
Description copied from interface: LaborLedgerEntryDao
find the employees who were paid based on a set of specified pay type within the given report periods. Here, a pay type can be determined by earn code and pay group.

Specified by:
findEmployeesWithPayType in interface LaborLedgerEntryDao
Parameters:
payPeriods - the given pay periods
balanceTypes - the specified balance type codes
earnCodePayGroupMap - the combination of earn codes and pay groups, where pay group is the key and earn code set is the value
Returns:
the employees who were paid based on a set of specified pay type within the given report periods
See Also:
org.kuali.kfs.module.ld.dataaccess.LaborLedgerEntryDao#findEmployeesWithPayType(java.util.Map, java.util.List, java.util.List)

getLedgerEntriesForEmployeeWithPayType

public Collection<LedgerEntry> getLedgerEntriesForEmployeeWithPayType(String emplid,
                                                                      Map<Integer,Set<String>> payPeriods,
                                                                      List<String> balanceTypes,
                                                                      Map<String,Set<String>> earnCodePayGroupMap)
Description copied from interface: LaborLedgerEntryDao
get the ledger entries for the given employee based on a set of specified pay type within the given report periods. Here, a pay type can be determined by earn code and pay group.

Specified by:
getLedgerEntriesForEmployeeWithPayType in interface LaborLedgerEntryDao
Parameters:
emplid - the given employee id
payPeriods - the given pay periods
balanceTypes - the specified balance type codes
earnCodePayGroupMap - the combination of earn codes and pay groups, where pay group is the key and earn code set is the value
Returns:
true if the given employee was paid based on a set of specified pay type within the given report periods; otherwise, false
See Also:
LaborLedgerEntryDao.getLedgerEntriesForEmployeeWithPayType(java.lang.String, java.util.Map, java.util.List, java.util.Map)

isEmployeeWithPayType

public boolean isEmployeeWithPayType(String emplid,
                                     Map<Integer,Set<String>> payPeriods,
                                     List<String> balanceTypes,
                                     Map<String,Set<String>> earnCodePayGroupMap)
Description copied from interface: LaborLedgerEntryDao
determine if the given employee is associated with a set of specified pay type within the given report periods. Here, a pay type can be determined by earn code and pay group.

Specified by:
isEmployeeWithPayType in interface LaborLedgerEntryDao
Parameters:
emplid - the given employee id
payPeriods - the given pay periods
balanceTypes - the specified balance type codes
earnCodePayGroupMap - the combination of earn codes and pay groups, where pay group is the key and earn code set is the value
Returns:
true if the given employee was paid based on a set of specified pay type within the given report periods; otherwise, false
See Also:
LaborLedgerEntryDao.isEmployeeWithPayType(java.lang.String, java.util.Map, java.util.List, java.util.Map)

deleteLedgerEntriesPriorToYear

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

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

findEntryByGroup

public Object[] findEntryByGroup(Integer universityFiscalYear,
                                 String chartOfAccountsCode,
                                 String financialObjectCode,
                                 String financialBalanceTypeCode,
                                 String universityFiscalPeriodCode,
                                 String transactionDebitCreditCode)
Description copied from interface: LedgerEntryBalancingDao
Does a group by query on the parameters passed in and returns an object array with the count as first parameter and sum of TRANSACTION_LEDGER_ENTRY_AMOUNT of the second.

Specified by:
findEntryByGroup in interface LedgerEntryBalancingDao
Parameters:
universityFiscalYear - the given university fiscal year
chartOfAccountsCode - the given chart of account code
financialObjectCode - the given object code
financialBalanceTypeCode - the given balance type code
universityFiscalPeriodCode - the given university fiscal period code
transactionDebitCreditCode - the given transaction debit or credit code
Returns:
object array with [0] being count(*) and [1] sum(TRANSACTION_LEDGER_ENTRY_AMOUNT). Returns null if data was not found
See Also:
LedgerEntryBalancingDao.findEntryByGroup(java.lang.Integer, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)

buildPayTypeCriteria

protected org.apache.ojb.broker.query.Criteria buildPayTypeCriteria(Map<Integer,Set<String>> payPeriods,
                                                                    List<String> balanceTypes,
                                                                    Map<String,Set<String>> earnCodePayGroupMap)

findCountGreaterOrEqualThan

public Integer findCountGreaterOrEqualThan(Integer year)
Description copied from interface: LedgerEntryBalancingDao
Finds the count of rows for >= fiscal year passed in.

Specified by:
findCountGreaterOrEqualThan in interface LedgerEntryBalancingDao
Returns:
count
See Also:
LedgerEntryBalancingDao.findCountGreaterOrEqualThan(java.lang.Integer)

getEntryClass

protected Class getEntryClass()
Returns:
the Class type of the business object accessed and managed


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