/magstudentportal/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/magstudentportal/trunk
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
/* c-basic-offset: 2; tab-width: 2; indent-tabs-mode: nil
 * vi: set shiftwidth=2 tabstop=2 expandtab:
 * :indentSize=2:tabSize=2:noTabs=true:
 */

package db;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the lecture database table.
 * 
 */
@Embeddable
public class LecturePK implements Serializable {
  // default serial version id, required for serializable classes.
  private static final long serialVersionUID = 1L;
  private Long course;
  private java.util.Date startTime;
  private java.util.Date endTime;

  public LecturePK() {
  }

  @Column(insertable = false, updatable = false, unique = true, nullable = false)
  public Long getCourse() {
    return this.course;
  }

  public void setCourse(Long course) {
    this.course = course;
  }

  @Temporal(TemporalType.TIMESTAMP)
  @Column(name = "start_time", unique = true, nullable = false)
  public java.util.Date getStartTime() {
    return this.startTime;
  }

  public void setStartTime(java.util.Date startTime) {
    this.startTime = startTime;
  }

  @Temporal(TemporalType.TIMESTAMP)
  @Column(name = "end_time", unique = true, nullable = false)
  public java.util.Date getEndTime() {
    return this.endTime;
  }

  public void setEndTime(java.util.Date endTime) {
    this.endTime = endTime;
  }

  public boolean equals(Object other) {
    if (this == other) {
      return true;
    }
    if (!(other instanceof LecturePK)) {
      return false;
    }
    LecturePK castOther = (LecturePK) other;
    return this.course.equals(castOther.course) && this.startTime.equals(castOther.startTime)
        && this.endTime.equals(castOther.endTime);
  }

  public int hashCode() {
    final int prime = 31;
    int hash = 17;
    hash = hash * prime + this.course.hashCode();
    hash = hash * prime + this.startTime.hashCode();
    hash = hash * prime + this.endTime.hashCode();

    return hash;
  }
}