org.kuali.kfs.module.bc.batch.dataaccess.impl
Class GeneralLedgerBudgetLoadDaoOjb

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.bc.batch.dataaccess.impl.BudgetConstructionBatchHelperDaoOjb
                  extended by org.kuali.kfs.module.bc.batch.dataaccess.impl.GeneralLedgerBudgetLoadDaoOjb
All Implemented Interfaces:
GeneralLedgerBudgetLoadDao, org.kuali.rice.kns.dao.PlatformAwareDao, org.springframework.beans.factory.InitializingBean

public class GeneralLedgerBudgetLoadDaoOjb
extends BudgetConstructionBatchHelperDaoOjb
implements GeneralLedgerBudgetLoadDao


Nested Class Summary
protected  class GeneralLedgerBudgetLoadDaoOjb.DaoGlobalVariables
          This class allows us to create global variables and pass them around.
protected  class GeneralLedgerBudgetLoadDaoOjb.DiagnosticCounters
          This class keeps a set of counters and provides a method to print them out This allows us to set up thread-local counters in the unlikely event this code is run by more than one thread
 
Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
GeneralLedgerBudgetLoadDaoOjb()
           
 
Method Summary
protected  HashMap<String,Integer> entrySequenceNumber(Integer requestYear)
          build a hashmap containing the next entry sequence number to use for each document (document number) to be loaded from budget construction to the general ledger
protected  HashSet<String> getAccountsNotToBeLoaded()
          get a list of accounts that should not be loaded from the budget to the General Ledger
protected  GeneralLedgerPendingEntry getNewPendingEntryWithDefaults(GeneralLedgerBudgetLoadDaoOjb.DaoGlobalVariables daoGlobalVariables)
          This method creates a new generalLedgerPendingEntry object and initializes it with the default settings for the budget construction general ledger load.
protected  HashSet<String> getSubFundsNotToBeLoaded()
          build a hash set of subfunds whose accounts should NOT be loaded this can be done by either a list of FUND groups and/or a list of subfund groups
protected  void loadBudgetConstructionMonthlyBudget(GeneralLedgerBudgetLoadDaoOjb.DaoGlobalVariables daoGlobalVariables, GeneralLedgerBudgetLoadDaoOjb.DiagnosticCounters diagnosticCounters)
           
 void loadGeneralLedgerFromBudget(Integer fiscalYear)
           
protected  void loadPendingBudgetConstructionGeneralLedger(GeneralLedgerBudgetLoadDaoOjb.DaoGlobalVariables daoGlobalVariables, GeneralLedgerBudgetLoadDaoOjb.DiagnosticCounters diagnosticCounters)
          This method loads all the eligible pending budget construction general ledger rows
protected  void openAllAccountingPeriods(Integer requestYear)
          this method makes sure all accounting periods inn the target fiscal year are open
protected  org.apache.ojb.broker.query.QueryByCriteria queryForBudgetConstructionMonthly(Integer fiscalYear)
          This method builds the query to fetch the monthly budget general ledger lines to be loaded
protected  org.apache.ojb.broker.query.QueryByCriteria queryForPendingBudgetConstructionGeneralLedger(Integer fiscalYear)
          This method builds the query to fetch the pending budget construction general ledger rows to be loaded
 void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
           
 void setHomeOriginationService(HomeOriginationService homeOriginationService)
           
protected  void writeGeneralLedgerPendingEntryFromAnnual(GeneralLedgerPendingEntry newRow, PendingBudgetConstructionGeneralLedger pbgl, GeneralLedgerBudgetLoadDaoOjb.DaoGlobalVariables daoGlobalVariables, GeneralLedgerBudgetLoadDaoOjb.DiagnosticCounters diagnosticCounters)
          complete the pending entry row based on the data returned from the DB store it to the DB
protected  void writeGeneralLedgerPendingEntryFromMonthly(GeneralLedgerPendingEntry newRow, BudgetConstructionMonthly pbglMonthly, GeneralLedgerBudgetLoadDaoOjb.DaoGlobalVariables daoGlobalVariables, GeneralLedgerBudgetLoadDaoOjb.DiagnosticCounters diagnosticCounters)
           
 
Methods inherited from class org.kuali.kfs.module.bc.batch.dataaccess.impl.BudgetConstructionBatchHelperDaoOjb
buildCountDistinct, buildCountDistinct, getDBFieldNamesForClass, getOjbPlatform, hashCapacity, hashCapacity, hashCapacity, hashObjectSize, hashObjectSize, hashObjectSize, queryCountDistinct, setOjbMySqlPlatform, setOjbOraclePlatform, setOjbPlatform
 
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

