Поля:
private final SimpleIntegerProperty raceKod;
private final SimpleStringProperty raceDate;
private final SimpleStringProperty repartureDate;
private final SimpleIntegerProperty cost;
private final SimpleIntegerProperty tourKod;
Не выводиться raceKod. Хотя в консоли все норм.
static void selectStart(ResultSet rs,String table) {
try {
bd_interface.label3.setText(table);
ResultSetMetaData rsmd = rs.getMetaData();
TableColumn tableColumn1 = new TableColumn(rsmd.getColumnName(1));
TableColumn tableColumn2 = new TableColumn(rsmd.getColumnName(2));
TableColumn tableColumn3 = new TableColumn(rsmd.getColumnName(3));
TableColumn tableColumn4 = new TableColumn(rsmd.getColumnName(4));
TableColumn tableColumn5 = new TableColumn(rsmd.getColumnName(5));
tableColumn1.setCellValueFactory(new PropertyValueFactory<Client, Date>("raceDate"));
tableColumn2.setCellValueFactory(new PropertyValueFactory<Client, Date>("repartureDate"));
tableColumn3.setCellValueFactory(new PropertyValueFactory<Client, Integer>("cost"));
tableColumn4.setCellValueFactory(new PropertyValueFactory<Client, Integer>("raceKod"));
tableColumn5.setCellValueFactory(new PropertyValueFactory<Client, Integer>("tourKod"));
ObservableList<Race> data = FXCollections.observableArrayList();
while (rs.next()) {
data.add(new Race(rs.getDate(1), rs.getDate(2), rs.getInt(3), rs.getInt(4), rs.getInt(5)));
}
System.out.println(data.get(0).raceKod);
System.out.println(data.get(1).raceKod);
bd_interface.tableView.getColumns().clear();
bd_interface.tableView.setItems(data);
bd_interface.tableView.getColumns().addAll(tableColumn1, tableColumn2, tableColumn3, tableColumn4,tableColumn5);
} catch (Exception e) {
e.printStackTrace();
}
}