Package by.bsuir.hypermarket.entity

Examples of by.bsuir.hypermarket.entity.GoodsCondition


    List<GoodsCondition> conditions = new ArrayList<GoodsCondition>();
    try (DbConnection connection = DbConnectionPool.INSTANCE.getConnection();
        PreparedStatement statement = connection.prepareStatement(FIND_ALL)) {
      ResultSet resultSet = statement.executeQuery();
      while (resultSet.next()) {
        GoodsCondition goodsCondition = new GoodsCondition();
        fillUpGoodsCondition(resultSet, goodsCondition);           
        conditions.add(goodsCondition);
      }
    } catch (SQLException e) {
      log.error("Error during statement creation", e);
View Full Code Here


    return conditions;
  }

  @Override
  public GoodsCondition findEntityById(int id) throws DaoException {
    GoodsCondition goodsCondition = new GoodsCondition();
    try (DbConnection connection = DbConnectionPool.INSTANCE.getConnection();
        PreparedStatement idStatement = connection.prepareStatement(FIND_BY_ID)) {
      idStatement.setInt(1, id);
      ResultSet resultSet = idStatement.executeQuery();
      if (resultSet.next()) {
View Full Code Here

    ageLimit.setName(resultSet.getString("al_name"))
    ageLimit.setMinAge(resultSet.getInt("al_min_age"));
    ageLimit.setDescription(resultSet.getString("al_description"));
    goods.setAgeLimit(ageLimit);
   
    GoodsCondition goodsCondition = new GoodsCondition();
    goodsCondition.setUid(resultSet.getInt("gc_uid"));
    goodsCondition.setName(resultSet.getString("gc_name"));
    goodsCondition.setDescription(resultSet.getString("gc_description"));
    goods.setGoodsCondition(goodsCondition);
   
    Country country = new Country();
    country.setUid(resultSet.getInt("country_uid"));
    country.setName(resultSet.getString("goods_from"));
View Full Code Here

TOP

Related Classes of by.bsuir.hypermarket.entity.GoodsCondition

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.