Package com.alexnevsky.hotel.model

Examples of com.alexnevsky.hotel.model.Order


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

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


   * @return The mapped Order from the current row of the given ResultSet.
   * @throws SQLException
   *             If something fails at database level.
   */
  private static Order mapOrder(ResultSet resultSet) throws SQLException {
    return new Order(resultSet.getLong("id"), resultSet.getDouble("amount"), resultSet.getDate("dateCreated"),
        OrderStatusEnum.valueOf(resultSet.getString("status").toUpperCase()), resultSet.getLong("Customer_id"),
        resultSet.getLong("Form_id"), resultSet.getLong("Room_id"));
  }
View Full Code Here

TOP

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

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.