Closed Alcor2814 closed 4 months ago
public static ArrayList
try {
Statement stmt = Database.con.createStatement();
ResultSet rset = stmt.executeQuery(select);
while (rset.next()) {
City city = new City();
city.setName(rset.getString("city.Name"));
//Need to store Country
city.setDistrict(rset.getString("city.District"));
city.setPopulation(rset.getInt("city.Population"));
Cities.add(city);
}
} catch (SQLException e) {
throw new RuntimeException(e);
}
return Cities;
}
i think the city table only stores the country code, so you can maybe use that and make a function to get a country by country code?
I'm not sure what the best method for doing and then displaying that would be then Since obviously the country would need to be displayed but without a built-in way to do that that would have to be built into the main
Something like
Country getCountryByCode(string code)
Or something?
added the function, its in epic 3
The city standard in Epic 3 needs to retrieve the country of the city but as yet cannot.