Compare commits
No commits in common. "684c3095eb7b4e9297d29a85f9648abe3e7d8d9b" and "3956037ab5e7e293aa729ad0609d2b0efbc9862a" have entirely different histories.
684c3095eb
...
3956037ab5
@ -9,44 +9,8 @@ import jakarta.persistence.Id;
|
|||||||
public class Course {
|
public class Course {
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||||
private int courseID;
|
private int CourseID;
|
||||||
private int credits;
|
private int Credits;
|
||||||
private String title;
|
private String Title;
|
||||||
private String faculty;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -9,35 +9,8 @@ import jakarta.persistence.Id;
|
|||||||
public class Cursus {
|
public class Cursus {
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||||
private int cursusId;
|
private int CursusId;
|
||||||
private int year;
|
private int Year;
|
||||||
private String option;
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -10,33 +10,7 @@ public class CursusCourse {
|
|||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||||
private int id;
|
private int id;
|
||||||
private int cursusId;
|
private int CursusId;
|
||||||
private int courseId;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -10,33 +10,6 @@ public class Secretary {
|
|||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||||
private int id;
|
private int id;
|
||||||
private int regNo;
|
private int RegNo;
|
||||||
private String faculty;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -10,45 +10,6 @@ public class TeacherGivenCourse {
|
|||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||||
private int id;
|
private int id;
|
||||||
private int regNo;
|
private int RegNo;
|
||||||
private int courseId;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
package ovh.herisson.Clyde.Tables;
|
||||||
|
|
||||||
|
import jakarta.persistence.Entity;
|
||||||
|
import jakarta.persistence.GeneratedValue;
|
||||||
|
import jakarta.persistence.GenerationType;
|
||||||
|
import jakarta.persistence.Id;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
public class TeacherOwnerCourse {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
private int RegNo;
|
||||||
|
private int CourseId;
|
||||||
|
}
|
@ -13,84 +13,78 @@ import java.util.Date;
|
|||||||
public class User {
|
public class User {
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||||
private int regNo;
|
private int RegNo;
|
||||||
private String lastName;
|
private String LastName;
|
||||||
private String firstName;
|
private String FirstName;
|
||||||
private String email;
|
private String Email;
|
||||||
private String adress;
|
private String Adress;
|
||||||
private String country;
|
private String Country;
|
||||||
private Date birthDate;
|
private Date BirthDate;
|
||||||
private ovh.herisson.Clyde.Tables.Role role;
|
private ovh.herisson.Clyde.Tables.Role Role;
|
||||||
private String password;
|
private String Password;
|
||||||
|
|
||||||
public User(String lastName, String firstName, String email, String adress, String country, Date birthDate, Role role){
|
public User(String LastName, String FirstName){
|
||||||
this.lastName = lastName;
|
this.LastName = LastName;
|
||||||
this.firstName = firstName;
|
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() {
|
public String getLastName() {
|
||||||
return lastName;
|
return LastName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLastName(String lastName) {
|
public void setLastName(String LastName) {
|
||||||
this.lastName = lastName;
|
this.LastName = LastName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFirstName() {
|
public String getFirstName() {
|
||||||
return firstName;
|
return FirstName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFirstName(String firstName) {
|
public void setFirstName(String firstName) {
|
||||||
this.firstName = firstName;
|
FirstName = firstName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getEmail() {
|
public String getEmail() {
|
||||||
return email;
|
return Email;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEmail(String email) {
|
public void setEmail(String email) {
|
||||||
this.email = email;
|
Email = email;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAdress() {
|
public String getAdress() {
|
||||||
return adress;
|
return Adress;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAdress(String adress) {
|
public void setAdress(String adress) {
|
||||||
this.adress = adress;
|
Adress = adress;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCountry() {
|
public String getCountry() {
|
||||||
return country;
|
return Country;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCountry(String country) {
|
public void setCountry(String country) {
|
||||||
this.country = country;
|
Country = country;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getBirthDate() {
|
public Date getBirthDate() {
|
||||||
return birthDate;
|
return BirthDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBirthDate(Date birthDate) {
|
public void setBirthDate(Date birthDate) {
|
||||||
this.birthDate = birthDate;
|
BirthDate = birthDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ovh.herisson.Clyde.Tables.Role getRole() {
|
public ovh.herisson.Clyde.Tables.Role getRole() {
|
||||||
return role;
|
return Role;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRole(ovh.herisson.Clyde.Tables.Role role) {
|
public void setRole(ovh.herisson.Clyde.Tables.Role role) {
|
||||||
this.role = role;
|
Role = role;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,33 +8,6 @@ public class UserCursus {
|
|||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||||
private int id;
|
private int id;
|
||||||
private int regNo;
|
private int RegNo;
|
||||||
private int cursusId;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user