bzr branch
http://gegoxaren.bato24.eu/bzr/magstudentportal/trunk
15.1.3
by Gustav Hartvigsson
Generated classes from tables and added them. |
1 |
package DB; |
2 |
||
3 |
import java.io.Serializable; |
|
4 |
import javax.persistence.*; |
|
5 |
||
6 |
/**
|
|
7 |
* The persistent class for the student_attendance database table.
|
|
8 |
*
|
|
9 |
*/
|
|
10 |
@Entity
|
|
15.1.6
by Gustav Hartvigsson
* tabs -> 2 spaces |
11 |
@Table(name = "student_attendance") |
12 |
@NamedQuery(name = "StudentAttendance.findAll", query = "SELECT s FROM StudentAttendance s") |
|
15.1.3
by Gustav Hartvigsson
Generated classes from tables and added them. |
13 |
public class StudentAttendance implements Serializable { |
15.1.6
by Gustav Hartvigsson
* tabs -> 2 spaces |
14 |
private static final long serialVersionUID = 1L; |
15 |
private StudentAttendancePK id; |
|
16 |
private Integer lateTime; |
|
17 |
private Lecture lecture; |
|
18 |
private Student studentBean; |
|
19 |
||
20 |
public StudentAttendance() { |
|
21 |
} |
|
22 |
||
23 |
@EmbeddedId |
|
24 |
public StudentAttendancePK getId() { |
|
25 |
return this.id; |
|
26 |
} |
|
27 |
||
28 |
public void setId(StudentAttendancePK id) { |
|
29 |
this.id = id; |
|
30 |
} |
|
31 |
||
32 |
@Column(name = "late_time") |
|
33 |
public Integer getLateTime() { |
|
34 |
return this.lateTime; |
|
35 |
} |
|
36 |
||
37 |
public void setLateTime(Integer lateTime) { |
|
38 |
this.lateTime = lateTime; |
|
39 |
} |
|
40 |
||
41 |
// bi-directional many-to-one association to Lecture |
|
42 |
@ManyToOne |
|
43 |
@JoinColumns({ |
|
44 |
@JoinColumn(name = "lecture_course", referencedColumnName = "course", nullable = false, insertable = false, updatable = false), |
|
45 |
@JoinColumn(name = "lecture_end_time", referencedColumnName = "end_time", nullable = false, insertable = false, updatable = false), |
|
46 |
@JoinColumn(name = "lecture_start_time", referencedColumnName = "start_time", nullable = false, insertable = false, updatable = false) }) |
|
47 |
public Lecture getLecture() { |
|
48 |
return this.lecture; |
|
49 |
} |
|
50 |
||
51 |
public void setLecture(Lecture lecture) { |
|
52 |
this.lecture = lecture; |
|
53 |
} |
|
54 |
||
55 |
// bi-directional many-to-one association to Student |
|
56 |
@ManyToOne |
|
57 |
@JoinColumn(name = "student", nullable = false, insertable = false, updatable = false) |
|
58 |
public Student getStudentBean() { |
|
59 |
return this.studentBean; |
|
60 |
} |
|
61 |
||
62 |
public void setStudentBean(Student studentBean) { |
|
63 |
this.studentBean = studentBean; |
|
64 |
} |
|
15.1.3
by Gustav Hartvigsson
Generated classes from tables and added them. |
65 |
|
66 |
}
|