private void loadTableViewAreaOnline(ObservableList oblist, Connection conn, TableView table) {
oblist.clear();
try {
String sql = "SELECT journal.idauto, "
+ "journal.dateAreaOut, "
+ "journal.areaTimeOut, "
+ "journal.number, "
+ "journal.mark, "
+ "journal.model, "
+ "journal.driver, "
+ "journal.mileageOut, "
+ "journal.mechMileageOut, "
+ "journal.fuelMainOut, "
+ "journal.fuelAddOut, "
+ "journal.fuelMechOut, "
+ "journal.areaOut, "
+ "journal.vehicleID, "
+ "vehicleList.fuelNorm "
+ "FROM journal join vehicleList on journal.vehicleID = vehicleList.vehicleId "
+ "where journal.status = '" + VEH_STATUS_ONLINE + "' "
+ "ORDER by journal.dateAreaOut, journal.areaTimeOut";
pst = conn.prepareStatement(sql);
pst.setQueryTimeout(40000);
rs = pst.executeQuery();
while (rs.next()) {
oblist.add(new ModelTableOnline(
rs.getString("idauto"),
rs.getString("dateAreaOut"),
rs.getString("areaTimeOut"),
rs.getString("number"),
rs.getString("mark"),
//
rs.getString("model"),
rs.getString("driver"),
rs.getString("mileageOut"),
rs.getString("mechMileageOut"),
rs.getString("fuelMainOut"),
rs.getString("fuelAddOut"),
rs.getString("fuelMechOut"),
rs.getString("areaOut"),
rs.getString("vehicleID"),
rs.getString("fuelNorm")
));
}
table.setItems(oblist);
} catch (SQLException ex) {
Logger.getLogger(TableController.class.getName()).log(Level.SEVERE, null, ex);
}
}