コード例 #1
0
 @RequestMapping(
     value = "/editCopies",
     method = {RequestMethod.GET, RequestMethod.POST},
     consumes = "application/json")
 public void editCopies(@RequestBody List<Copies> copies) {
   for (Copies c : copies) cdao.updateCopies(c);
 }
コード例 #2
0
 @RequestMapping(
     value = "/getCopiesByIds/{branchId}/{bookId}",
     method = {RequestMethod.GET, RequestMethod.POST},
     produces = "application/json")
 public Copies getCopiesByIds(@PathVariable int branchId, @PathVariable int bookId) {
   return cdao.getCopiesByIds(bookId, branchId);
 }
コード例 #3
0
 @RequestMapping(
     value = "/getCopies/{pageNo}/{pageSize}",
     method = {RequestMethod.GET, RequestMethod.POST},
     produces = "application/json")
 public List<Copies> getCopies(@PathVariable int pageNo, @PathVariable int pageSize) {
   return cdao.getAllCopies(pageNo, pageSize);
 }
コード例 #4
0
 @RequestMapping(
     value = "/deleteCopies",
     method = {RequestMethod.GET, RequestMethod.POST},
     consumes = "application/json")
 public String deleteCopies(@RequestBody Copies copies) {
   cdao.deleteCopies(copies);
   return "Copies deleted sucessfully";
 }