Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
package classes;
import jakarta.persistence.*;
import java.util.Objects;
@Entity
@Table(name = "Kurs")
public class Course
{
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "ID")
private int id;
@Column(name = "Name")
private String name;
@Column(name = "Semester")
private int semester;
@Column(name = "Typ")
private String courseType;
@Column(name = "SWS")
private int sws;
@Column(name = "ECTS")
private double ects;
@Column(name = "Prüfungstyp")
private String examType;
@Column(name = "Anrechnung")
private Boolean isCredited;
@ManyToOne(fetch = FetchType.LAZY)
private CoursesOfStudy coursesOfStudy;
public Course()
{
}
public Course(String name, int semester, String courseType, int sws, double ects, String examType, Boolean isCredited)
{
this.name = name;
this.semester = semester;
this.courseType = courseType;
this.sws = sws;
this.ects = ects;
this.examType = examType;
this.isCredited = isCredited;
}
@Override
public boolean equals(Object o)
{
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Course course = (Course) o;
return id == course.id;
}
@Override
public int hashCode()
{
return Objects.hash(id);
}
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 int getSemester()
{
return semester;
}
public void setSemester(int semester)
{
this.semester = semester;
}
public String getCourseType()
{
return courseType;
}
public void setCourseType(String courseType)
{
this.courseType = courseType;
}
public int getSws()
{
return sws;
}
public void setSws(int sws)
{
this.sws = sws;
}
public double getEcts()
{
return ects;
}
public void setEcts(double ects)
{
this.ects = ects;
}
public String getExamType()
{
return examType;
}
public void setExamType(String examType)
{
this.examType = examType;
}
public Boolean isCredited()
{
return isCredited;
}
public void setCredited(Boolean credited)
{
isCredited = credited;
}
public void setCoursesOfStudy(CoursesOfStudy coursesOfStudy)
{
this.coursesOfStudy = coursesOfStudy;
}