Project

General

Profile

« Previous | Next » 

Revision 34183

sql setup file

View differences:

HibDnetServiceProtocol.java
3 3
import java.io.Serializable;
4 4

  
5 5
import javax.persistence.Column;
6
import javax.persistence.EmbeddedId;
6 7
import javax.persistence.Entity;
7
import javax.persistence.Id;
8
import javax.persistence.JoinColumn;
9
import javax.persistence.ManyToOne;
10 8
import javax.persistence.Table;
11 9
import javax.persistence.Transient;
12 10

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

  
20
	@ManyToOne
21
	@JoinColumn(name = "service", nullable = false)
22
	private HibDnetService service;
18
	@EmbeddedId
19
	private HibDnetServiceProtocolId id;
23 20

  
24
	@Id
25
	@Column(name = "address")
21
	@Column(name = "address", unique = true)
26 22
	private String address;
27 23

  
28
	@Column(name = "name", nullable = false)
29
	private String name = "SOAP";
30

  
31 24
	public HibDnetServiceProtocol() {}
32 25

  
33
	public HibDnetServiceProtocol(final HibDnetService service, final String name, final String address) {
34
		this.service = service;
35
		this.name = name;
26
	public HibDnetServiceProtocol(final HibDnetServiceProtocolId id, final String address) {
27
		this.id = id;
36 28
		this.address = address;
37 29
	}
38 30

  
39
	public HibDnetService getService() {
40
		return service;
31
	public HibDnetServiceProtocolId getId() {
32
		return id;
41 33
	}
42 34

  
43
	public void setService(final HibDnetService service) {
44
		this.service = service;
35
	public void setId(final HibDnetServiceProtocolId id) {
36
		this.id = id;
45 37
	}
46 38

  
47
	public String getName() {
48
		return name;
49
	}
50

  
51
	public void setName(final String name) {
52
		this.name = name;
53
	}
54

  
55 39
	public String getAddress() {
56 40
		return address;
57 41
	}
......
59 43
	public void setAddress(final String address) {
60 44
		this.address = address;
61 45
	}
46

  
62 47
}

Also available in: Unified diff