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

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

public class EncumbranceDaoOjb
extends org.kuali.rice.kns.dao.impl.PlatformAwareDaoBaseOjb
implements EncumbranceDao

An OJB implementation of the EncumbranceDao


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
EncumbranceDaoOjb()
           
 
Method Summary
protected  List buildAttributeList()
          This method builds the atrribute list used by balance searching
protected  List buildGroupByList()
          This method builds group by attribute list used by balance searching
 Integer findCountGreaterOrEqualThan(Integer year)
           
 Iterator findOpenEncumbrance(Map fieldValues)
          Queries the database to find all open encumbrances that qualify by the given keys
 Iterator getAllEncumbrances()
          fetch all encumbrance records from GL open encumbrance table
 Encumbrance getEncumbranceByTransaction(Transaction t)
          Returns an encumbrance that would be affected by the given transaction
 Iterator getEncumbrancesToClose(Integer fiscalYear)
          Returns an Iterator of all encumbrances that need to be closed for the fiscal year
protected  org.apache.ojb.broker.query.Query getOpenEncumbranceQuery(Map fieldValues)
          build the query for encumbrance search
 Integer getOpenEncumbranceRecordCount(Map fieldValues)
          Counts the number of open encumbrances that have the keys given in the map
 Iterator getSummarizedEncumbrances(String documentTypeCode, boolean included)
          group all encumbrances with/without the given document type code by fiscal year, chart, account, sub-account, object code, sub object code, and balance type code, and summarize the encumbrance amount and the encumbrance close amount.
 void purgeYearByChart(String chartOfAccountsCode, int year)
          Purges the database of all those encumbrances with the given chart and year
 void save(Encumbrance e)
          Saves an encumbrance to the database
 
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

EncumbranceDaoOjb

public EncumbranceDaoOjb()
Method Detail

getEncumbranceByTransaction

public Encumbrance getEncumbranceByTransaction(Transaction t)
Returns an encumbrance that would be affected by the given transaction

Specified by:
getEncumbranceByTransaction in interface EncumbranceDao
Parameters:
t - the transaction to find the affected encumbrance for
Returns:
an Encumbrance that would be affected by the posting of the transaction, or null
See Also:
EncumbranceDao.getEncumbranceByTransaction(org.kuali.kfs.gl.businessobject.Transaction)

getEncumbrancesToClose

public Iterator getEncumbrancesToClose(Integer fiscalYear)
Returns an Iterator of all encumbrances that need to be closed for the fiscal year

Specified by:
getEncumbrancesToClose in interface EncumbranceDao
Parameters:
fiscalYear - a fiscal year to find encumbrances for
Returns:
an Iterator of encumbrances to close
See Also:
EncumbranceDao.getEncumbrancesToClose(java.lang.Integer)

save

public void save(Encumbrance e)
Saves an encumbrance to the database

Specified by:
save in interface EncumbranceDao
Parameters:
e - an encumbrance to save
See Also:
EncumbranceDao.save(org.kuali.kfs.gl.businessobject.Encumbrance)

purgeYearByChart

public void purgeYearByChart(String chartOfAccountsCode,
                             int year)
Purges the database of all those encumbrances with the given chart and year

Specified by:
purgeYearByChart in interface EncumbranceDao
Parameters:
chartOfAccountsCode - the chart of accounts code purged encumbrances will have
year - the university fiscal year purged encumbrances will have
See Also:
EncumbranceDao.purgeYearByChart(java.lang.String, int)

getAllEncumbrances

public Iterator getAllEncumbrances()
fetch all encumbrance records from GL open encumbrance table

Specified by:
getAllEncumbrances in interface EncumbranceDao
Returns:
an Iterator with all encumbrances currently in the database
See Also:
EncumbranceDao.getAllEncumbrances()

getSummarizedEncumbrances

public Iterator getSummarizedEncumbrances(String documentTypeCode,
                                          boolean included)
group all encumbrances with/without the given document type code by fiscal year, chart, account, sub-account, object code, sub object code, and balance type code, and summarize the encumbrance amount and the encumbrance close amount.

Specified by:
getSummarizedEncumbrances in interface EncumbranceDao
Parameters:
documentTypeCode - the given document type code
included - indicate if all encumbrances with the given document type are included in the results or not
Returns:
an Iterator of arrays of java.lang.Objects holding summarization data about qualifying encumbrances
See Also:
EncumbranceDao.getSummarizedEncumbrances(String, boolean)

findOpenEncumbrance

public Iterator findOpenEncumbrance(Map fieldValues)
Queries the database to find all open encumbrances that qualify by the given keys

Specified by:
findOpenEncumbrance in interface EncumbranceDao
Parameters:
fieldValues - the input fields and values
Returns:
a collection of open encumbrances
See Also:
EncumbranceDao.findOpenEncumbrance(java.util.Map)

getOpenEncumbranceRecordCount

public Integer getOpenEncumbranceRecordCount(Map fieldValues)
Counts the number of open encumbrances that have the keys given in the map

Specified by:
getOpenEncumbranceRecordCount in interface EncumbranceDao
Parameters:
fieldValues - the input fields and values
Returns:
the number of the open encumbrances
See Also:
EncumbranceDao.getOpenEncumbranceRecordCount(java.util.Map)

getOpenEncumbranceQuery

protected org.apache.ojb.broker.query.Query getOpenEncumbranceQuery(Map fieldValues)
build the query for encumbrance search

Parameters:
fieldValues - a Map of values to use as keys for the query
Returns:
an OJB query

buildAttributeList

protected List buildAttributeList()
This method builds the atrribute list used by balance searching

Returns:
a List of encumbrance attributes that need to be summed

buildGroupByList

protected List buildGroupByList()
This method builds group by attribute list used by balance searching

Returns:
a List of encumbrance attributes to search on

findCountGreaterOrEqualThan

public Integer findCountGreaterOrEqualThan(Integer year)
Specified by:
findCountGreaterOrEqualThan in interface EncumbranceDao
Parameters:
year - the given university fiscal year
Returns:
count of rows for the given fiscal year
See Also:
EncumbranceDao.findCountGreaterOrEqualThan(java.lang.Integer)


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