@Override
  public Collection<EnumOptionData> retrieveInterestPostingPeriodTypeOptions() {
    List<EnumOptionData> allowedOptions =
        Arrays.asList( //
            SavingsEnumerations.interestPostingPeriodType(
                SavingsPostingInterestPeriodType.MONTHLY), //
            SavingsEnumerations.interestPostingPeriodType(
                SavingsPostingInterestPeriodType.QUATERLY), //
            SavingsEnumerations.interestPostingPeriodType(
                SavingsPostingInterestPeriodType.ANNUAL) //
            );

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

      final Long id = rs.getLong("id");
      final String name = rs.getString("name");
      final String shortName = rs.getString("shortName");
      final String description = rs.getString("description");

      final String currencyCode = rs.getString("currencyCode");
      final String currencyName = rs.getString("currencyName");
      final String currencyNameCode = rs.getString("currencyNameCode");
      final String currencyDisplaySymbol = rs.getString("currencyDisplaySymbol");
      final Integer currencyDigits = JdbcSupport.getInteger(rs, "currencyDigits");
      final Integer inMultiplesOf = JdbcSupport.getInteger(rs, "inMultiplesOf");
      final CurrencyData currency =
          new CurrencyData(
              currencyCode,
              currencyName,
              currencyDigits,
              inMultiplesOf,
              currencyDisplaySymbol,
              currencyNameCode);
      final BigDecimal nominalAnnualInterestRate = rs.getBigDecimal("nominalAnnualInterestRate");

      final Integer compoundingInterestPeriodTypeValue =
          JdbcSupport.getInteger(rs, "compoundingInterestPeriodType");
      final EnumOptionData compoundingInterestPeriodType =
          SavingsEnumerations.compoundingInterestPeriodType(compoundingInterestPeriodTypeValue);

      final Integer interestPostingPeriodTypeValue =
          JdbcSupport.getInteger(rs, "interestPostingPeriodType");
      final EnumOptionData interestPostingPeriodType =
          SavingsEnumerations.interestPostingPeriodType(interestPostingPeriodTypeValue);

      final Integer interestCalculationTypeValue =
          JdbcSupport.getInteger(rs, "interestCalculationType");
      final EnumOptionData interestCalculationType =
          SavingsEnumerations.interestCalculationType(interestCalculationTypeValue);

      EnumOptionData interestCalculationDaysInYearType = null;
      final Integer interestCalculationDaysInYearTypeValue =
          JdbcSupport.getInteger(rs, "interestCalculationDaysInYearType");
      if (interestCalculationDaysInYearTypeValue != null) {
        interestCalculationDaysInYearType =
            SavingsEnumerations.interestCalculationDaysInYearType(
                interestCalculationDaysInYearTypeValue);
      }

      final Integer accountingRuleId = JdbcSupport.getInteger(rs, "accountingType");
      final EnumOptionData accountingRuleType =
          AccountingEnumerations.accountingRuleType(accountingRuleId);

      final BigDecimal minRequiredOpeningBalance = rs.getBigDecimal("minRequiredOpeningBalance");

      final Integer lockinPeriodFrequency = JdbcSupport.getInteger(rs, "lockinPeriodFrequency");
      EnumOptionData lockinPeriodFrequencyType = null;
      final Integer lockinPeriodFrequencyTypeValue =
          JdbcSupport.getInteger(rs, "lockinPeriodFrequencyType");
      if (lockinPeriodFrequencyTypeValue != null) {
        lockinPeriodFrequencyType =
            SavingsEnumerations.lockinPeriodFrequencyType(lockinPeriodFrequencyTypeValue);
      }

      final boolean withdrawalFeeForTransfers = rs.getBoolean("withdrawalFeeForTransfers");
      final boolean allowOverdraft = rs.getBoolean("allowOverdraft");
      final BigDecimal overdraftLimit = rs.getBigDecimal("overdraftLimit");
      return SavingsProductData.instance(
          id,
          name,
          shortName,
          description,
          currency,
          nominalAnnualInterestRate,
          compoundingInterestPeriodType,
          interestPostingPeriodType,
          interestCalculationType,
          interestCalculationDaysInYearType,
          minRequiredOpeningBalance,
          lockinPeriodFrequency,
          lockinPeriodFrequencyType,
          withdrawalFeeForTransfers,
          accountingRuleType,
          allowOverdraft,
          overdraftLimit);
    }
    public DepositProductData mapRow(final ResultSet rs) throws SQLException {

      final Long id = rs.getLong("id");
      final String name = rs.getString("name");
      final String shortName = rs.getString("shortName");
      final String description = rs.getString("description");

      final String currencyCode = rs.getString("currencyCode");
      final String currencyName = rs.getString("currencyName");
      final String currencyNameCode = rs.getString("currencyNameCode");
      final String currencyDisplaySymbol = rs.getString("currencyDisplaySymbol");
      final Integer currencyDigits = JdbcSupport.getInteger(rs, "currencyDigits");
      final Integer inMultiplesOf = JdbcSupport.getInteger(rs, "inMultiplesOf");
      final CurrencyData currency =
          new CurrencyData(
              currencyCode,
              currencyName,
              currencyDigits,
              inMultiplesOf,
              currencyDisplaySymbol,
              currencyNameCode);
      final BigDecimal nominalAnnualInterestRate = rs.getBigDecimal("nominalAnnualInterestRate");

      final Integer compoundingInterestPeriodTypeValue =
          JdbcSupport.getInteger(rs, "compoundingInterestPeriodType");
      final EnumOptionData compoundingInterestPeriodType =
          SavingsEnumerations.compoundingInterestPeriodType(compoundingInterestPeriodTypeValue);

      final Integer interestPostingPeriodTypeValue =
          JdbcSupport.getInteger(rs, "interestPostingPeriodType");
      final EnumOptionData interestPostingPeriodType =
          SavingsEnumerations.interestPostingPeriodType(interestPostingPeriodTypeValue);

      final Integer interestCalculationTypeValue =
          JdbcSupport.getInteger(rs, "interestCalculationType");
      final EnumOptionData interestCalculationType =
          SavingsEnumerations.interestCalculationType(interestCalculationTypeValue);

      EnumOptionData interestCalculationDaysInYearType = null;
      final Integer interestCalculationDaysInYearTypeValue =
          JdbcSupport.getInteger(rs, "interestCalculationDaysInYearType");
      if (interestCalculationDaysInYearTypeValue != null) {
        interestCalculationDaysInYearType =
            SavingsEnumerations.interestCalculationDaysInYearType(
                interestCalculationDaysInYearTypeValue);
      }

      final Integer accountingRuleId = JdbcSupport.getInteger(rs, "accountingType");
      final EnumOptionData accountingRuleType =
          AccountingEnumerations.accountingRuleType(accountingRuleId);

      final Integer lockinPeriodFrequency = JdbcSupport.getInteger(rs, "lockinPeriodFrequency");
      EnumOptionData lockinPeriodFrequencyType = null;
      final Integer lockinPeriodFrequencyTypeValue =
          JdbcSupport.getInteger(rs, "lockinPeriodFrequencyType");
      if (lockinPeriodFrequencyTypeValue != null) {
        lockinPeriodFrequencyType =
            SavingsEnumerations.lockinPeriodFrequencyType(lockinPeriodFrequencyTypeValue);
      }

      return DepositProductData.instance(
          id,
          name,
          shortName,
          description,
          currency,
          nominalAnnualInterestRate,
          compoundingInterestPeriodType,
          interestPostingPeriodType,
          interestCalculationType,
          interestCalculationDaysInYearType,
          lockinPeriodFrequency,
          lockinPeriodFrequencyType,
          accountingRuleType);
    }