Exemplo 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);
 }
Exemplo 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);
 }
Exemplo 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);
 }
Exemplo 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";
 }