Package com.alexnevsky.hotel.model

Examples of com.alexnevsky.hotel.model.Room


      order = orderDAO.find(orderId);

      Form form = null;
      form = formDAO.find(formId);

      Room room = null;
      room = roomDAO.find(roomId);

      Double amount = null;
      if (form != null && room != null) {
        amount = room.getNightPrice() * form.getNights();
        orderDAO.update(roomId, amount, order.getId());
        orderDAO.update(OrderStatusEnum.CHECKED, order.getId());
      }

      request.setAttribute(AttributesManager.ATTRIBUTE_RESULT, MessageManager.RESULT_SELECT_ROOM_MESSAGE);
View Full Code Here


    Customer customer = null;
    CreditCard creditCard = null;
    Order order = null;
    Form form = null;
    Room orderRoom = null;
    List<Room> freeRoomList = null;

    try {
      AbstractDAOFactory daoFactory = Controller.getDAOFactory();
View Full Code Here

      FormDAO formDAO = daoFactory.getFormDAO();
      Form form = null;

      RoomDAO roomDAO = daoFactory.getRoomDAO();
      Room room = null;

      for (Order order : orderList) {
        Long orderRoomId = order.getRoomId();

        room = roomDAO.find(orderRoomId);
View Full Code Here

   */
  private Room find(String sql, Object... values) throws DAOException {
    Connection connection = null;
    PreparedStatement preparedStatement = null;
    ResultSet resultSet = null;
    Room room = null;

    try {
      connection = this.daoFactory.getConnection();
      preparedStatement = prepareStatement(connection, sql, false, values);
      resultSet = preparedStatement.executeQuery();
View Full Code Here

   * @return The mapped Room from the current row of the given ResultSet.
   * @throws SQLException
   *             If something fails at database level.
   */
  private static Room mapRoom(ResultSet resultSet) throws SQLException {
    return new Room(resultSet.getLong("id"), resultSet.getInt("adultMax"), resultSet.getInt("childMax"),
        RoomClassEnum.valueOf(resultSet.getString("class").toUpperCase()), resultSet.getDouble("nightPrice"));
  }
View Full Code Here

      orderList = orderDAO.list();

      Customer customer = null;
      CreditCard creditCard = null;
      Form form = null;
      Room room = null;

      for (Order order : orderList) {
        customer = customerDAO.find(order.getCustomerId());
        creditCard = creditCardDAO.find(customer.getCreditCardNumber());
View Full Code Here

TOP

Related Classes of com.alexnevsky.hotel.model.Room

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.