@Override
  public DepositProductData retrieveOneWithChartSlabs(
      final DepositAccountType depositAccountType, Long depositProductId) {
    DepositProductData depositProduct = this.retrieveOne(depositAccountType, depositProductId);
    Collection<InterestRateChartData> charts =
        this.chartReadPlatformService.retrieveAllWithSlabsWithTemplate(depositProductId);

    if (depositAccountType.isFixedDeposit()) {
      depositProduct = FixedDepositProductData.withInterestChart(depositProduct, charts);
    } else if (depositAccountType.isRecurringDeposit()) {
      depositProduct = RecurringDepositProductData.withInterestChart(depositProduct, charts);
    }

    return depositProduct;
  }
    @Override
    public FixedDepositProductData mapRow(
        final ResultSet rs, @SuppressWarnings("unused") final int rowNum) throws SQLException {

      final DepositProductData depositProductData = super.mapRow(rs);

      final boolean interestFreePeriodApplicable = rs.getBoolean("interestFreePeriodApplicable");
      final Integer interestFreeFromPeriod = JdbcSupport.getInteger(rs, "interestFreeFromPeriod");
      final Integer interestFreeToPeriod = JdbcSupport.getInteger(rs, "interestFreeToPeriod");
      final Integer periodFrequencyTypeId =
          JdbcSupport.getInteger(rs, "interestFreePeriodFrequencyId");
      final EnumOptionData interestFreePeriodFrequencyType =
          (periodFrequencyTypeId == null)
              ? null
              : InterestRateChartEnumerations.periodType(periodFrequencyTypeId);
      final boolean preClosurePenalApplicable = rs.getBoolean("preClosurePenalApplicable");
      final BigDecimal preClosurePenalInterest =
          JdbcSupport.getBigDecimalDefaultToNullIfZero(rs, "preClosurePenalInterest");
      final Integer preClosurePenalInterestOnTypeId =
          JdbcSupport.getInteger(rs, "preClosurePenalInterestOnId");
      final EnumOptionData preClosurePenalInterestOnType =
          (preClosurePenalInterestOnTypeId == null)
              ? null
              : SavingsEnumerations.preClosurePenaltyInterestOnType(
                  preClosurePenalInterestOnTypeId);

      final Integer minDepositTerm = JdbcSupport.getInteger(rs, "minDepositTerm");
      final Integer maxDepositTerm = JdbcSupport.getInteger(rs, "maxDepositTerm");
      final Integer minDepositTermTypeId = JdbcSupport.getInteger(rs, "minDepositTermTypeId");
      final EnumOptionData minDepositTermType =
          (minDepositTermTypeId == null)
              ? null
              : SavingsEnumerations.depositTermFrequencyType(minDepositTermTypeId);
      final Integer maxDepositTermTypeId = JdbcSupport.getInteger(rs, "maxDepositTermTypeId");
      final EnumOptionData maxDepositTermType =
          (maxDepositTermTypeId == null)
              ? null
              : SavingsEnumerations.depositTermFrequencyType(maxDepositTermTypeId);
      final Integer inMultiplesOfDepositTerm =
          JdbcSupport.getInteger(rs, "inMultiplesOfDepositTerm");
      final Integer inMultiplesOfDepositTermTypeId =
          JdbcSupport.getInteger(rs, "inMultiplesOfDepositTermTypeId");
      final EnumOptionData inMultiplesOfDepositTermType =
          (inMultiplesOfDepositTermTypeId == null)
              ? null
              : SavingsEnumerations.depositTermFrequencyType(inMultiplesOfDepositTermTypeId);
      final BigDecimal minDepositAmount =
          JdbcSupport.getBigDecimalDefaultToNullIfZero(rs, "minDepositAmount");
      final BigDecimal depositAmount =
          JdbcSupport.getBigDecimalDefaultToNullIfZero(rs, "depositAmount");
      final BigDecimal maxDepositAmount =
          JdbcSupport.getBigDecimalDefaultToNullIfZero(rs, "maxDepositAmount");

      return FixedDepositProductData.instance(
          depositProductData,
          interestFreePeriodApplicable,
          interestFreeFromPeriod,
          interestFreeToPeriod,
          interestFreePeriodFrequencyType,
          preClosurePenalApplicable,
          preClosurePenalInterest,
          preClosurePenalInterestOnType,
          minDepositTerm,
          maxDepositTerm,
          minDepositTermType,
          maxDepositTermType,
          inMultiplesOfDepositTerm,
          inMultiplesOfDepositTermType,
          minDepositAmount,
          depositAmount,
          maxDepositAmount);
    }