/** * * <!-- begin-user-doc --> * Checks in all rooms bookings related to a reservation * <!-- end-user-doc --> */ public void CheckInAllGuests(Reservation reservation) { for (RoomBooking roomBooking : reservation.getRoombooking()) { int roomNr = roombookings.checkIn(roomBooking); if (roomNr > 0) System.out.println( "Guest " + roomBooking.getRoomresponsible().getFirstName() + " " + roomBooking.getRoomresponsible().getLastName() + " got room number " + roomNr); } }
public Reservation make( EList<RoomBooking> selectedRooms, PaymentDetails paymentDetails, boolean payNow, String discountCode, boolean madeByCustomer) { Reservation reservation = new ReservationImpl(selectedRooms); reservation.setDiscountCode(discountCode); reservation.setPaymentdetails(paymentDetails); reservation.setPreliminaryCheckIn(selectedRooms.get(0).getCheckInDate()); reservation.setPreliminaryCheckOut(selectedRooms.get(0).getCheckOutDate()); reservation.setReservationId(nextReservationID++); return reservationsrepository.addNew(reservation); }
/** * * <!-- begin-user-doc --> * Checks in out rooms bookings related to a reservation * <!-- end-user-doc --> */ public void CheckOutAllGuests(Reservation reservation) { for (RoomBooking roomBooking : reservation.getRoombooking()) { roombookings.checkOut(roomBooking); } }
/** * * <!-- begin-user-doc --> * <!-- end-user-doc --> */ public void cancel(Reservation reservation) { reservation.setIsCanceled(true); for (RoomBooking booking : reservation.getRoombooking()) { booking.setIsCanceled(true); } }