if (trainsInStation != null) {
List<TheoricalTrainData> new_theoricalDataList = new ArrayList<TheoricalTrainData>();
DaoTheoricalTrainData daoTheoricalTrainData = new DaoTheoricalTrainData();
DaoUser daoUser = new DaoUser();
for (RealTrainData tmp_real_data : trainsInStation.datas) {
// TODO: faire le -1 sur le id_RealTrainData
TheoricalTrainData tmp_theorical_data = daoTheoricalTrainData.findWithNumGare(tmp_real_data.id_RealTrainData, stationDUA);
if (tmp_theorical_data != null) {
// Pari possible ? (au moins 10 minutes avant l'arriv�e th�orique du train)
if (TimeTester.compareTimes(trainsInStation.time, tmp_theorical_data.arrivalTime) >= 10) {
tmp_theorical_data.destinationUIC = tmp_real_data.destinationId;
tmp_theorical_data.trainName = tmp_real_data.name;
daoTheoricalTrainData.update(tmp_theorical_data);
new_theoricalDataList.add(tmp_theorical_data);
}
// Train en gare ?
if (tmp_real_data.datePassage.equals(trainsInStation.time)) {
// TODO: Donner aussi le retard du train (sinon �a sert � rien ...)
daoUser.validBetOnTheorical(tmp_theorical_data);
}
}
}