1
0
forked from PGL/Clyde

- Changement des noms de variables

- Ajout des getters/setters appropriés
- Ajout des constructeur nécessaires
This commit is contained in:
LeoMoulin 2024-03-03 17:42:26 +01:00
parent bbe1f9767c
commit 684c3095eb
8 changed files with 232 additions and 45 deletions

0
.attach_pid7200 Normal file
View File

View File

@ -9,8 +9,44 @@ import jakarta.persistence.Id;
public class Course {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int CourseID;
private int Credits;
private String Title;
private String Faculty;
private int courseID;
private int credits;
private String title;
private String faculty;
public Course(int credits, String title, String faculty){
this.credits = credits;
this.title = title;
this.faculty = faculty;
}
public Course() {}
public int getCourseID() {
return courseID;
}
public int getCredits() {
return credits;
}
public void setCredits(int credits){
this.credits = credits;
}
public String getFaculty() {
return faculty;
}
public void setFaculty(String faculty){
this.faculty = faculty;
}
public String getTitle() {
return title;
}
public void setTitle(String title){
this.title = title;
}
}

View File

@ -9,8 +9,35 @@ import jakarta.persistence.Id;
public class Cursus {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int CursusId;
private int Year;
private String Option;
private int cursusId;
private int year;
private String option;
public Cursus(int year, String option){
this.year = year;
this.option = option;
}
public Cursus() {}
public int getCursusId(){
return this.cursusId;
}
public int getYear(){
return this.year;
}
public void setYear(int year){
this.year = year;
}
public String getOption(){
return this.option;
}
public void setOption(String option){
this.option = option;
}
}

View File

@ -10,7 +10,33 @@ public class CursusCourse {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
private int CursusId;
private int CourseId;
private int cursusId;
private int courseId;
public CursusCourse(int cursusId, int courseId){
this.cursusId = cursusId;
this.courseId = courseId;
}
public CursusCourse() {}
public int getId() {
return id;
}
public int getCourseId() {
return courseId;
}
public void setCourseId(int courseId){
this.courseId = courseId;
}
public int getCursusId() {
return cursusId;
}
public void setCursusId(int cursusId) {
this.cursusId = cursusId;
}
}

View File

@ -10,6 +10,33 @@ public class Secretary {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
private int RegNo;
private String Faculty;
private int regNo;
private String faculty;
public Secretary(int regNo, String faculty){
this.regNo = regNo;
this.faculty = faculty;
}
public Secretary() {}
public int getId() {
return id;
}
public int getRegNo() {
return regNo;
}
public void setRegNo(int regNo) {
this.regNo = regNo;
}
public String getFaculty() {
return faculty;
}
public void setFaculty(String faculty) {
this.faculty = faculty;
}
}

View File

@ -10,7 +10,45 @@ public class TeacherGivenCourse {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
private int RegNo;
private int CourseId;
private boolean Owned;
private int regNo;
private int courseId;
//This flag helps make the difference between an assistant or a Teacher (who owns the course)
private boolean owned;
public TeacherGivenCourse(int regNo, int courseId, boolean owned){
this.regNo = regNo;
this.courseId = courseId;
this.owned = owned;
}
public TeacherGivenCourse() {}
public int getId() {
return id;
}
public int getRegNo() {
return regNo;
}
public void setRegNo(int regNo) {
this.regNo = regNo;
}
public int getCourseId() {
return courseId;
}
public void setCourseId(int courseId) {
this.courseId = courseId;
}
public boolean isOwned() {
return owned;
}
public void setOwned(boolean owned) {
this.owned = owned;
}
}

View File

@ -13,78 +13,84 @@ import java.util.Date;
public class User {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int RegNo;
private String LastName;
private String FirstName;
private String Email;
private String Adress;
private String Country;
private Date BirthDate;
private ovh.herisson.Clyde.Tables.Role Role;
private String Password;
private int regNo;
private String lastName;
private String firstName;
private String email;
private String adress;
private String country;
private Date birthDate;
private ovh.herisson.Clyde.Tables.Role role;
private String password;
public User(String LastName, String FirstName){
this.LastName = LastName;
this.FirstName = FirstName;
public User(String lastName, String firstName, String email, String adress, String country, Date birthDate, Role role){
this.lastName = lastName;
this.firstName = firstName;
this.email = email;
this.adress = adress;
this.country = country;
this.birthDate = birthDate;
this.role = role;
}
public User() {
public User() {}
public int getRegNo(){
return this.regNo;
}
public String getLastName() {
return LastName;
return lastName;
}
public void setLastName(String LastName) {
this.LastName = LastName;
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getFirstName() {
return FirstName;
return firstName;
}
public void setFirstName(String firstName) {
FirstName = firstName;
this.firstName = firstName;
}
public String getEmail() {
return Email;
return email;
}
public void setEmail(String email) {
Email = email;
this.email = email;
}
public String getAdress() {
return Adress;
return adress;
}
public void setAdress(String adress) {
Adress = adress;
this.adress = adress;
}
public String getCountry() {
return Country;
return country;
}
public void setCountry(String country) {
Country = country;
this.country = country;
}
public Date getBirthDate() {
return BirthDate;
return birthDate;
}
public void setBirthDate(Date birthDate) {
BirthDate = birthDate;
this.birthDate = birthDate;
}
public ovh.herisson.Clyde.Tables.Role getRole() {
return Role;
return role;
}
public void setRole(ovh.herisson.Clyde.Tables.Role role) {
Role = role;
this.role = role;
}
}

View File

@ -8,6 +8,33 @@ public class UserCursus {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
private int RegNo;
private int CursusId;
private int regNo;
private int cursusId;
public UserCursus(int regNo, int cursusId){
this.regNo = regNo;
this.cursusId = cursusId;
}
public UserCursus() {}
public int getId() {
return id;
}
public int getRegNo() {
return regNo;
}
public void setRegNo(int regNo) {
this.regNo = regNo;
}
public int getCursusId() {
return cursusId;
}
public void setCursusId(int cursusId) {
this.cursusId = cursusId;
}
}