Package com.alexnevsky.hotel.model

Examples of com.alexnevsky.hotel.model.Form


      List<Order> orderList = null;
      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


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

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

   * @return The mapped Form from the current row of the given ResultSet.
   * @throws SQLException
   *             If something fails at database level.
   */
  private static Form mapForm(ResultSet resultSet) throws SQLException {
    return new Form(resultSet.getLong("id"), resultSet.getInt("adult"), resultSet.getInt("child"),
        RoomClassEnum.valueOf(resultSet.getString("roomClass").toUpperCase()), resultSet.getDate("arrival"),
        resultSet.getInt("nights"), resultSet.getString("commentary"));
  }
View Full Code Here

TOP

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

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.