Ejemplo n.º 1
0
 @RequestMapping(
     value = "/deleteBorrower",
     method = {RequestMethod.GET, RequestMethod.POST},
     consumes = "application/json")
 public List<Borrower> deleteBorrower(@RequestBody Borrower borrower) {
   borrowerdao.deleteBorrower(borrower);
   return borrowerdao.getAllBorrowers(1, 5);
 }
Ejemplo n.º 2
0
 @RequestMapping(
     value = "/getBorrowersCount",
     method = {RequestMethod.GET, RequestMethod.POST},
     produces = "application/json")
 public int getBorrowersCount() {
   return borrowerdao.getBorrowersCount();
 }
Ejemplo n.º 3
0
 @RequestMapping(
     value = "/editBorrower",
     method = {RequestMethod.GET, RequestMethod.POST},
     consumes = "application/json")
 public void editBorrower(@RequestBody List<Borrower> borrowers) {
   for (Borrower borrower : borrowers) borrowerdao.updateBorrower(borrower);
 }
Ejemplo n.º 4
0
 /*Admin Borrower*/
 @RequestMapping(
     value = "/getBorrowers/{pageNo}/{pageSize}",
     method = {RequestMethod.GET, RequestMethod.POST},
     produces = "application/json")
 public List<Borrower> getBorrowers(@PathVariable int pageNo, @PathVariable int pageSize) {
   return borrowerdao.getAllBorrowers(pageNo, pageSize);
 }