Esempio n. 1
0
 @ResponseBody
 @ResponseStatus(HttpStatus.CREATED)
 @RequestMapping(value = "/save", method = RequestMethod.POST)
 public void save(
     @RequestBody ReservationTransaction reservationTransaction, HttpServletResponse response) {
   reservationTransactionDAO.save(reservationTransaction);
 }
Esempio n. 2
0
 @ResponseBody
 @RequestMapping(value = "/{id}", method = RequestMethod.PUT)
 public ReservationTransaction update(
     @PathVariable int id, @RequestBody ReservationTransaction reservationTransaction) {
   return reservationTransactionDAO.save(reservationTransaction);
 }
Esempio n. 3
0
 @ResponseBody
 @RequestMapping(value = "/{id}", method = RequestMethod.GET)
 public ReservationTransaction findOne(@PathVariable int id) {
   return reservationTransactionDAO.findOne(id);
 }
Esempio n. 4
0
 @ResponseBody
 @RequestMapping(value = "/findAll", method = RequestMethod.GET)
 public List<ReservationTransaction> findAll() {
   return reservationTransactionDAO.findAll();
 }