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

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

@Transactional
public class CreateGainLossDistributionTransactionsServiceImpl
extends Object
implements CreateGainLossDistributionTransactionsService


Field Summary
protected static org.apache.log4j.Logger LOG
           
 
Constructor Summary
CreateGainLossDistributionTransactionsServiceImpl()
          Constructs a CreateGainLossDistributionTransactionsServiceImpl.java.
 
Method Summary
protected  void addSecurityDetails(HoldingAdjustmentDocument holdingAdjustmentDocument, String securityId, String registrationCode)
          Creates and add a source security details to the holding adjustment document.
protected  boolean addTransactionLine(boolean isShortTerm, HoldingAdjustmentDocument holdingAdjustmentDocument, HoldingTaxLot holdingTaxLot, PooledFundValue pooledFundValue)
          Creates and adds a transaction line to the holding adjustment document.
protected  EndowmentTransactionLine createEndowmentTransactionLine(boolean isLoss, boolean isShortTerm, HoldingAdjustmentDocument holdingAdjustmentDocument, HoldingTaxLot holdingTaxLot, PooledFundValue pooledFundValue)
          creates a transaction line and setups the data based on isLoss if isLoss = true then creates source line else creates target line.
protected  HoldingAdjustmentDocument generateHoldingAdjustmentDocument(boolean isShortTerm, String securityId)
          Generates a HoldingAdjustmentDocument.
 ReportWriterService getGainLossDistributionExceptionReportWriterService()
          Gets the gainLossDistributionExceptionReportWriterService.
 ReportWriterService getGainLossDistributionTotalsReportWriterService()
          Gets the gainLossDistributionTotalsReportWriterService.
protected  String getHoldingAdjustmentDocumentTypeName()
          Gets the HoldingAdjustmentDocument type.
protected  Map<String,List<HoldingTaxLot>> groupTaxLotsByRegistrationCode(List<HoldingTaxLot> holdingTaxLots)
          Groups tax lots by registration code.
protected  void initializeReportLines(String theDocumentId, String theSecurityId)
          Initializes the distributionTotalReportLine and exceptionReportLine for further use.
 boolean processGainLossDistribution()
          Creates Gains and Losses Distribution.
protected  boolean processGainLossDistribution(boolean isShortTerm)
          Processes Short/Long Term Gains and Losses.
protected  boolean processLongTermGainLossDistribution()
          Processes Long Term Gains and Losses.
protected  boolean processShortTermGainLossDistribution()
          Processes Short Term Gains and Losses.
 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 documentService.
 void setGainLossDistributionExceptionReportWriterService(ReportWriterService gainLossDistributionExceptionReportWriterService)
          Sets the gainLossDistributionExceptionReportWriterService.
 void setGainLossDistributionTotalsReportWriterService(ReportWriterService gainLossDistributionTotalsReportWriterService)
          Sets the gainLossDistributionTotalsReportWriterService.
 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 setPooledFundValueService(PooledFundValueService pooledFundValueService)
          Sets the pooledFundValueService.
 void setUpdateHoldingAdjustmentDocumentTaxLotsService(UpdateHoldingAdjustmentDocumentTaxLotsService updateHoldingAdjustmentDocumentTaxLotsService)
          Sets the updateHoldingAdjustmentDocumentTaxLotsService.
protected  void validateAndRouteHoldingAdjustmentDocument(HoldingAdjustmentDocument holdingAdjustmentDocument, PooledFundValue pooledFundValue, boolean isShortTerm)
          Validates and Routes the HoldingAdjustmentDocument.
 
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
Constructor Detail

CreateGainLossDistributionTransactionsServiceImpl

public CreateGainLossDistributionTransactionsServiceImpl()
Constructs a CreateGainLossDistributionTransactionsServiceImpl.java.

Method Detail

processGainLossDistribution

public boolean processGainLossDistribution()
Description copied from interface: CreateGainLossDistributionTransactionsService
Creates Gains and Losses Distribution.

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

processShortTermGainLossDistribution

protected boolean processShortTermGainLossDistribution()
Processes Short Term Gains and Losses.

Returns:
true if successful, false otherwise

processLongTermGainLossDistribution

protected boolean processLongTermGainLossDistribution()
Processes Long Term Gains and Losses.

Returns:
true if successful, false otherwise

processGainLossDistribution

protected boolean processGainLossDistribution(boolean isShortTerm)
Processes Short/Long Term Gains and Losses.

Returns:
true if successful, false otherwise

groupTaxLotsByRegistrationCode

