Package by.bsuir.hypermarket.entity

Examples of by.bsuir.hypermarket.entity.Country


 
  private void fillUpAddress(ResultSet resultSet, Address address) throws SQLException {
    address.setUid(resultSet.getInt("a_uid"));
    address.setAppartment(resultSet.getInt("a_appartment"));
    address.setBuilding(resultSet.getInt("a_building"));
    Country country = new Country();
    country.setName(resultSet.getString("country_name"));
    country.setUid(resultSet.getInt("a_c_uid"));
    address.setCountry(country);
    address.setDistrict(resultSet.getString("a_district"));
    address.setHouseNumber(resultSet.getInt("a_house_num"));
    address.setRegion(resultSet.getString("a_region"));
    address.setStreet(resultSet.getString("a_street"));
View Full Code Here


    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"));
    goods.setCountry(country);
   
    Department department = new Department();
    department.setUid(resultSet.getInt("d_uid"));
    department.setName(resultSet.getString("d_name"))
View Full Code Here

    List<Address> addresses = new ArrayList<Address>();
    while (resultSet.next()) {
      Address address = new Address();
      address.setAppartment(resultSet.getInt("a_appartment"));
      address.setBuilding(resultSet.getInt("a_building"));
      Country country = new Country();
      country.setName(resultSet.getString("country_name"));
      country.setUid(resultSet.getInt("a_c_uid"));
      address.setCountry(country);
      address.setDistrict(resultSet.getString("a_district"));
      address.setHouseNumber(resultSet.getInt("a_house_num"));
      address.setRegion(resultSet.getString("a_region"));
      address.setStreet(resultSet.getString("a_street"));
View Full Code Here

    List<Address> addresses = new ArrayList<Address>();
    while (resultSet.next()) {
      Address address = new Address();
      address.setAppartment(resultSet.getInt("a_appartment"));
      address.setBuilding(resultSet.getInt("a_building"));
      Country country = new Country();
      country.setName(resultSet.getString("country_name"));
      country.setUid(resultSet.getInt("a_c_uid"));
      address.setCountry(country);
      address.setDistrict(resultSet.getString("a_district"));
      address.setHouseNumber(resultSet.getInt("a_house_num"));
      address.setRegion(resultSet.getString("a_region"));
      address.setStreet(resultSet.getString("a_street"));
View Full Code Here

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

    return countries;
  }

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

TOP

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

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.