Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 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";
 }