protected Map<String,List<HoldingTaxLot>> groupTaxLotsByRegistrationCode(List<HoldingTaxLot> holdingTaxLots)
Groups tax lots by registration code.

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

generateHoldingAdjustmentDocument

protected HoldingAdjustmentDocument generateHoldingAdjustmentDocument(boolean isShortTerm,
                                                                      String securityId)
Generates a HoldingAdjustmentDocument.

Returns:
the HoldingAdjustmentDocument

addSecurityDetails

protected void addSecurityDetails(HoldingAdjustmentDocument holdingAdjustmentDocument,
                                  String securityId,
                                  String registrationCode)
Creates and add a source security details to the holding adjustment document.

Parameters:
holdingAdjustmentDocument -
securityId -
registrationCode -

createEndowmentTransactionLine

protected EndowmentTransactionLine createEndowmentTransactionLine(boolean isLoss,
                                                                  boolean isShortTerm,
                                                                  HoldingAdjustmentDocument holdingAdjustmentDocument,
                                                                  HoldingTaxLot holdingTaxLot,
                                                                  PooledFundValue pooledFundValue)
creates a transaction line and setups the data based on isLoss if isLoss = true then creates source line else creates target line.


addTransactionLine

protected boolean addTransactionLine(boolean isShortTerm,
                                     HoldingAdjustmentDocument holdingAdjustmentDocument,
                                     HoldingTaxLot holdingTaxLot,
                                     PooledFundValue pooledFundValue)
Creates and adds a transaction line to the holding adjustment document.

Parameters:
isShortTerm -
holdingAdjustmentDocument -
holdingTaxLot -
gainloss -

validateAndRouteHoldingAdjustmentDocument

protected void validateAndRouteHoldingAdjustmentDocument(HoldingAdjustmentDocument holdingAdjustmentDocument,
                                                         PooledFundValue pooledFundValue,
                                                         boolean isShortTerm)
Validates and Routes the HoldingAdjustmentDocument. If document successfully routed set short/long term process complete to Yes.

Parameters:
holdingAdjustmentDocument -
pooledFundValue -

getHoldingAdjustmentDocumentTypeName

protected String getHoldingAdjustmentDocumentTypeName()
Gets the HoldingAdjustmentDocument type.

Returns:
the HoldingAdjustmentDocument type

setPooledFundValueService

public void setPooledFundValueService(PooledFundValueService pooledFundValueService)
Sets the pooledFundValueService.

Parameters:
pooledFundValueService -

setHoldingTaxLotService

public void setHoldingTaxLotService(HoldingTaxLotService holdingTaxLotService)
Sets the holdingTaxLotService.

Parameters:
holdingTaxLotService -

setParameterService

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

Parameters:
parameterService -

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 -

setBusinessObjectService

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

Parameters:
businessObjectService -

setDocumentService

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

Parameters:
documentService -

setGainLossDistributionExceptionReportWriterService

public void setGainLossDistributionExceptionReportWriterService(ReportWriterService gainLossDistributionExceptionReportWriterService)
Sets the gainLossDistributionExceptionReportWriterService.

Parameters:
gainLossDistributionExceptionReportWriterService -

getGainLossDistributionExceptionReportWriterService

public ReportWriterService getGainLossDistributionExceptionReportWriterService()
Gets the gainLossDistributionExceptionReportWriterService.

Returns:
gainLossDistributionExceptionReportWriterService

setUpdateHoldingAdjustmentDocumentTaxLotsService

public void setUpdateHoldingAdjustmentDocumentTaxLotsService(UpdateHoldingAdjustmentDocumentTaxLotsService updateHoldingAdjustmentDocumentTaxLotsService)
Sets the updateHoldingAdjustmentDocumentTaxLotsService.

Parameters:
updateHoldingAdjustmentDocumentTaxLotsService -

setKemService

public void setKemService(KEMService kemService)
Sets the kemService.

Parameters:
kemService -

initializeReportLines

protected void initializeReportLines(String theDocumentId,
                                     String theSecurityId)
Initializes the distributionTotalReportLine and exceptionReportLine for further use.

Parameters:
theDocumentId -
theSecurityId -

getGainLossDistributionTotalsReportWriterService

public ReportWriterService getGainLossDistributionTotalsReportWriterService()
Gets the gainLossDistributionTotalsReportWriterService.

Returns:
gainLossDistributionTotalsReportWriterService

setGainLossDistributionTotalsReportWriterService

public void setGainLossDistributionTotalsReportWriterService(ReportWriterService gainLossDistributionTotalsReportWriterService)
Sets the gainLossDistributionTotalsReportWriterService.

Parameters:
gainLossDistributionTotalsReportWriterService -


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