She looks like that :
Code:
public class Section {
private int id;
private Level level;
private String name;
private String description;
public Section() {
this(0, null, null, null);
}
public Section(String name, Level level) {
this(0, name, level, null);
}
public Section(int id, String name, Level level, String description) {
this.id = id;
this.level = level;
this.name = name;
this.description = description;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Level getLevel() {
return level;
}
}
And maybe the Level class :
Code:
public class Level {
private int id;
private String name;
private String description;
public Level() {
this(0, null, null);
}
public Level(String name) {
this(0, null, null);
}
public Level(int id, String name, String description) {
setId(id);
setName(name);
setDescription(description);
}
// Getters and Setters
}
Thank you