Project

General

Profile

1 57130 michele.ar
package eu.dnetlib.organizations.model;
2
3
import java.io.Serializable;
4
5
import javax.persistence.Column;
6
import javax.persistence.Entity;
7
import javax.persistence.Id;
8
import javax.persistence.IdClass;
9
import javax.persistence.Table;
10
11
@Entity
12
@Table(name = "relationships")
13
@IdClass(RelationshipPK.class)
14
public class Relationship implements Serializable {
15
16
	/**
17
	 *
18
	 */
19
	private static final long serialVersionUID = -5700143694178113214L;
20
21
	@Id
22
	@Column(name = "id1")
23
	private String id1;
24
25
	@Id
26
	@Column(name = "id2")
27
	private String id2;
28
29
	@Id
30
	@Column(name = "reltype")
31
	private String relType;
32
33
	public Relationship() {}
34
35
	public Relationship(final String id1, final String id2, final String relType) {
36
		this.id1 = id1;
37
		this.id2 = id2;
38
		this.relType = relType;
39
	}
40
41
	public String getId1() {
42
		return id1;
43
	}
44
45
	public void setId1(final String id1) {
46
		this.id1 = id1;
47
	}
48
49
	public String getId2() {
50
		return id2;
51
	}
52
53
	public void setId2(final String id2) {
54
		this.id2 = id2;
55
	}
56
57
	public String getRelType() {
58
		return relType;
59
	}
60
61
	public void setRelType(final String relType) {
62
		this.relType = relType;
63
	}
64
65
}