Package it.hotel.controller.booking.DTO

Examples of it.hotel.controller.booking.DTO.BookingDTO


     
      ArrayList<Booking> bookings =(ArrayList<Booking>) bookingManager.getAllBookingAndConfirmedBookings();
        ArrayList<BookingDTO> bookingsDTO = new ArrayList<BookingDTO>();
        for (Booking booking : bookings) {
       
          BookingDTO bookingDTO = new BookingDTO(booking);
         
          bookingsDTO.add(bookingDTO);
        }        
     
     
View Full Code Here


   
  }
 
  private void createBookingDTO() {
   
    bookingDTO = new BookingDTO(booking1);
     
  }
View Full Code Here

   
    ArrayList<BookingDTO> foundDTO = new ArrayList<BookingDTO>();
   
    for (Object booking : found) {
   
      BookingDTO bookingDTO = new BookingDTO((Booking) booking);
      foundDTO.add(bookingDTO);
 
    }
   
    request.setAttribute("bookings", foundDTO);
View Full Code Here

    ArrayList<Booking> bookings =(ArrayList<Booking>) bookingManager.getAllBookingAndConfirmedBookings();
    bookingManager.IdentifyCheckinableBookings(bookings);
      ArrayList<BookingDTO> bookingsDTO = new ArrayList<BookingDTO>();
      for (Booking booking : bookings) {
     
        BookingDTO bookingDTO = new BookingDTO(booking);
       
        bookingsDTO.add(bookingDTO);
       
    }
   
View Full Code Here

   
    ArrayList<Booking> bookings =(ArrayList<Booking>) bookingManager.getAllCompletedBookings();
      ArrayList<BookingDTO> bookingsDTO = new ArrayList<BookingDTO>();
      for (Booking booking : bookings) {
     
        BookingDTO bookingDTO = new BookingDTO(booking);
       
        bookingsDTO.add(bookingDTO);
      }        
   
    return new ModelAndView("hotel.booking.listCompleted", "bookings", bookingsDTO);
View Full Code Here

   
    ArrayList<Booking> bookings =(ArrayList<Booking>) bookingManager.getAllConfirmedBookings();
      ArrayList<BookingDTO> bookingsDTO = new ArrayList<BookingDTO>();
      for (Booking booking : bookings) {
     
        BookingDTO bookingDTO = new BookingDTO(booking);
       
        bookingsDTO.add(bookingDTO);
      }        
 
   
View Full Code Here

   
    ArrayList<Booking> bookings =(ArrayList<Booking>) bookingManager.getAllUnconfirmedBookings();
      ArrayList<BookingDTO> bookingsDTO = new ArrayList<BookingDTO>();
      for (Booking booking : bookings) {
     
        BookingDTO bookingDTO = new BookingDTO(booking);
       
        bookingsDTO.add(bookingDTO);
      }      
       
    return new ModelAndView("hotel.booking.listUnConfirmed", "bookings", bookingsDTO);
View Full Code Here

  public ModelAndView editCheckin(HttpServletRequest req, HttpServletResponse resp) {
    String id= req.getParameter("id");
    if(id != null){
      Booking booking = (Booking)bookingManager.get(Integer.parseInt(id));
      Customer customer = booking.getCustomer();
      BookingDTO bookingDTO = new BookingDTO(booking);
     
      req.setAttribute("booking", bookingDTO);
      ArrayList<Structure>  hotels = new  ArrayList<Structure>();
      hotels.add(booking.getStructure());
      req.setAttribute("hotels", hotels);
View Full Code Here

      map.put("hotels", hotels);
    }

    if(id != null && !"0".equals(id)){
     
      BookingDTO bookingDTO = new BookingDTO(booking);
      map.put("booking", bookingDTO);
      Collection vacantRooms = bookingManager.getVacantRoomsForStructure(bookingDTO.getStructure(), bookingDTO.getBeginDate(), bookingDTO.getFinishDate());
      vacantRooms.add(roomTemp);
      map.put("vacantRooms", vacantRooms );
    }
    this.setProperties(command);
    map.put("errors", errors.getAllErrors());
View Full Code Here

    /**
     *
     * @param command
     */
  private void setProperties(Object command){
    BookingDTO booking = (BookingDTO) command;
    if(booking.getRoomId() != 0){
      Room room = (Room)roomManager.get(booking.getRoomId());
      booking.setRoom(room);
    }
    if(booking.getCustomerId() != 0){
      booking.setCustomer((Customer) customerManager.get(booking.getCustomerId()));
    }
    if(booking.getStructure().getId() != 0){
      booking.setStructure((Structure) structureManager.get(booking.getStructure().getId()));
    }
  }
View Full Code Here

TOP

Related Classes of it.hotel.controller.booking.DTO.BookingDTO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.