org.kuali.kfs.module.endow.batch.service.impl
Class CreateAccrualTransactionsServiceImpl

java.lang.Object
  extended by org.kuali.kfs.module.endow.batch.service.impl.CreateAccrualTransactionsServiceImpl
All Implemented Interfaces:
CreateAccrualTransactionsService

@Transactional
public class CreateAccrualTransactionsServiceImpl
extends Object
implements CreateAccrualTransactionsService

This class...


Field Summary
protected  ReportWriterService accrualTransactionsExceptionReportWriterService
           
protected  ReportWriterService accrualTransactionsTotalReportWriterService
           
protected  TransactionDocumentExceptionReportLine exceptionReportLine
           
protected  boolean isFistTimeForWritingExceptionReport
           
protected  boolean isFistTimeForWritingTotalReport
           
protected static org.apache.log4j.Logger LOG
           
protected  org.kuali.rice.kns.service.ParameterService parameterService
           
protected  TransactionDocumentTotalReportLine totalReportLine
           
 
Constructor Summary
CreateAccrualTransactionsServiceImpl()
          Constructs a CreateAccrualTransactionsServiceImpl.java.
 
Method Summary
protected  boolean addTransactionLine(CashIncreaseDocument cashIncreaseDocument, Security security, String kemid, org.kuali.rice.kns.util.KualiDecimal totalAmount)
          Creates and adds a new transaction line to the cash increase document.
 boolean createAccrualTransactions()
          Locates all active securities that have been accruing income and are scheduled to distribute income on the processing date and generate a transactional document that will credit the accrued income to the KEMID spendable income.
protected  CashIncreaseDocument createNewCashIncreaseDocument(String securityId, String registrationCode)
          Creates a new CashIncreaseDocument with source type Automated, transaction sub-type Cash, target security id set to the input security id.
 ReportWriterService getAccrualTransactionsExceptionReportWriterService()
          Gets the accrualTransactionsExceptionReportWriterService.
 ReportWriterService getAccrualTransactionsTotalReportWriterService()
          Gets the accrualTransactionsTotalReportWriterService.
protected  List<Security> getAllSecuritiesWithNextPayDateEqualCurrentDate()
          Locates all Security records for which the next income pay date is equal to the current date.
protected  Map<String,List<HoldingTaxLot>> groupTaxLotsBasedOnKemidAndIPIndicator(List<HoldingTaxLot> taxLots)
          Builds a map that groups tax lots based on kemid and income principal indicator ( a map from kemid and IP to taxlots).
protected  Map<String,List<HoldingTaxLot>> groupTaxLotsBasedOnRegistrationCode(List<HoldingTaxLot> taxLots)
          Builds a map that groups tax lots based on registration code ( a map from registration code to taxlots)
protected  void initializeTotalAndExceptionReportLines(String theDocumentId, String theSecurityId)
          Initializes the total report line and the exception report line.
 void setAccrualTransactionsExceptionReportWriterService(ReportWriterService accrualTransactionsExceptionReportWriterService)
          Sets the accrualTransactionsExceptionReportWriterService.
 void setAccrualTransactionsTotalReportWriterService(ReportWriterService accrualTransactionsTotalReportWriterService)
          Sets the accrualTransactionsTotalReportWriterService.
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
          Sets the businessObjectService.
 void setConfigService(org.kuali.rice.kns.service.KualiConfigurationService configService)
          Sets the configService.
 void setDocumentService(org.kuali.rice.kns.service.DocumentService documentService)
          Sets the documenyService.
 void setHoldingTaxLotService(HoldingTaxLotService holdingTaxLotService)
          Sets the holdingTaxLotService.
 void setKemService(KEMService kemService)
          Sets the kemService.
 void setKualiRuleService(org.kuali.rice.kns.service.KualiRuleService kualiRuleService)
          Sets the kualiRuleService.
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
          Sets the parameterService.
 void setSecurityDao(SecurityDao securityDao)
          Sets the securityDao.
protected  void submitCashIncreaseDocumentAndUpdateTaxLots(CashIncreaseDocument cashIncreaseDocument, List<HoldingTaxLot> taxLotsForUpdate)
          Submits the ECI doc and updates the values in the tax lots list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static org.apache.log4j.Logger LOG

parameterService

protected org.kuali.rice.kns.service.ParameterService parameterService

accrualTransactionsExceptionReportWriterService

protected ReportWriterService accrualTransactionsExceptionReportWriterService

accrualTransactionsTotalReportWriterService

protected ReportWriterService accrualTransactionsTotalReportWriterService

exceptionReportLine

protected TransactionDocumentExceptionReportLine exceptionReportLine

totalReportLine

protected TransactionDocumentTotalReportLine totalReportLine

isFistTimeForWritingTotalReport

protected boolean isFistTimeForWritingTotalReport

isFistTimeForWritingExceptionReport

protected boolean isFistTimeForWritingExceptionReport
Constructor Detail

CreateAccrualTransactionsServiceImpl

public CreateAccrualTransactionsServiceImpl()
Constructs a CreateAccrualTransactionsServiceImpl.java.

