}
private void setProducerAddresses(ResultSet resultSet, Goods goods) throws SQLException {
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"));
address.setUid(resultSet.getInt("a_uid"));
address.setZipCode(resultSet.getInt("a_zip_code"));
addresses.add(address);
}
goods.getProducer().setAddresses(addresses);
}