blob: 2d00c6e15593a17d8648d02d3730e9c9194ef9b1 (
plain)
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
|
package eu.mulk.mulkcms2.entity;
import java.io.Serializable;
import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.Id;
public class JournalEntryPK implements Serializable {
private int journalId;
private int index;
@Column(name = "journal", nullable = false)
@Id
public int getJournalId() {
return journalId;
}
public void setJournalId(int journalId) {
this.journalId = journalId;
}
@Column(name = "index", nullable = false)
@Id
public int getIndex() {
return index;
}
public void setIndex(int index) {
this.index = index;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
JournalEntryPK that = (JournalEntryPK) o;
return journalId == that.journalId && index == that.index;
}
@Override
public int hashCode() {
return Objects.hash(journalId, index);
}
}
|