Package org.sample.booking.models

Examples of org.sample.booking.models.Hotel


  }

  @View
  @Route("/hotels/{id}")
  public Response.Content show(String id) {
    Hotel hotel = Hotel.findById(id);
    return show.with().hotel(hotel).ok();
  }
View Full Code Here


  }

  @View
  @Route("/hotels/{id}/booking")
  public Response.Content book(String id, @Mapped Booking booking) {
    Hotel hotel = Hotel.findById(id);
    if (booking == null) {
      booking = new Booking();
    }
    return book.with().hotel(hotel).booking(booking).ok();
  }
View Full Code Here

  }

  @Action
  @Route("/hotels/{id}/booking")
  public Response processConfirmBooking(String confirm, String id, String revise, @Mapped @Valid Booking booking) {
    Hotel hotel = Hotel.findById(id);
    User user = User.find(login.getUserName(), null);
    booking.hotel = hotel;
    booking.user = user;

//      validation.valid(booking);
View Full Code Here

  }

  @View
  @Route("/hotels/{id}/confirm")
  public Response.Content confirmBooking(String id, @Mapped Booking booking) {
    Hotel hotel = Hotel.findById(id);
    return confirmBooking.with().total(0).hotel(hotel).booking(booking).ok();
  }
View Full Code Here

TOP

Related Classes of org.sample.booking.models.Hotel

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.