org.kuali.kfs.module.endow.document.service.impl
Class SecurityServiceImpl

java.lang.Object
  extended by org.kuali.kfs.module.endow.document.service.impl.SecurityServiceImpl
All Implemented Interfaces:
SecurityService

public class SecurityServiceImpl
extends Object
implements SecurityService

This class provides service for Security maintenance


Constructor Summary
SecurityServiceImpl()
           
 
Method Summary
 void computeValueBasedOnValuationMethod(Security security)
          Calculates market value or unit value based on the security valuation method
 org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
          This method gets the businessObjectService.
 Security getByPrimaryKey(String id)
          Gets a Security by primary key.
 KEMService getKemService()
          Gets the kemService.
 List<Security> getSecuritiesByClassCodeWithUnitsGreaterThanZero(List<String> classCodes)
          Gets all the Securities with the class code in the classCodes array and the units held greater than zero.
 BigDecimal getSecurityMarketValue(Security security)
          Computes the market value.
 BigDecimal getSecurityUnitValue(Security security)
          Computes the unit value based on the market value.
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
          This method sets the businessObjectService
 void setKemService(KEMService kemService)
          Sets the kemService.
 void setSecurityDao(SecurityDao securityDao)
          Sets the securityDao.
 Security updateIncomeChangeDate(Security security)
          Updates incomeChangeDate to currentDate
 Security updateInterestRate(Security security, BigDecimal interestRate)
          This method will update the interest rate or amount
 Security updateUnitValue(Security security, BigDecimal newUnitValue, Date newValueDate, String newUnitValueSource)
          This method will perform the following updates: 1) Copy current Security Unit Value to Previous Unit Value 2) Copy current Security Value Date to Previous Unit Value Date 3) Copy newUnitValue to current Security Unit Value 4) Copy newValueDate to current Security Unit Value Date 5) Copy newUnitValueSource to Unit Value Source
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityServiceImpl

public SecurityServiceImpl()
Method Detail

getByPrimaryKey

public Security getByPrimaryKey(String id)
Description copied from interface: SecurityService
Gets a Security by primary key.

Specified by:
getByPrimaryKey in interface SecurityService
Returns:
a Security
See Also:
PooledFundControlService.getByPrimaryKey(java.lang.String)

updateUnitValue

public Security updateUnitValue(Security security,
                                BigDecimal newUnitValue,
                                Date newValueDate,
                                String newUnitValueSource)
Description copied from interface: SecurityService
This method will perform the following updates: 1) Copy current Security Unit Value to Previous Unit Value 2) Copy current Security Value Date to Previous Unit Value Date 3) Copy newUnitValue to current Security Unit Value 4) Copy newValueDate to current Security Unit Value Date 5) Copy newUnitValueSource to Unit Value Source

Specified by:
updateUnitValue in interface SecurityService
Parameters:
security - the BO that needs to be updated.
newUnitValue - the new unit value for that security
newValueDate - the new value date for that security
newUnitValueSource - the new unit value source for that security
Returns:
Security the update security object
See Also:
SecurityService.updateUnitValue(org.kuali.kfs.module.endow.businessobject.Security, java.math.BigDecimal, java.sql.Date, java.lang.String)

updateInterestRate

public Security updateInterestRate(Security security,
                                   BigDecimal interestRate)
This method will update the interest rate or amount

Specified by:
updateInterestRate in interface SecurityService
Returns:
Security the update security object

computeValueBasedOnValuationMethod

public void computeValueBasedOnValuationMethod(Security security)
Description copied from interface: SecurityService
Calculates market value or unit value based on the security valuation method

Specified by:
computeValueBasedOnValuationMethod in interface SecurityService
Parameters:
security - the security for which we calculate the market value or unit value
See Also:
SecurityService.computeValueBasedOnValuationMethod(org.kuali.kfs.module.endow.businessobject.Security)

updateIncomeChangeDate

public Security updateIncomeChangeDate(Security security)
Description copied from interface: SecurityService
Updates incomeChangeDate to currentDate

Specified by:
updateIncomeChangeDate in interface SecurityService
See Also:
org.kuali.kfs.module.endow.document.service.SecurityService#updateIncomeChangeDate(java.lang.String)

getSecurityMarketValue

public BigDecimal getSecurityMarketValue(Security security)
Computes the market value.

Parameters:
security - the security for which we calculate the market value
Returns:
the computed market value

getSecurityUnitValue

public BigDecimal getSecurityUnitValue(Security security)
Computes the unit value based on the market value.

Parameters:
security - the security for which we calculate the unit value
Returns:
the computed unit value

getSecuritiesByClassCodeWithUnitsGreaterThanZero

public List<Security> getSecuritiesByClassCodeWithUnitsGreaterThanZero(List<String> classCodes)
Description copied from interface: SecurityService
Gets all the Securities with the class code in the classCodes array and the units held greater than zero.

Specified by:
getSecuritiesByClassCodeWithUnitsGreaterThanZero in interface SecurityService
Returns:
All securities that meet the criteria
See Also:
SecurityService.getSecuritiesByClassCodeWithUnitsGreaterThanZero(java.util.List)

getKemService

public KEMService getKemService()
Gets the kemService.

Returns:
kemService

setKemService

public void setKemService(KEMService kemService)
Sets the kemService.

Parameters:
kemService -

getBusinessObjectService

public org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
This method gets the businessObjectService.

Returns:
businessObjectService

setBusinessObjectService

public void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
This method sets the businessObjectService

Parameters:
businessObjectService -

setSecurityDao

public void setSecurityDao(SecurityDao securityDao)
Sets the securityDao.

Parameters:
securityDao -


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