@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); }
@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); }
@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); }
@RequestMapping( value = "/deleteCopies", method = {RequestMethod.GET, RequestMethod.POST}, consumes = "application/json") public String deleteCopies(@RequestBody Copies copies) { cdao.deleteCopies(copies); return "Copies deleted sucessfully"; }