Examples of CustomHealthCenterResponse


Examples of org.sis.ancmessaging.json.CustomHealthCenterResponse

  }
 
 
  @RequestMapping(value = "gethealthcenters", method = RequestMethod.GET)
  public @ResponseBody CustomHealthCenterResponse fetchHealthCenters() {
    CustomHealthCenterResponse response = new CustomHealthCenterResponse();
    List<HealthCenter> healthCenters = healthCenterService.getAllHealthCenters();
    List<HealthCenterDTO> hcs = new ArrayList<HealthCenterDTO>();
    for (HealthCenter hc : healthCenters) {
      HealthCenterDTO dto = new HealthCenterDTO();
      dto.setCenterId(hc.getCenterId());
      dto.setCenterName(hc.getCenterName());
      dto.setCenterPhone(hc.getCenterPhone());
      hcs.add(dto);
    }
    response.setPage("1");
    response.setRows(hcs);
    response.setTotal("10");
    response.setRecords(String.valueOf(healthCenters.size()));
    return response;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.