Examples of Hypermarket


Examples of by.bsuir.hypermarket.entity.Hypermarket

    String page = null;
    HypermarketDao hypermarketDao = new HypermarketDao();
    try {
      String strId = ConfigurationManager.INSTANCE.getProperty(ConfigurationManager.CURRENT_HYPERMARKET_ID);
      int intId = Integer.parseInt(strId);
      Hypermarket hypermarket = hypermarketDao.findEntityById(intId);
      request.setAttribute(Commands.ABOUT_HYPERMARKET, hypermarket);
      page = ConfigurationManager.INSTANCE.getProperty(ConfigurationManager.ABOUT_PAGE_PATH);
    } catch (DaoException e) {
      page = ConfigurationManager.INSTANCE.getProperty(ConfigurationManager.ERROR_PAGE_PATH);
    }
View Full Code Here

Examples of by.bsuir.hypermarket.entity.Hypermarket

    List<Hypermarket> hypermarkets = new ArrayList<>();
    try (DbConnection connection = DbConnectionPool.INSTANCE.getConnection();
        PreparedStatement statement = connection.prepareStatement(SQL_FIND_ALL)) {
      ResultSet resultSet = statement.executeQuery();
      while (resultSet.next()) {
        Hypermarket hypermarket = new Hypermarket();
        fillUpHypermarket(resultSet, hypermarket);
        hypermarkets.add(hypermarket);
      }
    } catch (ConnectionPoolException e) {
      log.error("Error during getting connection from the pool", e);
View Full Code Here

Examples of by.bsuir.hypermarket.entity.Hypermarket

    return hypermarkets;
  }

  @Override
  public Hypermarket findEntityById(int id) throws DaoException {
    Hypermarket hypermarket = new Hypermarket();
    try (DbConnection connection = DbConnectionPool.INSTANCE.getConnection();
        PreparedStatement statement = connection.prepareStatement(SQL_FIND_BY_ID)) {
      statement.setInt(1, id);
      ResultSet resultSet = statement.executeQuery();
      if (resultSet.next()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.