|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kuali.kfs.module.endow.document.service.impl.CurrentTaxLotServiceImpl
@Transactional public class CurrentTaxLotServiceImpl
Implementation to provide services for CurrentTaxLotBalance business object.
Field Summary | |
---|---|
protected org.kuali.rice.kns.service.BusinessObjectService |
businessObjectService
|
protected CurrentTaxLotBalanceDao |
currentTaxLotBalanceDao
|
protected KEMService |
kEMService
|
protected SecurityService |
securityService
|
protected TransactionArchiveDao |
transactionArchiveDao
|
Constructor Summary | |
---|---|
CurrentTaxLotServiceImpl()
|
Method Summary | |
---|---|
protected Date |
calculateLastPaymentAnnuallyDate(Date currentDate,
Date fiscalYearEndDate,
String dayOfMonth,
String month)
Method to calculate the last payment date for Annually frequency code |
protected Date |
calculateLastPaymentMonthlyDate(Date currentDate,
Date fiscalYearEndDate,
String dayOfMonth)
Method to calculate the last payment date for semimonthly frequency code |
protected Date |
calculateLastPaymentQuarterlyDate(Date currentDate,
Date fiscalYearEndDate,
String dayOfMonth,
String month)
Method to calculate the last payment date for quarterly frequency code |
protected Date |
calculateLastPaymentSemiAnnuallyDate(Date currentDate,
Date fiscalYearEndDate,
String dayOfMonth,
String month)
Method to calculate the last payment date for SemiAnnually frequency code |
protected Date |
calculateLastPaymentSemiMonthlyDate(Date currentDate,
Date fiscalYearEndDate,
String dayOfSemiMonthly)
Method to calculate the last payment date for semimonthly frequency code |
protected Date |
calculateLastPaymentWeekDate(Date currentDate,
Date fiscalYearEndDate)
Method to calculate the last payment date for WEEKLY frequency code |
protected int |
checkMaximumDaysInFebruary()
This method will check and return either maximum days in the month as 28 or 29 for leap year. |
protected int |
checkMaximumDaysInMonth(int monthNumber)
This method will check and return maximum days in a month. |
void |
clearAllCurrentTaxLotRecords()
clears all the records from the CurrentTaxLotBalance table. |
CurrentTaxLotBalance |
copyHoldingTaxLotToCurrentTaxLotBalance(HoldingTaxLot holdingTaxLot)
Service Method to create a new current tax lot balance record and copy HoldingTaxLot record to it |
Collection<CurrentTaxLotBalance> |
getAllCurrentTaxLotBalance()
Retrieves all the records from END_CURR_TAX_LOT_BAL_T |
protected org.kuali.rice.kns.service.BusinessObjectService |
getBusinessObjectService()
Gets the businessObjectService. |
CurrentTaxLotBalance |
getByPrimaryKey(String kemid,
String securityId,
String registrationCode,
org.kuali.rice.kns.util.KualiInteger lotNumber,
String ipIndicator)
Gets a current tax lot based on primary keys: kemid, security id, registration code, lot number and IP indicator. |
Collection<CurrentTaxLotBalance> |
getCurrentTaxLotBalancesByIncomePrincipalIndicator(String incomePrincipalIndicator)
Gets matching records from END_CRNT_TAX_LOT_BAL_T table |
Collection<CurrentTaxLotBalance> |
getCurrentTaxLotBalancesBySecurityId(String securityId)
Gets matching records from END_CRNT_TAX_LOT_BAL_T table |
BigDecimal |
getCurrentTaxLotBalanceSecurityUnitValue(String securityId)
Method to get the security unit value for the current balance tax lot record |
Collection<CurrentTaxLotBalance> |
getCurrentTaxLotBalancesForMatchingSecurityClassCode(String securityClassCode)
Gets matching records from END_CRNT_TAX_LOT_BAL_T table |
Collection<CurrentTaxLotBalance> |
getCurrentTaxLotBalancesForMatchingSecurityClassCodeAndSecurityId(String securityClassCode,
String securityId)
Gets matching records from END_CRNT_TAX_LOT_BAL_T table |
protected Date |
getFiscalYearEndDate()
Helper method to get the system parameter FISCAL_YEAR_END_DAY_AND_MONTH and convert the value into a date value |
BigDecimal |
getHoldingMarketValue(HoldingTaxLot holdingTaxLot,
String securityId)
Gets the holding market value as follows: Class type code = B => MV = Units x Unit value / 100 Class type code = A => Market Valuation (END_SEC_T: SEC_VAL_BY_MKT) minus the total cash activity (income and principal) since the last value date (END_SEC_T: SEC_VAL_DT) Class type code = O => Units x Unit value |
BigDecimal |
getHoldingMarketValueSumForSecurity(String securityId)
Gets the Sum of the HLDG _MVAL for all records for the Security in END_CURR_TAX_LOT_BAL_T. |
protected KEMService |
getkEMService()
gets the kEMService. |
protected Date |
getLastPaymentDate(String incomePayFrequency,
Date fiscalYearEndDate)
Helper method to examine the SEC_INC_PAY_FREQ and determine the date of the last payment to be made in the fiscal year. |
BigDecimal |
getNextFiscalYearInvestmentIncome(HoldingTaxLot holdingTaxLot,
String securityId)
Method to calculate next fiscal year investment income |
BigDecimal |
getNextTwelveMonthsEstimatedValue(HoldingTaxLot holdingTaxLot,
String securityId)
Method to calculate Next Twelve Months Estimated value |
protected int |
getNumberOfMonthsRemaining(Date fiscalYearEndDate,
Date nextIncomeDueDate)
Helper method to calculate the number of months |
protected long |
getNumberOfPaymentsRemainingForAnnuallyDate(Date nextIncomeDueDate,
Date lastPaymentDate,
String dayOfMonth,
String month)
Method to calculate the last payment date for Annually frequency code |
protected long |
getNumberOfPaymentsRemainingForMonthlyFrequency(Date nextIncomeDueDate,
Date lastPaymentDate,
String dayOfMonth)
Method to calculate the last payment date for monthly frequency code |
protected long |
getNumberOfPaymentsRemainingForQuarterlyFrequency(Date nextIncomeDueDate,
Date lastPaymentDate,
String dayOfMonth,
String month)
Method to calculate the last payment date for quarterly frequency code |
protected long |
getNumberOfPaymentsRemainingForSemiAnnuallyDate(Date nextIncomeDueDate,
Date lastPaymentDate,
String dayOfMonth,
String month)
Method to calculate the last payment date for SemiAnnually frequency code |
protected int |
getQuartersLeftToFiscalYear(Date fiscalYearEndDate)
Helper method to calculate the quarter number of the fiscal year. |
BigDecimal |
getRemainderOfFiscalYearEstimatedIncome(HoldingTaxLot holdingTaxLot,
String securityId)
Method to calculate remainder of fiscal year estimated income |
protected BigDecimal |
getRemainderOfFiscalYearEstimatedIncomeForBonds(Security security,
HoldingTaxLot holdingTaxLot)
calculates the remainder of fiscal year estimated income for bonds |
protected BigDecimal |
getRemainderOfFiscalYearEstimatedIncomeForCash(Security security,
HoldingTaxLot holdingTaxLot)
calculates the remainder of fiscal year estimated income for cash |
protected BigDecimal |
getRemainderOfFiscalYearEstimatedIncomeForPooledFunds(Security security,
HoldingTaxLot holdingTaxLot)
calculates the remainder of fiscal year estimated income for pooled funds |
protected BigDecimal |
getRemainderOfFiscalYearEstimatedIncomeForStocks(Security security,
HoldingTaxLot holdingTaxLot)
calculates the remainder of fiscal year estimated income for stocks |
protected SecurityService |
getSecurityService()
Gets the securityService. |
protected long |
getTotalDaysToLastPayment(Date lastPaymentDate,
Date nextIncomeDueDate)
Helper method to calculate the number of days to the last payment |
protected long |
getTotalPaymentsRemaining(Date lastPaymentDate,
Date fiscalYearEndDate,
String incomePayFrequency,
Date nextIncomeDueDate)
Helper method to calculate the remaining payments till the last payment date for the fiscal year |
protected TransactionArchiveDao |
getTransactionArchiveDao()
Gets the transactionArchiveDao attribute. |
void |
setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
Sets the businessObjectService. |
protected Calendar |
setCaledarWithMonth(String month,
Date lastPaymentDate)
This method will check the current month and set the calendar to that month |
protected void |
setCalendarWithDays(Calendar calendar,
String dayOfMonth)
This method will check the current month and set the calendar to that month |
void |
setCurrentTaxLotBalanceDao(CurrentTaxLotBalanceDao currentTaxLotBalanceDao)
|
void |
setkEMService(KEMService kEMService)
Sets the kEMService. |
void |
setSecurityService(SecurityService securityService)
Sets the securityService. |
void |
setTransactionArchiveDao(TransactionArchiveDao transactionArchiveDao)
Sets the transactionArchiveDao attribute value. |
void |
updateCurrentTaxLotBalance(CurrentTaxLotBalance currentTaxLotBalance)
updates a current tax lot |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.kuali.rice.kns.service.BusinessObjectService businessObjectService
protected SecurityService securityService
protected KEMService kEMService
protected CurrentTaxLotBalanceDao currentTaxLotBalanceDao
protected TransactionArchiveDao transactionArchiveDao
Constructor Detail |
---|
public CurrentTaxLotServiceImpl()
Method Detail |
---|
public CurrentTaxLotBalance getByPrimaryKey(String kemid, String securityId, String registrationCode, org.kuali.rice.kns.util.KualiInteger lotNumber, String ipIndicator)
CurrentTaxLotService
getByPrimaryKey
in interface CurrentTaxLotService
org.kuali.kfs.module.endow.document.service.CurrentTaxLotService#getByPrimaryKey(java.lang.String, java.lang.String,
java.lang.String, int, java.lang.String)
public Collection<CurrentTaxLotBalance> getCurrentTaxLotBalancesForMatchingSecurityClassCode(String securityClassCode)
CurrentTaxLotService
getCurrentTaxLotBalancesForMatchingSecurityClassCode
in interface CurrentTaxLotService
public Collection<CurrentTaxLotBalance> getCurrentTaxLotBalancesForMatchingSecurityClassCodeAndSecurityId(String securityClassCode, String securityId)
CurrentTaxLotService
getCurrentTaxLotBalancesForMatchingSecurityClassCodeAndSecurityId
in interface CurrentTaxLotService
public Collection<CurrentTaxLotBalance> getCurrentTaxLotBalancesBySecurityId(String securityId)
CurrentTaxLotService
getCurrentTaxLotBalancesBySecurityId
in interface CurrentTaxLotService
public Collection<CurrentTaxLotBalance> getCurrentTaxLotBalancesByIncomePrincipalIndicator(String incomePrincipalIndicator)
CurrentTaxLotService
getCurrentTaxLotBalancesByIncomePrincipalIndicator
in interface CurrentTaxLotService
public Collection<CurrentTaxLotBalance> getAllCurrentTaxLotBalance()
CurrentTaxLotService
getAllCurrentTaxLotBalance
in interface CurrentTaxLotService
public CurrentTaxLotBalance copyHoldingTaxLotToCurrentTaxLotBalance(HoldingTaxLot holdingTaxLot)
copyHoldingTaxLotToCurrentTaxLotBalance
in interface CurrentTaxLotService
holdingTaxLot
-
public void updateCurrentTaxLotBalance(CurrentTaxLotBalance currentTaxLotBalance)
CurrentTaxLotService
updateCurrentTaxLotBalance
in interface CurrentTaxLotService
org.kuali.kfs.module.endow.document.service.CurrentTaxLotService#getByPrimaryKey(java.lang.String, java.lang.String,
java.lang.String, int, java.lang.String)
public void clearAllCurrentTaxLotRecords()
CurrentTaxLotService
clearAllCurrentTaxLotRecords
in interface CurrentTaxLotService
clears all the records
from the CurrentTaxLotBalance table.
public BigDecimal getCurrentTaxLotBalanceSecurityUnitValue(String securityId)
CurrentTaxLotService
getCurrentTaxLotBalanceSecurityUnitValue
in interface CurrentTaxLotService
securityId
-
Method
to get the security unit value for the current balance tax lot record
public BigDecimal getNextTwelveMonthsEstimatedValue(HoldingTaxLot holdingTaxLot, String securityId)
CurrentTaxLotService
getNextTwelveMonthsEstimatedValue
in interface CurrentTaxLotService
securityId
-
Method to
calculate Next Twelve Months Estimated value
public BigDecimal getRemainderOfFiscalYearEstimatedIncome(HoldingTaxLot holdingTaxLot, String securityId)
CurrentTaxLotService
getRemainderOfFiscalYearEstimatedIncome
in interface CurrentTaxLotService
securityId
-
Method to calculate remainder of fiscal year estimated income
public BigDecimal getNextFiscalYearInvestmentIncome(HoldingTaxLot holdingTaxLot, String securityId)
CurrentTaxLotService
getNextFiscalYearInvestmentIncome
in interface CurrentTaxLotService
securityId
-
Method to calculate next fiscal year investment income
protected BigDecimal getRemainderOfFiscalYearEstimatedIncomeForBonds(Security security, HoldingTaxLot holdingTaxLot)
security
- holdingTaxLot
-
protected int getNumberOfMonthsRemaining(Date fiscalYearEndDate, Date nextIncomeDueDate)
fiscalYearEndDate
- nextIncomeDueDate
-
protected Date getFiscalYearEndDate()
protected BigDecimal getRemainderOfFiscalYearEstimatedIncomeForCash(Security security, HoldingTaxLot holdingTaxLot)
security
- holdingTaxLot
-
protected long getTotalDaysToLastPayment(Date lastPaymentDate, Date nextIncomeDueDate)
protected Date getLastPaymentDate(String incomePayFrequency, Date fiscalYearEndDate)
protected Date calculateLastPaymentWeekDate(Date currentDate, Date fiscalYearEndDate)
currentDate,
- fiscalYearEndDate
protected Date calculateLastPaymentSemiMonthlyDate(Date currentDate, Date fiscalYearEndDate, String dayOfSemiMonthly)
currentDate,
- fiscalYearEndDate, dayOfSemiMonthly
protected Date calculateLastPaymentMonthlyDate(Date currentDate, Date fiscalYearEndDate, String dayOfMonth)
currentDate,
- fiscalYearEndDate, dayOfMonth
protected Date calculateLastPaymentQuarterlyDate(Date currentDate, Date fiscalYearEndDate, String dayOfMonth, String month)
currentDate,
- fiscalYearEndDate, dayOfMonth
protected Date calculateLastPaymentSemiAnnuallyDate(Date currentDate, Date fiscalYearEndDate, String dayOfMonth, String month)
currentDate,
- fiscalYearEndDate, dayOfMonth
protected Date calculateLastPaymentAnnuallyDate(Date currentDate, Date fiscalYearEndDate, String dayOfMonth, String month)
currentDate,
- fiscalYearEndDate, dayOfMonth
protected Calendar setCaledarWithMonth(String month, Date lastPaymentDate)
month
- month to set the calendar, currentDate currentDate
protected void setCalendarWithDays(Calendar calendar, String dayOfMonth)
month,
- dayOfMonth month to set the calendar, dayOfMonth day of the month to set toprotected int checkMaximumDaysInFebruary()
protected int checkMaximumDaysInMonth(int monthNumber)
monthNumber
- The number of the month to test for maximum days..
protected BigDecimal getRemainderOfFiscalYearEstimatedIncomeForPooledFunds(Security security, HoldingTaxLot holdingTaxLot)
security
- holdingTaxLot
-
protected long getTotalPaymentsRemaining(Date lastPaymentDate, Date fiscalYearEndDate, String incomePayFrequency, Date nextIncomeDueDate)
lastPaymentDate,
- fiscalYearEndDate, incomePayFrequency
protected long getNumberOfPaymentsRemainingForMonthlyFrequency(Date nextIncomeDueDate, Date lastPaymentDate, String dayOfMonth)
currentDate,
- fiscalYearEndDate, dayOfMonth
protected long getNumberOfPaymentsRemainingForQuarterlyFrequency(Date nextIncomeDueDate, Date lastPaymentDate, String dayOfMonth, String month)
currentDate,
- fiscalYearEndDate, dayOfMonth
protected long getNumberOfPaymentsRemainingForSemiAnnuallyDate(Date nextIncomeDueDate, Date lastPaymentDate, String dayOfMonth, String month)
currentDate,
- fiscalYearEndDate, dayOfMonth
protected long getNumberOfPaymentsRemainingForAnnuallyDate(Date nextIncomeDueDate, Date lastPaymentDate, String dayOfMonth, String month)
currentDate,
- fiscalYearEndDate, dayOfMonth
protected BigDecimal getRemainderOfFiscalYearEstimatedIncomeForStocks(Security security, HoldingTaxLot holdingTaxLot)
security
- holdingTaxLot
-
protected int getQuartersLeftToFiscalYear(Date fiscalYearEndDate)
nextIncomeDueDate
-
public BigDecimal getHoldingMarketValueSumForSecurity(String securityId)
CurrentTaxLotService
getHoldingMarketValueSumForSecurity
in interface CurrentTaxLotService
securityId
- the security for which we return the sum
CurrentTaxLotService.getHoldingMarketValueSumForSecurity(java.lang.String)
public BigDecimal getHoldingMarketValue(HoldingTaxLot holdingTaxLot, String securityId)
CurrentTaxLotService
getHoldingMarketValue
in interface CurrentTaxLotService
CurrentTaxLotService.getHoldingMarketValue(HoldingTaxLot, String)
protected org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
public void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
businessObjectService
- protected SecurityService getSecurityService()
public void setSecurityService(SecurityService securityService)
securityService
- protected KEMService getkEMService()
kEMService
- public void setkEMService(KEMService kEMService)
kEMService
- public void setCurrentTaxLotBalanceDao(CurrentTaxLotBalanceDao currentTaxLotBalanceDao)
protected TransactionArchiveDao getTransactionArchiveDao()
public void setTransactionArchiveDao(TransactionArchiveDao transactionArchiveDao)
transactionArchiveDao
- The transactionArchiveDao to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |