pstmt = connection.prepareStatement(query);
pstmt.setInt(1, zone_id);
ResultSet rs = pstmt.executeQuery();
while (rs.next()) {
WaterSource waterSource = new WaterSource(rs.getInt("water_source_id"));
waterSource.setWater(rs.getInt("water"));
waterSource.setMaxWater(rs.getInt("max_water"));
waterSource.setRadius(rs.getInt("water_radius"));
waterSource.setX(rs.getFloat("location_x"));
waterSource.setY(rs.getFloat("location_y"));
waterSource.setZ(rs.getFloat("location_z"));
waterSource.setZoneID(rs.getInt("zone_id"));
waterSourceList.add(waterSource);
}
rs.close();
pstmt.close();