Interface DRateTypeHandler

    • Method Detail

      • applyMaturityPolicyChangesForFrom

        void applyMaturityPolicyChangesForFrom​(TransferType transferType,
                                               BigDecimal amount,
                                               RatesData originalRates,
                                               FromRatesData result)
        applies the maturity policy to the result parameter. If the policy is different from MaturityPolicy.ALWAYS, and if there is a positive dRate, then the following is done:
        • check if no units are created for the transfer because of going deeper into minus. If so an IllegalArgumentException is thrown.
        • calculate what higher D-rates will be left to the account after paying with D-rate is zero, and set that as the D-rate to the result.
        • set appropriate fields to the result param.
        Parameters:
        transferType -
        amount - the transfer amount
        originalRates - - the rates as they were before applying the transfer.
        result - - the FromRatesData object representing the results for the from account, after applying the transfer.
      • toEntity

        void toEntity​(TransferType tt,
                      DRateCreationValueForTransferTypeDTO dto)
        Sets the DRateCreationValueForTransferType from the dto to the transferType entity. method does the following:
        • checks if the rate parameters have been changed