Package com.alexnevsky.hotel.model

Examples of com.alexnevsky.hotel.model.Admin


   * @throws DAOException
   *             If something fails at database level.
   */
  public Admin getAdmin(String login, String password) throws DAOException {
    AbstractDAOFactory daoFactory = Controller.getDAOFactory();
    Admin admin = daoFactory.getAdminDAO().find(login, password);
    return admin;
  }
View Full Code Here


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

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

   * @return The mapped Admin from the current row of the given ResultSet.
   * @throws SQLException
   *             If something fails at database level.
   */
  private static Admin mapAdmin(ResultSet resultSet) throws SQLException {
    return new Admin(resultSet.getLong("id"), resultSet.getString("login"), resultSet.getString("password"));
  }
View Full Code Here

TOP

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

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.