Package by.bsuir.hypermarket.entity

Examples of by.bsuir.hypermarket.entity.AgeLimit


    List<AgeLimit> ageLimits = new ArrayList<AgeLimit>();
    try (DbConnection connection = DbConnectionPool.INSTANCE.getConnection();
        PreparedStatement statement = connection.prepareStatement(FIND_ALL)) {
      try (ResultSet resultSet = statement.executeQuery()) {
        while (resultSet.next()) {
          AgeLimit ageLimit = new AgeLimit();
          fillUpAgeLimit(resultSet, ageLimit);
        }
      }
    } catch (SQLException e) {
      log.error("Error during searching all age limit entities", e);
View Full Code Here


    return ageLimits;
  }

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

    goods.setPrice(resultSet.getBigDecimal("g_price"));
    goods.setQuantity(resultSet.getInt("g_quantity"));
    goods.setShelfLife(resultSet.getInt("g_shelf_life"));
    goods.setMadeDate(resultSet.getDate("g_made_date"));
   
    AgeLimit ageLimit = new AgeLimit();
    ageLimit.setUid(resultSet.getInt("al_uid"));
    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"));
View Full Code Here

TOP

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

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.