* nature_controller_id to the database. Note NatureControllerType
* contains DiseaseType. If none found returns null.
* @throws SQLException
*/
public static NatureControllerType getByWorldID(int world_id) throws SQLException {
NatureControllerType returnNatureControllerType = null;
String query = "SELECT * FROM `world` w JOIN `nature_controller` n ON w.`nature_controller_id` = n.`nature_controller_id` WHERE `world_id` = ?";
Connection connection = null;
PreparedStatement pstmt = null;
try {
connection = DAO.getDataSource().getConnection();
pstmt = connection.prepareStatement(query);
pstmt.setInt(1, world_id);
ResultSet rs = pstmt.executeQuery();
if (rs.next()) {
returnNatureControllerType = new NatureControllerType(rs.getInt("nature_controller_id"));
returnNatureControllerType.setEcosystemType(rs.getString("ecosystem_type"));
returnNatureControllerType.setCloudyChance(rs.getFloat("cloudy_chance"));
returnNatureControllerType.setAverageCloud(rs.getFloat("average_cloud"));
returnNatureControllerType.setCloudRange(rs.getFloat("cloud_range"));
returnNatureControllerType.setRainChance(rs.getFloat("rain_chance"));
returnNatureControllerType.setAverageRain(rs.getFloat("average_rain"));
returnNatureControllerType.setRainRange(rs.getFloat("rain_range"));
returnNatureControllerType.setEvaporationRate(rs.getFloat("evaporation_rate"));
Disease holdDisease = DiseaseDAO.getByDiseaseID(rs.getInt("disease_id"));
//...
//Ask Nathan;
}