Package org.sis.ancmessaging.json

Examples of org.sis.ancmessaging.json.CustomGottResponse


  }
 
  @RequestMapping(value = "getgotts", method = RequestMethod.GET)
  public @ResponseBody CustomGottResponse fetchGotts(@RequestParam("postId") int postId,
      @RequestParam("rows") int rows, @RequestParam("page") int page) {
    CustomGottResponse response = new CustomGottResponse();
    StringBuilder sb = new StringBuilder();
    //HealthPost healthPost = healthPostService.findById(postId);
    List<Gott> gotts = healthPostService.getGottsForHealthPost(postId, rows, page, sb);
   
    List<GottDTO> gottDTOs = new ArrayList<GottDTO>();
    for (Gott gott : gotts) {
      GottDTO gDTO = new GottDTO();
      gDTO.setGottId(gott.getGottId());
      gDTO.setGottName(gott.getGottName());
      gDTO.setPostId(postId);
      gottDTOs.add(gDTO);
    }
    response.setPage(String.valueOf(page));
    response.setRows(gottDTOs);
    response.setTotal(sb.toString());
    response.setRecords(String.valueOf(gottDTOs.size()));
    return response;
  }
View Full Code Here

TOP

Related Classes of org.sis.ancmessaging.json.CustomGottResponse

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.