For working with data from database I implemented table data gateway. So, I have two tables:
CREATE TABLE student (
id INT,
id groupId,
name VARCHAR(100),
surname VARCHAR(100)
);
CREATE TABLE group (
id INT,
name VARCHAR(100)
);
And I have two DTO. It's strictly that one DTO for one table
class Student{
private int id;
private int groupId;
private String name;
private String surname;
//+getters and setters
}
class Group{
private int id;
private String name;
//+getters and setters
}
And I have two TableDataGateway classes that loads and saves DTO to DB.
class StudentTableDataGateway extends AbstractTableDataGateway{
....
}
class GroupTableDataGateway extends AbstractTableDataGateway{
....
}
Now I want to create student table via javafx with the following columns:
|Student ID|Student Name|Student Surname|Group Name|
And here I stop. I can't understand how to build data for table view and what I should do next. Please help me.
Aucun commentaire:
Enregistrer un commentaire