/magstudentportal/trunk

To get this branch, use:
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 primary key class for the student_attendance database table.
8
 * 
9
 */
10
@Embeddable
11
public class StudentAttendancePK implements Serializable {
15.1.6 by Gustav Hartvigsson
* tabs -> 2 spaces
12
  // default serial version id, required for serializable classes.
13
  private static final long serialVersionUID = 1L;
14
  private Long lectureCourse;
15
  private java.util.Date lectureStartTime;
16
  private java.util.Date lectureEndTime;
17
  private Long student;
18
19
  public StudentAttendancePK() {
20
  }
21
22
  @Column(name = "lecture_course", insertable = false, updatable = false, unique = true, nullable = false)
23
  public Long getLectureCourse() {
24
    return this.lectureCourse;
25
  }
26
27
  public void setLectureCourse(Long lectureCourse) {
28
    this.lectureCourse = lectureCourse;
29
  }
30
31
  @Temporal(TemporalType.TIMESTAMP)
32
  @Column(name = "lecture_start_time", insertable = false, updatable = false, unique = true, nullable = false)
33
  public java.util.Date getLectureStartTime() {
34
    return this.lectureStartTime;
35
  }
36
37
  public void setLectureStartTime(java.util.Date lectureStartTime) {
38
    this.lectureStartTime = lectureStartTime;
39
  }
40
41
  @Temporal(TemporalType.TIMESTAMP)
42
  @Column(name = "lecture_end_time", insertable = false, updatable = false, unique = true, nullable = false)
43
  public java.util.Date getLectureEndTime() {
44
    return this.lectureEndTime;
45
  }
46
47
  public void setLectureEndTime(java.util.Date lectureEndTime) {
48
    this.lectureEndTime = lectureEndTime;
49
  }
50
51
  @Column(insertable = false, updatable = false, unique = true, nullable = false)
52
  public Long getStudent() {
53
    return this.student;
54
  }
55
56
  public void setStudent(Long student) {
57
    this.student = student;
58
  }
59
60
  public boolean equals(Object other) {
61
    if (this == other) {
62
      return true;
63
    }
64
    if (!(other instanceof StudentAttendancePK)) {
65
      return false;
66
    }
67
    StudentAttendancePK castOther = (StudentAttendancePK) other;
68
    return this.lectureCourse.equals(castOther.lectureCourse)
69
        && this.lectureStartTime.equals(castOther.lectureStartTime)
70
        && this.lectureEndTime.equals(castOther.lectureEndTime) && this.student.equals(castOther.student);
71
  }
72
73
  public int hashCode() {
74
    final int prime = 31;
75
    int hash = 17;
76
    hash = hash * prime + this.lectureCourse.hashCode();
77
    hash = hash * prime + this.lectureStartTime.hashCode();
78
    hash = hash * prime + this.lectureEndTime.hashCode();
79
    hash = hash * prime + this.student.hashCode();
80
81
    return hash;
82
  }
15.1.3 by Gustav Hartvigsson
Generated classes from tables and added them.
83
}