Search in sources :

Example 1 with ProductDisplayDto

use of org.mifos.dto.screen.ProductDisplayDto in project head by mifos.

the class SavingsProductController method showAllSavingsProducts.

@RequestMapping(method = RequestMethod.GET)
public ModelAndView showAllSavingsProducts() {
    ModelAndView modelAndView = new ModelAndView("viewSavingsProducts");
    List<ProductDisplayDto> productDto = adminServiceFacade.retrieveSavingsProducts();
    modelAndView.addObject("products", productDto);
    return modelAndView;
}
Also used : ModelAndView(org.springframework.web.servlet.ModelAndView) ProductDisplayDto(org.mifos.dto.screen.ProductDisplayDto) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 2 with ProductDisplayDto

use of org.mifos.dto.screen.ProductDisplayDto in project head by mifos.

the class AdminServiceFacadeWebTier method productsToDto.

private List<ProductDisplayDto> productsToDto(final List<Object[]> queryResult) {
    List<ProductDisplayDto> products = new ArrayList<ProductDisplayDto>();
    Short prdOfferingId;
    String prdOfferingName;
    Short prdOfferingStatusId;
    String prdOfferingStatusName;
    for (Object[] row : queryResult) {
        prdOfferingId = (Short) row[0];
        prdOfferingName = (String) row[1];
        prdOfferingStatusId = (Short) row[2];
        prdOfferingStatusName = (String) row[3];
        ProductDisplayDto product = new ProductDisplayDto(prdOfferingId, prdOfferingName, prdOfferingStatusId, prdOfferingStatusName);
        products.add(product);
    }
    return products;
}
Also used : ArrayList(java.util.ArrayList) ProductDisplayDto(org.mifos.dto.screen.ProductDisplayDto)

Aggregations

ProductDisplayDto (org.mifos.dto.screen.ProductDisplayDto)2 ArrayList (java.util.ArrayList)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ModelAndView (org.springframework.web.servlet.ModelAndView)1