Exemplo n.º 1
0
 /**
  *
  * <!-- 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);
   }
 }
Exemplo n.º 2
0
  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);
  }
Exemplo n.º 3
0
 /**
  *
  * <!-- 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);
   }
 }
Exemplo n.º 4
0
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  */
 public void cancel(Reservation reservation) {
   reservation.setIsCanceled(true);
   for (RoomBooking booking : reservation.getRoombooking()) {
     booking.setIsCanceled(true);
   }
 }