Method Detail

createAccrualTransactions

public boolean createAccrualTransactions()
Description copied from interface: CreateAccrualTransactionsService
Locates all active securities that have been accruing income and are scheduled to distribute income on the processing date and generate a transactional document that will credit the accrued income to the KEMID spendable income.

Specified by:
createAccrualTransactions in interface CreateAccrualTransactionsService
Returns:
true if successful, false otherwise
See Also:
CreateAccrualTransactionsService.createAccrualTransactions()

groupTaxLotsBasedOnRegistrationCode

protected Map<String,List<HoldingTaxLot>> groupTaxLotsBasedOnRegistrationCode(List<HoldingTaxLot> taxLots)
Builds a map that groups tax lots based on registration code ( a map from registration code to taxlots)

Parameters:
taxLots -
Returns:
a map from registration code to taxlots

groupTaxLotsBasedOnKemidAndIPIndicator

protected Map<String,List<HoldingTaxLot>> groupTaxLotsBasedOnKemidAndIPIndicator(List<HoldingTaxLot> taxLots)
Builds a map that groups tax lots based on kemid and income principal indicator ( a map from kemid and IP to taxlots).

Parameters:
taxLots -
Returns:
a map from kemid and IP to taxlots

addTransactionLine

protected boolean addTransactionLine(CashIncreaseDocument cashIncreaseDocument,
                                     Security security,
                                     String kemid,
                                     org.kuali.rice.kns.util.KualiDecimal totalAmount)
Creates and adds a new transaction line to the cash increase document.

Parameters:
cashIncreaseDocument -
security -
kemid -
totalAmount -
Returns:
true if transaction line successfully added, false otherwise

createNewCashIncreaseDocument

protected CashIncreaseDocument createNewCashIncreaseDocument(String securityId,
                                                             String registrationCode)
Creates a new CashIncreaseDocument with source type Automated, transaction sub-type Cash, target security id set to the input security id.

Parameters:
securityId -
Returns:
a new CashIncreaseDocument

submitCashIncreaseDocumentAndUpdateTaxLots

protected void submitCashIncreaseDocumentAndUpdateTaxLots(CashIncreaseDocument cashIncreaseDocument,
                                                          List<HoldingTaxLot> taxLotsForUpdate)
Submits the ECI doc and updates the values in the tax lots list.

Parameters:
cashIncreaseDocument -
taxLotsForUpdate -

getAllSecuritiesWithNextPayDateEqualCurrentDate

protected List<Security> getAllSecuritiesWithNextPayDateEqualCurrentDate()
Locates all Security records for which the next income pay date is equal to the current date.

Returns:

initializeTotalAndExceptionReportLines

protected void initializeTotalAndExceptionReportLines(String theDocumentId,
                                                      String theSecurityId)
Initializes the total report line and the exception report line.

Parameters:
theDocumentId -
theSecurityId -

setBusinessObjectService

public void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
Sets the businessObjectService.

Parameters:
businessObjectService -

setKemService

public void setKemService(KEMService kemService)
Sets the kemService.

Parameters:
kemService -

setHoldingTaxLotService

public void setHoldingTaxLotService(HoldingTaxLotService holdingTaxLotService)
Sets the holdingTaxLotService.

Parameters:
holdingTaxLotService -

setSecurityDao

public void setSecurityDao(SecurityDao securityDao)
Sets the securityDao.

Parameters:
securityDao -

setDocumentService

public void setDocumentService(org.kuali.rice.kns.service.DocumentService documentService)
Sets the documenyService.

Parameters:
documentService -

setConfigService

public void setConfigService(org.kuali.rice.kns.service.KualiConfigurationService configService)
Sets the configService.

Parameters:
configService -

setKualiRuleService

public void setKualiRuleService(org.kuali.rice.kns.service.KualiRuleService kualiRuleService)
Sets the kualiRuleService.

Parameters:
kualiRuleService -

setParameterService

public void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
Sets the parameterService.

Parameters:
parameterService -

getAccrualTransactionsExceptionReportWriterService

public ReportWriterService getAccrualTransactionsExceptionReportWriterService()
Gets the accrualTransactionsExceptionReportWriterService.

Returns:
accrualTransactionsExceptionReportWriterService

setAccrualTransactionsExceptionReportWriterService

public void setAccrualTransactionsExceptionReportWriterService(ReportWriterService accrualTransactionsExceptionReportWriterService)
Sets the accrualTransactionsExceptionReportWriterService.

Parameters:
accrualTransactionsExceptionReportWriterService -

getAccrualTransactionsTotalReportWriterService

public ReportWriterService getAccrualTransactionsTotalReportWriterService()
Gets the accrualTransactionsTotalReportWriterService.

Returns:
accrualTransactionsTotalReportWriterService

setAccrualTransactionsTotalReportWriterService

public void setAccrualTransactionsTotalReportWriterService(ReportWriterService accrualTransactionsTotalReportWriterService)
Sets the accrualTransactionsTotalReportWriterService.

Parameters:
accrualTransactionsTotalReportWriterService -


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