GeneralLedgerBudgetLoadDaoOjb

public GeneralLedgerBudgetLoadDaoOjb()
Method Detail

loadGeneralLedgerFromBudget

public void loadGeneralLedgerFromBudget(Integer fiscalYear)
Specified by:
loadGeneralLedgerFromBudget in interface GeneralLedgerBudgetLoadDao

entrySequenceNumber

protected HashMap<String,Integer> entrySequenceNumber(Integer requestYear)
build a hashmap containing the next entry sequence number to use for each document (document number) to be loaded from budget construction to the general ledger

Parameters:
target - fiscal year for the budget load
Returns:
HashMapap keyed on document number containing the next entry sequence number to use for the key

getNewPendingEntryWithDefaults

protected GeneralLedgerPendingEntry getNewPendingEntryWithDefaults(GeneralLedgerBudgetLoadDaoOjb.DaoGlobalVariables daoGlobalVariables)
This method creates a new generalLedgerPendingEntry object and initializes it with the default settings for the budget construction general ledger load.

Parameters:
requestYear -
financialSystemOriginationCode -
Returns:
intiliazed GeneralLedgerPendingEntry business object

loadBudgetConstructionMonthlyBudget

protected void loadBudgetConstructionMonthlyBudget(GeneralLedgerBudgetLoadDaoOjb.DaoGlobalVariables daoGlobalVariables,
                                                   GeneralLedgerBudgetLoadDaoOjb.DiagnosticCounters diagnosticCounters)

loadPendingBudgetConstructionGeneralLedger

protected void loadPendingBudgetConstructionGeneralLedger(GeneralLedgerBudgetLoadDaoOjb.DaoGlobalVariables daoGlobalVariables,
                                                          GeneralLedgerBudgetLoadDaoOjb.DiagnosticCounters diagnosticCounters)
This method loads all the eligible pending budget construction general ledger rows

Parameters:
daoGlobalVariables -
diagnosticCounters -

queryForBudgetConstructionMonthly

protected org.apache.ojb.broker.query.QueryByCriteria queryForBudgetConstructionMonthly(Integer fiscalYear)
This method builds the query to fetch the monthly budget general ledger lines to be loaded

Parameters:
fiscalYear - : the year to be loaded
Returns:
query for fetching monthly budget rows

queryForPendingBudgetConstructionGeneralLedger

protected org.apache.ojb.broker.query.QueryByCriteria queryForPendingBudgetConstructionGeneralLedger(Integer fiscalYear)
This method builds the query to fetch the pending budget construction general ledger rows to be loaded

Parameters:
fiscalYear: - the year to be loaded
Returns:
query for fetching pending budget construction GL rows

writeGeneralLedgerPendingEntryFromAnnual

protected void writeGeneralLedgerPendingEntryFromAnnual(GeneralLedgerPendingEntry newRow,
                                                        PendingBudgetConstructionGeneralLedger pbgl,
                                                        GeneralLedgerBudgetLoadDaoOjb.DaoGlobalVariables daoGlobalVariables,
                                                        GeneralLedgerBudgetLoadDaoOjb.DiagnosticCounters diagnosticCounters)
complete the pending entry row based on the data returned from the DB store it to the DB

Parameters:
newRow -
source - annual budget construction GL row
object - containing global constants

writeGeneralLedgerPendingEntryFromMonthly

protected void writeGeneralLedgerPendingEntryFromMonthly(GeneralLedgerPendingEntry newRow,
                                                         BudgetConstructionMonthly pbglMonthly,
                                                         GeneralLedgerBudgetLoadDaoOjb.DaoGlobalVariables daoGlobalVariables,
                                                         GeneralLedgerBudgetLoadDaoOjb.DiagnosticCounters diagnosticCounters)

getAccountsNotToBeLoaded

protected HashSet<String> getAccountsNotToBeLoaded()
get a list of accounts that should not be loaded from the budget to the General Ledger

Returns:
hashset of accounts NOT to be loaded

getSubFundsNotToBeLoaded

protected HashSet<String> getSubFundsNotToBeLoaded()
build a hash set of subfunds whose accounts should NOT be loaded this can be done by either a list of FUND groups and/or a list of subfund groups

Returns:
list of subfunds whose accounts will NOT be loaded
See Also:
to initialize the String[] array(s) as desired

openAllAccountingPeriods

protected void openAllAccountingPeriods(Integer requestYear)
this method makes sure all accounting periods inn the target fiscal year are open

Parameters:
request - fiscal year (or other fiscal period) which is the TARGET of the load

setDateTimeService

public void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)

setHomeOriginationService

public void setHomeOriginationService(HomeOriginationService homeOriginationService)


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