org.kuali.kfs.gl.dataaccess.impl
Class EntryDaoOjb

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.gl.dataaccess.impl.EntryDaoOjb
All Implemented Interfaces:
EntryDao, LedgerEntryBalancingDao, org.kuali.rice.kns.dao.PlatformAwareDao, org.springframework.beans.factory.InitializingBean

public class EntryDaoOjb
extends org.kuali.rice.kns.dao.impl.PlatformAwareDaoBaseOjb
implements EntryDao, LedgerEntryBalancingDao

An OJB implementation of EntryDao


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
EntryDaoOjb()
          Constructs a EntryDaoOjb instance
 
Method Summary
 void addEntry(Transaction t, Date postDate)
          Turns the given transaction into an entry and then saves that entry in the database
 Integer findCountGreaterOrEqualThan(Integer year)
          Finds the count of rows for >= fiscal year passed in.
 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.
 int getMaxSequenceNumber(Transaction t)
          Find the maximum transactionLedgerEntrySequenceNumber in the entry table for a specific transaction.
 void purgeYearByChart(String chartOfAccountsCode, int year)
          Purge the entry table by chart/year
 
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

EntryDaoOjb

public EntryDaoOjb()
Constructs a EntryDaoOjb instance

Method Detail

addEntry

public void addEntry(Transaction t,
                     Date postDate)
Turns the given transaction into an entry and then saves that entry in the database

Specified by:
addEntry in interface EntryDao
Parameters:
t - the transaction to save
postDate - the officially reported posting date
See Also:
EntryDao.addEntry(org.kuali.kfs.gl.businessobject.Transaction, java.util.Date)

getMaxSequenceNumber

public int getMaxSequenceNumber(Transaction t)
Find the maximum transactionLedgerEntrySequenceNumber in the entry table for a specific transaction. This is used to make sure that rows added have a unique primary key.

Specified by:
getMaxSequenceNumber in interface EntryDao
Parameters:
t - the transaction to check
Returns:
the max sequence number

purgeYearByChart

public void purgeYearByChart(String chartOfAccountsCode,
                             int year)
Purge the entry table by chart/year

Specified by:
purgeYearByChart in interface EntryDao
Parameters:
chart - the chart of accounts code of entries to purge
year - the university fiscal year of entries to purge

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)

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)


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