1
|
package eu.dnetlib.organizations.model;
|
2
|
|
3
|
import java.io.Serializable;
|
4
|
import java.util.Objects;
|
5
|
|
6
|
public class RelationshipPK implements Serializable {
|
7
|
|
8
|
/**
|
9
|
*
|
10
|
*/
|
11
|
private static final long serialVersionUID = 6090016904833186505L;
|
12
|
|
13
|
private String id1;
|
14
|
|
15
|
private String id2;
|
16
|
|
17
|
private String relType;
|
18
|
|
19
|
public String getId1() {
|
20
|
return id1;
|
21
|
}
|
22
|
|
23
|
public void setId1(final String id1) {
|
24
|
this.id1 = id1;
|
25
|
}
|
26
|
|
27
|
public String getId2() {
|
28
|
return id2;
|
29
|
}
|
30
|
|
31
|
public void setId2(final String id2) {
|
32
|
this.id2 = id2;
|
33
|
}
|
34
|
|
35
|
public String getRelType() {
|
36
|
return relType;
|
37
|
}
|
38
|
|
39
|
public void setRelType(final String relType) {
|
40
|
this.relType = relType;
|
41
|
}
|
42
|
|
43
|
@Override
|
44
|
public int hashCode() {
|
45
|
return Objects.hash(id1, id2, relType);
|
46
|
}
|
47
|
|
48
|
@Override
|
49
|
public boolean equals(final Object obj) {
|
50
|
if (this == obj) { return true; }
|
51
|
if (obj == null) { return false; }
|
52
|
if (!(obj instanceof RelationshipPK)) { return false; }
|
53
|
final RelationshipPK other = (RelationshipPK) obj;
|
54
|
return Objects.equals(id1, other.id1) && Objects.equals(id2, other.id2) && Objects.equals(relType, other.relType);
|
55
|
}
|
56
|
|
57
|
@Override
|
58
|
public String toString() {
|
59
|
return String.format("RelationshipPK [id1=%s, id2=%s, relType=%s]", id1, id2, relType);
|
60
|
}
|
61
|
}
|