Examples of ConfirmedBooking


Examples of it.hotel.model.booking.ConfirmedBooking

  public void testCompletedBooking() throws Exception {
   
    Booking b = (Booking) bookingRawManager.get(bf.getId());
    assertNotNull(b);
   
     ConfirmedBooking confirmed= bookingRawManager.checkIn(b);
     assertNotNull(confirmed);
   
     bookingRawManager.checkOut(confirmed.getId());
    
     confirmed= bookingRawManager.getConfirmedBooking(confirmed.getId());
   
      CompletedBooking completed = bookingRawManager.getCompletedBooking(7);
   ;
        
    
View Full Code Here

Examples of it.hotel.model.booking.ConfirmedBooking

        (beginDate.get(Calendar.MONTH) != today.get(Calendar.MONTH))||
        (beginDate.get(Calendar.DAY_OF_MONTH) != today.get(Calendar.DAY_OF_MONTH)))  {
      return null;
    }
   
    ConfirmedBooking confirmed;
    confirmed = new ConfirmedBooking(booking);
    confirmedBookingDAO.save(confirmed);
    getDAO().remove(booking);
    Customer customer=booking.getCustomer();
    customerManager.add(customer);
View Full Code Here

Examples of it.hotel.model.booking.ConfirmedBooking

 
  //TODO make all managers only work with objects
 
  @Transactional(readOnly = false, propagation = Propagation.REQUIRED)
  public CompletedBooking checkOut(int confirmedBookingId) {
    ConfirmedBooking confirmed = (ConfirmedBooking) get(confirmedBookingId);

    updateConfirmedBookingWithTodaysDateIfNecessary(confirmed);

    CompletedBooking completed = new CompletedBooking(confirmed);
    completedBookingDAO.save(completed);
View Full Code Here

Examples of it.hotel.model.booking.ConfirmedBooking

   * @return the confirmed booking or null if not found
   */
 
  @Transactional(readOnly = true, propagation = Propagation.REQUIRED)
  public ConfirmedBooking getConfirmedBooking(int confirmedBookingId){
    ConfirmedBooking confirmedBooking = ((IBookingDAO)getDAO()).getConfirmedBooking(confirmedBookingId);
    confirmedBooking.CalculateTotal();
    return confirmedBooking;
  }
View Full Code Here

Examples of it.hotel.model.booking.ConfirmedBooking

   
   
    public void testBookingCinfirmedList(){

          List<ConfirmedBooking> expectedBookings = new ArrayList<ConfirmedBooking>();
          ConfirmedBooking booking = new ConfirmedBooking();
          booking.setId(1);
          booking.setBeginDate(CalendarUtils.GetToday());
        booking.setFinishDate(CalendarUtils.GetTomorrow());
         
          ConfirmedBooking booking2 = new ConfirmedBooking();
          booking2.setId(2);
          booking2.setBeginDate(CalendarUtils.GetToday());
        booking2.setFinishDate(CalendarUtils.GetTomorrow());
         
          ConfirmedBooking booking3 = new ConfirmedBooking();
          booking3.setId(3);
          booking3.setBeginDate(CalendarUtils.GetToday());
        booking3.setFinishDate(CalendarUtils.GetTomorrow());
         
          expectedBookings.add(booking);
          expectedBookings.add(booking2);
          expectedBookings.add(booking3);
          expect(bookingManager.getAllConfirmedBookings()).andReturn(expectedBookings);
View Full Code Here

Examples of it.hotel.model.booking.ConfirmedBooking

   * @param id
   * @return the confirmed booking with the specified id
   */
  public ConfirmedBooking getConfirmedBooking(int id){
   
    ConfirmedBooking result = null;
    result = (ConfirmedBooking) (getHibernateTemplate().get(ConfirmedBooking.class, id));
    return result;
   
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.