@RequestMapping("savecollection")
  public String saveCollection(Collection collection, HttpServletRequest request) {

    collectionService.save(collection);

    return "redirect:collection.html";
  }
 @ResponseBody
 @RequestMapping("getcollectionById")
 public String getCollectionById(int id) {
   Collection collection = (Collection) collectionService.getById("Collection", id);
   JSONObject json = JSONObject.fromObject(collection);
   return JsonUtil.getJson(json);
 }
  @ResponseBody
  @RequestMapping("getcollectionList")
  public String getCollectionList(int page, int rows) {
    HashMap hm = collectionService.getPageList(page, rows);

    return JsonUtil.getJson(hm);
  }
  @ResponseBody
  @RequestMapping("delcollectionById")
  public int delCollectionById(int id) {

    return collectionService.delete("Collection", id);
  }