SHARE
TWEET

Untitled

a guest Jun 26th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @RequestMapping("/reservations")
  2.     public Reservation updateReservation1(ReservationUpdateRequest request) {
  3.         Reservation reservation = reservationRepo.findOne(request.getId());
  4.         reservation.setNumberOfBags((request.getNumOfBags());
  5.         reservation.setCheckedIn(request.getCheckedIn());
  6.         return reservationRepo.save(reservation);
  7.     }
  8.      
  9. @RequestMapping("/reservations")
  10.     public Optional<Reservation> updateReservation(ReservationUpdateRequest request) {
  11.         Optional<Reservation> reservation = reservationRepo.findById(request.getId());
  12.         reservation.setNumberOfBags((request.getNumOfBags());
  13.         reservation.setCheckedIn(request.getCheckedIn());
  14.         return reservationRepo.save(reservation);
  15.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top