Package org.mifosplatform.portfolio.interestratechart.data

Examples of org.mifosplatform.portfolio.interestratechart.data.InterestRateChartSlabData


                    interestRateChartId = tempIrcId;
                    chartData = chartMapper.mapRow(rs, ircIndex++);
                    chartDataList.add(chartData);

                }
                final InterestRateChartSlabData chartSlabsData = chartSlabsMapper.extractData(rs);
                if (chartSlabsData != null) {
                    chartData.addChartSlab(chartSlabsData);
                }
            }
            return chartDataList;
View Full Code Here


        }

        @Override
        public InterestRateChartSlabData extractData(ResultSet rs) throws SQLException, DataAccessException {

            InterestRateChartSlabData chartSlabData = null;
            Long interestRateChartSlabId = null;
            int ircIndex = 0;// Interest rate chart index
            int ircdIndex = 0;// Interest rate chart Slabs index
            rs.previous();
            while (rs.next()) {
                Long tempIrcdId = rs.getLong("ircdId");
                if (interestRateChartSlabId == null || interestRateChartSlabId.equals(tempIrcdId)) {
                    if (chartSlabData == null) {
                        interestRateChartSlabId = tempIrcdId;
                        chartSlabData = chartSlabsMapper.mapRow(rs, ircIndex++);
                    }
                    final InterestIncentiveData incentiveData = incentiveMapper.mapRow(rs, ircdIndex++);
                    if (incentiveData != null) {
                        chartSlabData.addIncentives(incentiveData);
                    }
                } else {
                    rs.previous();
                    break;
                }
View Full Code Here

        @Override
        public Collection<InterestRateChartSlabData> extractData(ResultSet rs) throws SQLException, DataAccessException {

            List<InterestRateChartSlabData> chartDataList = new ArrayList<>();

            InterestRateChartSlabData chartSlabData = null;
            Long interestRateChartSlabId = null;
            int ircIndex = 0;// Interest rate chart index
            int ircdIndex = 0;// Interest rate chart Slabs index

            while (rs.next()) {
                Long tempIrcdId = rs.getLong("ircdId");
                if (chartSlabData == null || (interestRateChartSlabId != null && !interestRateChartSlabId.equals(tempIrcdId))) {
                    interestRateChartSlabId = tempIrcdId;
                    chartSlabData = chartSlabsMapper.mapRow(rs, ircIndex++);
                    chartDataList.add(chartSlabData);
                }
                final InterestIncentiveData incentiveData = incentiveMapper.mapRow(rs, ircdIndex++);
                if (incentiveData != null) {
                    chartSlabData.addIncentives(incentiveData);
                }
            }
            return chartDataList;
        }
View Full Code Here

    @GET
    @Path("template")
    @Consumes({ MediaType.APPLICATION_JSON })
    @Produces({ MediaType.APPLICATION_JSON })
    public String template(@Context final UriInfo uriInfo) {
        InterestRateChartSlabData chartSlab = this.interestRateChartSlabReadPlatformService.retrieveTemplate();
        final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
        return this.toApiJsonSerializer.serialize(settings, chartSlab, INTERESTRATE_CHART_SLAB_RESPONSE_DATA_PARAMETERS);
    }
View Full Code Here

    public String retrieveOne(@PathParam("chartId") final Long chartId, @PathParam("chartSlabId") final Long chartSlabId,
            @Context final UriInfo uriInfo) {

        this.context.authenticatedUser().validateHasReadPermission(INTERESTRATE_CHART_SLAB_RESOURCE_NAME);

        InterestRateChartSlabData chartSlab = this.interestRateChartSlabReadPlatformService.retrieveOne(chartId, chartSlabId);
        final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
        if (settings.isTemplate()) {
            chartSlab = this.interestRateChartSlabReadPlatformService.retrieveWithTemplate(chartSlab);
        }
View Full Code Here

TOP

Related Classes of org.mifosplatform.portfolio.interestratechart.data.InterestRateChartSlabData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.