Project

General

Profile

1 34099 michele.ar
package eu.dnetlib.enabling.is.hib.objects;
2 34077 michele.ar
3 34095 michele.ar
import java.io.Serializable;
4
5
import javax.persistence.Column;
6 34183 michele.ar
import javax.persistence.EmbeddedId;
7 34077 michele.ar
import javax.persistence.Entity;
8
import javax.persistence.Table;
9 34095 michele.ar
import javax.persistence.Transient;
10 34077 michele.ar
11 34291 michele.ar
@Entity(name = "service_protocols")
12
@Table(name = "service_protocols")
13
public class HibServiceProtocol extends HibDnetObject implements Serializable {
14 34077 michele.ar
15 34095 michele.ar
	@Transient
16
	private static final long serialVersionUID = -8361753403993972756L;
17
18 34183 michele.ar
	@EmbeddedId
19 34291 michele.ar
	private HibServiceProtocolId id;
20 34077 michele.ar
21 34183 michele.ar
	@Column(name = "address", unique = true)
22 34077 michele.ar
	private String address;
23
24 34291 michele.ar
	public HibServiceProtocol() {}
25 34095 michele.ar
26 34291 michele.ar
	public HibServiceProtocol(final HibServiceProtocolId id, final String address) {
27 34183 michele.ar
		this.id = id;
28 34095 michele.ar
		this.address = address;
29
	}
30
31 34291 michele.ar
	public HibServiceProtocolId getId() {
32 34183 michele.ar
		return id;
33 34077 michele.ar
	}
34
35 34291 michele.ar
	public void setId(final HibServiceProtocolId id) {
36 34183 michele.ar
		this.id = id;
37 34077 michele.ar
	}
38
39
	public String getAddress() {
40
		return address;
41
	}
42
43
	public void setAddress(final String address) {
44
		this.address = address;
45
	}
46 34183 michele.ar
47 34789 michele.ar
	@Override
48
	public int hashCode() {
49
		return id.hashCode();
50
	}
51 34077 michele.ar
}