3
import java.io.Serializable;
4
import javax.persistence.*;
9
* The persistent class for the lecture database table.
13
@Table(name="lecture")
14
@NamedQuery(name="Lecture.findAll", query="SELECT l FROM Lecture l")
15
public class Lecture implements Serializable {
16
private static final long serialVersionUID = 1L;
18
private Course courseBean;
19
private List<StudentAttendance> studentAttendances;
26
public LecturePK getId() {
30
public void setId(LecturePK id) {
35
//bi-directional many-to-one association to Course
37
@JoinColumn(name="course", nullable=false, insertable=false, updatable=false)
38
public Course getCourseBean() {
39
return this.courseBean;
42
public void setCourseBean(Course courseBean) {
43
this.courseBean = courseBean;
47
//bi-directional many-to-one association to StudentAttendance
48
@OneToMany(mappedBy="lecture")
49
public List<StudentAttendance> getStudentAttendances() {
50
return this.studentAttendances;
53
public void setStudentAttendances(List<StudentAttendance> studentAttendances) {
54
this.studentAttendances = studentAttendances;
57
public StudentAttendance addStudentAttendance(StudentAttendance studentAttendance) {
58
getStudentAttendances().add(studentAttendance);
59
studentAttendance.setLecture(this);
61
return studentAttendance;
64
public StudentAttendance removeStudentAttendance(StudentAttendance studentAttendance) {
65
getStudentAttendances().remove(studentAttendance);
66
studentAttendance.setLecture(null);
68
return studentAttendance;
b'\\ No newline at end of file'