ResultSet rs = ps.executeQuery();
while (rs.next()) {
TimeSeries serie = new TimeSeries(st);
try {
serie.add(
new Month(rs.getInt("mois"), year
.intValue()),
rs.getInt("num") / s.numberOfPassengers(st));
} catch (Exception ex) {
__app.getMainWindow().showNotification(
"Notification", "No Data",
Window.Notification.TYPE_TRAY_NOTIFICATION);
}
dataset.addSeries(serie);
}
ps.close();
rs.close();
} catch (SQLException e) {
e.printStackTrace();
}
} else {
TimeSeries _serie = new TimeSeries(st);
_serie.add(new Month(1, year.intValue()), 1);
dataset.addSeries(_serie);
}
}
return dataset;