Esempio 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);
 }
Esempio n. 2
0
 @RequestMapping(
     value = "/getBorrowersCount",
     method = {RequestMethod.GET, RequestMethod.POST},
     produces = "application/json")
 public int getBorrowersCount() {
   return borrowerdao.getBorrowersCount();
 }
Esempio 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);
 }
Esempio 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);
 }