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

java.lang.Object
  extended by org.kuali.kfs.gl.batch.service.impl.PostBalance
All Implemented Interfaces:
BalanceCalculator, PostTransaction

@Transactional
public class PostBalance
extends Object
implements PostTransaction, BalanceCalculator

This implementation of PostTransaction updates the appropriate Balance


Constructor Summary
PostBalance()
          Constructs a PostBalance instance
 
Method Summary
 Balance findBalance(Collection balanceList, Transaction t)
          Given a list of balances, determines which one the given trsnaction should post to
 String getDestinationName()
          The name of the destination for the post (ie, the database table name where resultant records will be posted)
 String post(Transaction t, int mode, Date postDate, ReportWriterService posterReportWriterService)
          This posts the effect of the transaction upon the appropriate balance record.
 void setAccountingCycleCachingService(AccountingCycleCachingService accountingCycleCachingService)
           
 void updateBalance(Transaction t, Balance b)
          Updates the balance based on the given transaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostBalance

public PostBalance()
Constructs a PostBalance instance

Method Detail

post

public String post(Transaction t,
                   int mode,
                   Date postDate,
                   ReportWriterService posterReportWriterService)
This posts the effect of the transaction upon the appropriate balance record.

Specified by:
post in interface PostTransaction
Parameters:
t - the transaction which is being posted
mode - the mode the poster is currently running in
postDate - the date this transaction should post to
posterReportWriterService - the writer service where the poster is writing its report
Returns:
the accomplished post type
See Also:
org.kuali.kfs.gl.batch.service.PostTransaction#post(org.kuali.kfs.gl.businessobject.Transaction, int, java.util.Date)

findBalance

public Balance findBalance(Collection balanceList,
                           Transaction t)
Given a list of balances, determines which one the given trsnaction should post to

Specified by:
findBalance in interface BalanceCalculator
Parameters:
balanceList - a Collection of balances
t - the transaction that is being posted
Returns:
the balance, either found from the list, or, if not present in the list, newly created
See Also:
BalanceCalculator.findBalance(java.util.Collection, org.kuali.kfs.gl.businessobject.Transaction)

updateBalance

public void updateBalance(Transaction t,
                          Balance b)
Description copied from interface: BalanceCalculator
Updates the balance based on the given transaction

Specified by:
updateBalance in interface BalanceCalculator
Parameters:
t -
enc -

getDestinationName

public String getDestinationName()
Description copied from interface: PostTransaction
The name of the destination for the post (ie, the database table name where resultant records will be posted)

Specified by:
getDestinationName in interface PostTransaction
Returns:
name
See Also:
PostTransaction.getDestinationName()

setAccountingCycleCachingService

public void setAccountingCycleCachingService(AccountingCycleCachingService accountingCycleCachingService)


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