Example #1
0
  /** Edit an existing Reservation entity */
  @RequestMapping("/editRoomReservations")
  public ModelAndView editRoomReservations(
      @RequestParam Integer room_roomId, @RequestParam Integer reservations_reservationId) {
    Reservation reservation =
        reservationDAO.findReservationByPrimaryKey(reservations_reservationId, -1, -1);

    ModelAndView mav = new ModelAndView();
    mav.addObject("room_roomId", room_roomId);
    mav.addObject("reservation", reservation);
    mav.setViewName("room/reservations/editReservations.jsp");

    return mav;
  }
Example #2
0
  /**
   * Select the child Reservation entity for display allowing the user to confirm that they would
   * like to delete the entity
   */
  @RequestMapping("/confirmDeleteRoomReservations")
  public ModelAndView confirmDeleteRoomReservations(
      @RequestParam Integer room_roomId, @RequestParam Integer related_reservations_reservationId) {
    ModelAndView mav = new ModelAndView();

    mav.addObject(
        "reservation",
        reservationDAO.findReservationByPrimaryKey(related_reservations_reservationId));
    mav.addObject("room_roomId", room_roomId);
    mav.setViewName("room/reservations/deleteReservations.jsp");

    return mav;
  }