org.kuali.kfs.gl.batch.service.impl
Class SufficientFundsAccountUpdateServiceImpl

java.lang.Object
  extended by org.kuali.kfs.gl.batch.service.impl.SufficientFundsAccountUpdateServiceImpl
All Implemented Interfaces:
SufficientFundsAccountUpdateService

@Transactional
public class SufficientFundsAccountUpdateServiceImpl
extends Object
implements SufficientFundsAccountUpdateService

The default implementation of SufficientFundsAccountUpdateService


Constructor Summary
SufficientFundsAccountUpdateServiceImpl()
          Constructs a SufficientFundsAccountUpdateServiceImpl instance
 
Method Summary
protected  void addTransactionError(String errorMessage)
          Adds an error message to this instance's List of error messages
protected  boolean amountsAreNonZero(SufficientFundBalances sfbl)
          Determines if all sums associated with a sufficient funds balance are zero
 void calculateSufficientFundsByAccount(SufficientFundRebuild sfrb)
          Updates sufficient funds balances for the given account
 void convertOtypeToAtypes(SufficientFundRebuild sfrb)
          Given an O SF rebuild type, it will look up all of the matching balances in the table and add each account it finds as an A SF rebuild type.
protected  Integer getFiscalYear()
          Returns the fiscal year, set in a parameter, of sufficient funds to rebuild
protected  void initService()
          Initializes the process at the beginning of a run.
protected  void processCash(Account sfrbAccount, Balance balance)
          Determines how best to process a cash balance
protected  void processCashActual(Account sfrbAccount, Balance balance)
          Updates the current sufficient fund balance record with a cash actual balance
protected  void processCashEncumbrance(Balance balance)
          Updates the current sufficient funds balance with a cash encumbrance balance
protected  void processObjectOrAccount(Account sfrbAccount, Balance balance)
          Determines how best to process the given balance
protected  void processObjtAcctActual(Balance balance)
          Updates the current sufficient fund balance record with a non-cash actual balance
protected  void processObjtAcctBudget(Balance balance)
          Updates the current sufficient fund balance record with a non-cash budget balance
protected  void processObjtAcctEncmbrnc(Balance balance)
          Updates the current sufficient fund balance record with a non-cash encumbrance balance
 void rebuildSufficientFunds()
          Rebuilds all necessary sufficient funds balances.
 void setAccountService(AccountService accountService)
           
 void setBalanceDao(BalanceDao balanceDao)
           
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService bos)
           
 void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
           
 void setKualiConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService kualiConfigurationService)
           
 void setOptionsDao(OptionsDao optionsDao)
           
 void setReportWriterService(ReportWriterService sfrs)
           
 void setSufficientFundBalancesDao(SufficientFundBalancesDao sufficientFundBalancesDao)
           
 void setSufficientFundRebuildDao(SufficientFundRebuildDao sufficientFundRebuildDao)
           
 void setSufficientFundsService(SufficientFundsService sfs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SufficientFundsAccountUpdateServiceImpl

public SufficientFundsAccountUpdateServiceImpl()
Constructs a SufficientFundsAccountUpdateServiceImpl instance

Method Detail

getFiscalYear

protected Integer getFiscalYear()
Returns the fiscal year, set in a parameter, of sufficient funds to rebuild

Returns:
the fiscal year

rebuildSufficientFunds

public void rebuildSufficientFunds()
Rebuilds all necessary sufficient funds balances.

Specified by:
rebuildSufficientFunds in interface SufficientFundsAccountUpdateService
See Also:
SufficientFundsAccountUpdateService.rebuildSufficientFunds()

initService

protected void initService()
Initializes the process at the beginning of a run.


convertOtypeToAtypes

public void convertOtypeToAtypes(SufficientFundRebuild sfrb)
Given an O SF rebuild type, it will look up all of the matching balances in the table and add each account it finds as an A SF rebuild type.

Specified by:
convertOtypeToAtypes in interface SufficientFundsAccountUpdateService
Parameters:
sfrb - the sufficient fund rebuild record to convert

calculateSufficientFundsByAccount

public void calculateSufficientFundsByAccount(SufficientFundRebuild sfrb)
Updates sufficient funds balances for the given account

Specified by:
calculateSufficientFundsByAccount in interface SufficientFundsAccountUpdateService
Parameters:
sfrb - the sufficient fund rebuild record, with a chart and account number

amountsAreNonZero

protected boolean amountsAreNonZero(SufficientFundBalances sfbl)
Determines if all sums associated with a sufficient funds balance are zero

Parameters:
sfbl - the sufficient funds balance to check
Returns:
true if all sums in the balance are zero, false otherwise

processObjectOrAccount

protected void processObjectOrAccount(Account sfrbAccount,
                                      Balance balance)
Determines how best to process the given balance

Parameters:
sfrbAccount - the account of the current sufficient funds balance rebuild record
balance - the cash encumbrance balance to update the sufficient funds balance with

processObjtAcctActual

protected void processObjtAcctActual(Balance balance)
Updates the current sufficient fund balance record with a non-cash actual balance

Parameters:
balance - the cash encumbrance balance to update the sufficient funds balance with

processObjtAcctEncmbrnc

protected void processObjtAcctEncmbrnc(Balance balance)
Updates the current sufficient fund balance record with a non-cash encumbrance balance

Parameters:
balance - the cash encumbrance balance to update the sufficient funds balance with

processObjtAcctBudget

protected void processObjtAcctBudget(Balance balance)
Updates the current sufficient fund balance record with a non-cash budget balance

Parameters:
balance - the cash encumbrance balance to update the sufficient funds balance with

processCash

protected void processCash(Account sfrbAccount,
                           Balance balance)
Determines how best to process a cash balance

Parameters:
sfrbAccount - the account of the current sufficient funds balance record
balance - the cash encumbrance balance to update the sufficient funds balance with

processCashActual

protected void processCashActual(Account sfrbAccount,
                                 Balance balance)
Updates the current sufficient fund balance record with a cash actual balance

Parameters:
sfrbAccount - the account of the current sufficient funds balance record
balance - the cash encumbrance balance to update the sufficient funds balance with

processCashEncumbrance

protected void processCashEncumbrance(Balance balance)
Updates the current sufficient funds balance with a cash encumbrance balance

Parameters:
balance - the cash encumbrance balance to update the sufficient funds balance with

addTransactionError

protected void addTransactionError(String errorMessage)
Adds an error message to this instance's List of error messages

Parameters:
errorMessage - the error message to keep

setDateTimeService

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

setKualiConfigurationService

public void setKualiConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService kualiConfigurationService)

setBalanceDao

public void setBalanceDao(BalanceDao balanceDao)

setSufficientFundBalancesDao

public void setSufficientFundBalancesDao(SufficientFundBalancesDao sufficientFundBalancesDao)

setOptionsDao

public void setOptionsDao(OptionsDao optionsDao)

setReportWriterService

public void setReportWriterService(ReportWriterService sfrs)

setAccountService

public void setAccountService(AccountService accountService)

setSufficientFundsService

public void setSufficientFundsService(SufficientFundsService sfs)

setBusinessObjectService

public void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService bos)

setSufficientFundRebuildDao

public void setSufficientFundRebuildDao(SufficientFundRebuildDao sufficientFundRebuildDao)


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