/magstudentportal/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/magstudentportal/trunk
18 by Gustav Hartvigsson
* Added vim modelines
1
/* c-basic-offset: 2; tab-width: 2; indent-tabs-mode: nil
2
 * vi: set shiftwidth=2 tabstop=2 expandtab:
3
 * :indentSize=2:tabSize=2:noTabs=true:
4
 */
5
15.1.3 by Gustav Hartvigsson
Generated classes from tables and added them.
6
package DB;
7
8
import java.io.Serializable;
9
import javax.persistence.*;
10
11
/**
12
 * The primary key class for the student_attendance database table.
13
 * 
14
 */
15
@Embeddable
16
public class StudentAttendancePK implements Serializable {
15.1.6 by Gustav Hartvigsson
* tabs -> 2 spaces
17
  // default serial version id, required for serializable classes.
18
  private static final long serialVersionUID = 1L;
19
  private Long lectureCourse;
20
  private java.util.Date lectureStartTime;
21
  private java.util.Date lectureEndTime;
22
  private Long student;
23
24
  public StudentAttendancePK() {
25
  }
26
27
  @Column(name = "lecture_course", insertable = false, updatable = false, unique = true, nullable = false)
28
  public Long getLectureCourse() {
29
    return this.lectureCourse;
30
  }
31
32
  public void setLectureCourse(Long lectureCourse) {
33
    this.lectureCourse = lectureCourse;
34
  }
35
36
  @Temporal(TemporalType.TIMESTAMP)
37
  @Column(name = "lecture_start_time", insertable = false, updatable = false, unique = true, nullable = false)
38
  public java.util.Date getLectureStartTime() {
39
    return this.lectureStartTime;
40
  }
41
42
  public void setLectureStartTime(java.util.Date lectureStartTime) {
43
    this.lectureStartTime = lectureStartTime;
44
  }
45
46
  @Temporal(TemporalType.TIMESTAMP)
47
  @Column(name = "lecture_end_time", insertable = false, updatable = false, unique = true, nullable = false)
48
  public java.util.Date getLectureEndTime() {
49
    return this.lectureEndTime;
50
  }
51
52
  public void setLectureEndTime(java.util.Date lectureEndTime) {
53
    this.lectureEndTime = lectureEndTime;
54
  }
55
56
  @Column(insertable = false, updatable = false, unique = true, nullable = false)
57
  public Long getStudent() {
58
    return this.student;
59
  }
60
61
  public void setStudent(Long student) {
62
    this.student = student;
63
  }
64
65
  public boolean equals(Object other) {
66
    if (this == other) {
67
      return true;
68
    }
69
    if (!(other instanceof StudentAttendancePK)) {
70
      return false;
71
    }
72
    StudentAttendancePK castOther = (StudentAttendancePK) other;
73
    return this.lectureCourse.equals(castOther.lectureCourse)
74
        && this.lectureStartTime.equals(castOther.lectureStartTime)
75
        && this.lectureEndTime.equals(castOther.lectureEndTime) && this.student.equals(castOther.student);
76
  }
77
78
  public int hashCode() {
79
    final int prime = 31;
80
    int hash = 17;
81
    hash = hash * prime + this.lectureCourse.hashCode();
82
    hash = hash * prime + this.lectureStartTime.hashCode();
83
    hash = hash * prime + this.lectureEndTime.hashCode();
84
    hash = hash * prime + this.student.hashCode();
85
86
    return hash;
87
  }
15.1.3 by Gustav Hartvigsson
Generated classes from tables and added them.
88
}