Project

General

Profile

1
package eu.dnetlib.enabling.is.hib.objects;
2

    
3
import java.io.Serializable;
4

    
5
import javax.persistence.Column;
6
import javax.persistence.EmbeddedId;
7
import javax.persistence.Entity;
8
import javax.persistence.Table;
9
import javax.persistence.Transient;
10

    
11
@Entity(name = "service_protocols")
12
@Table(name = "service_protocols")
13
public class HibServiceProtocol extends HibDnetObject implements Serializable {
14

    
15
	@Transient
16
	private static final long serialVersionUID = -8361753403993972756L;
17

    
18
	@EmbeddedId
19
	private HibServiceProtocolId id;
20

    
21
	@Column(name = "address", unique = true)
22
	private String address;
23

    
24
	public HibServiceProtocol() {}
25

    
26
	public HibServiceProtocol(final HibServiceProtocolId id, final String address) {
27
		this.id = id;
28
		this.address = address;
29
	}
30

    
31
	public HibServiceProtocolId getId() {
32
		return id;
33
	}
34

    
35
	public void setId(final HibServiceProtocolId id) {
36
		this.id = id;
37
	}
38

    
39
	public String getAddress() {
40
		return address;
41
	}
42

    
43
	public void setAddress(final String address) {
44
		this.address = address;
45
	}
46

    
47
	@Override
48
	public int hashCode() {
49
		return id.hashCode();
50
	}
51
}
(10-10/12)