This project has retired. For details please refer to its
Attic page.
Edge xref
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.juddi.model;
17
18 import java.io.Serializable;
19 import java.util.ArrayList;
20 import java.util.List;
21 import javax.persistence.CascadeType;
22 import javax.persistence.Column;
23 import javax.persistence.Entity;
24 import javax.persistence.FetchType;
25 import javax.persistence.GeneratedValue;
26 import javax.persistence.GenerationType;
27 import javax.persistence.Id;
28 import javax.persistence.JoinColumn;
29 import javax.persistence.ManyToOne;
30 import javax.persistence.OneToMany;
31 import javax.persistence.Table;
32
33 @Entity
34 @Table(name = "j3_edge")
35 public class Edge implements Serializable{
36
37 private Long id;
38 private List<ControlMessage> message;
39 private String messageSender;
40 private String messageReceiver;
41 private List<EdgeReceiverAlternate> messageReceiverAlternate;
42 private ReplicationConfiguration parent;
43
44 @ManyToOne(fetch = FetchType.LAZY)
45 @JoinColumn(name = "ReplicationConfiguration", nullable = false)
46 public ReplicationConfiguration getReplicationConfiguration() {
47 return parent;
48 }
49
50 public void setReplicationConfiguration(ReplicationConfiguration p){
51 parent = p;
52 }
53
54
55
56
57
58 @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = ControlMessage.class)
59 public List<ControlMessage> getMessages() {
60 if (message == null) {
61 message = new ArrayList<ControlMessage>();
62 }
63 return this.message;
64 }
65 public void setMessages(List<ControlMessage> values) {
66 this.message = values;
67 }
68
69
70 @Column
71 public String getMessageSender() {
72 return messageSender;
73 }
74
75 public void setMessageSender(String value) {
76 this.messageSender = value;
77 }
78
79
80
81
82
83
84 @Column
85 public String getMessageReceiver() {
86 return messageReceiver;
87 }
88
89 public void setMessageReceiver(String value) {
90 this.messageReceiver = value;
91 }
92
93
94
95
96
97
98
99
100 @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = EdgeReceiverAlternate.class
101
102 )
103 public List<EdgeReceiverAlternate> getMessageReceiverAlternate() {
104 if (messageReceiverAlternate == null) {
105 messageReceiverAlternate = new ArrayList<EdgeReceiverAlternate>();
106 }
107 return this.messageReceiverAlternate;
108 }
109
110 @Id
111 @GeneratedValue(strategy = GenerationType.AUTO)
112 public Long getId() {
113 return id;
114 }
115
116 public void setMessage(List<ControlMessage> message) {
117 this.message = message;
118 }
119
120 public void setMessageReceiverAlternate(List<EdgeReceiverAlternate> messageReceiverAlternate) {
121 this.messageReceiverAlternate = messageReceiverAlternate;
122 }
123
124
125
126 public void setId(Long id) {
127 this.id = id;
128 }
129 }