1
2
3
4
5
6
7
8
9 package com.hack23.cia.model.external.riksdagen.utskottsforslag.impl;
10
11 import java.io.Serializable;
12 import javax.persistence.CascadeType;
13 import javax.persistence.Column;
14 import javax.persistence.Entity;
15 import javax.persistence.GeneratedValue;
16 import javax.persistence.GenerationType;
17 import javax.persistence.Id;
18 import javax.persistence.Inheritance;
19 import javax.persistence.InheritanceType;
20 import javax.persistence.JoinColumn;
21 import javax.persistence.ManyToOne;
22 import javax.persistence.Table;
23 import javax.xml.bind.annotation.XmlAccessType;
24 import javax.xml.bind.annotation.XmlAccessorType;
25 import javax.xml.bind.annotation.XmlAttribute;
26 import javax.xml.bind.annotation.XmlElement;
27 import javax.xml.bind.annotation.XmlType;
28 import com.hack23.cia.model.common.api.ModelObject;
29 import org.jvnet.jaxb2_commons.lang.Equals;
30 import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
31 import org.jvnet.jaxb2_commons.lang.HashCode;
32 import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
33 import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
34 import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
35 import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
36 import org.jvnet.jaxb2_commons.lang.ToString;
37 import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
38 import org.jvnet.jaxb2_commons.locator.ObjectLocator;
39 import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65 @XmlAccessorType(XmlAccessType.FIELD)
66 @XmlType(name = "CommitteeProposalComponentData", propOrder = {
67 "againstProposalContainer",
68 "document",
69 "committeeProposalContainer"
70 })
71 @Entity(name = "CommitteeProposalComponentData")
72 @Table(name = "COMMITTEE_PROPOSAL_COMPONENT_0")
73 @Inheritance(strategy = InheritanceType.JOINED)
74 public class CommitteeProposalComponentData
75 implements Serializable, ModelObject, Equals, HashCode, ToString
76 {
77
78 @XmlElement(name = "dokmotforslag")
79 protected AgainstProposalContainer againstProposalContainer;
80 @XmlElement(name = "dokument")
81 protected CommitteeDocumentData document;
82 @XmlElement(name = "dokutskottsforslag")
83 protected CommitteeProposalContainer committeeProposalContainer;
84 @XmlAttribute(name = "Hjid")
85 protected Long hjid;
86
87
88
89
90
91
92
93
94
95 @ManyToOne(targetEntity = AgainstProposalContainer.class, cascade = {
96 CascadeType.ALL
97 })
98 @JoinColumn(name = "AGAINST_PROPOSAL_CONTAINER_C_0")
99 public AgainstProposalContainer getAgainstProposalContainer() {
100 return againstProposalContainer;
101 }
102
103
104
105
106
107
108
109
110
111 public void setAgainstProposalContainer(AgainstProposalContainer value) {
112 this.againstProposalContainer = value;
113 }
114
115
116
117
118
119
120
121
122
123 @ManyToOne(targetEntity = CommitteeDocumentData.class, cascade = {
124 CascadeType.ALL
125 })
126 @JoinColumn(name = "DOCUMENT_COMMITTEE_PROPOSAL__0")
127 public CommitteeDocumentData getDocument() {
128 return document;
129 }
130
131
132
133
134
135
136
137
138
139 public void setDocument(CommitteeDocumentData value) {
140 this.document = value;
141 }
142
143
144
145
146
147
148
149
150
151 @ManyToOne(targetEntity = CommitteeProposalContainer.class, cascade = {
152 CascadeType.ALL
153 })
154 @JoinColumn(name = "COMMITTEE_PROPOSAL_CONTAINER_0")
155 public CommitteeProposalContainer getCommitteeProposalContainer() {
156 return committeeProposalContainer;
157 }
158
159
160
161
162
163
164
165
166
167 public void setCommitteeProposalContainer(CommitteeProposalContainer value) {
168 this.committeeProposalContainer = value;
169 }
170
171 public CommitteeProposalComponentData withAgainstProposalContainer(AgainstProposalContainer value) {
172 setAgainstProposalContainer(value);
173 return this;
174 }
175
176 public CommitteeProposalComponentData withDocument(CommitteeDocumentData value) {
177 setDocument(value);
178 return this;
179 }
180
181 public CommitteeProposalComponentData withCommitteeProposalContainer(CommitteeProposalContainer value) {
182 setCommitteeProposalContainer(value);
183 return this;
184 }
185
186 public String toString() {
187 final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
188 final StringBuilder buffer = new StringBuilder();
189 append(null, buffer, strategy);
190 return buffer.toString();
191 }
192
193 public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
194 strategy.appendStart(locator, this, buffer);
195 appendFields(locator, buffer, strategy);
196 strategy.appendEnd(locator, this, buffer);
197 return buffer;
198 }
199
200 public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
201 {
202 AgainstProposalContainer theAgainstProposalContainer;
203 theAgainstProposalContainer = this.getAgainstProposalContainer();
204 strategy.appendField(locator, this, "againstProposalContainer", buffer, theAgainstProposalContainer);
205 }
206 {
207 CommitteeDocumentData theDocument;
208 theDocument = this.getDocument();
209 strategy.appendField(locator, this, "document", buffer, theDocument);
210 }
211 {
212 CommitteeProposalContainer theCommitteeProposalContainer;
213 theCommitteeProposalContainer = this.getCommitteeProposalContainer();
214 strategy.appendField(locator, this, "committeeProposalContainer", buffer, theCommitteeProposalContainer);
215 }
216 return buffer;
217 }
218
219
220
221
222
223
224
225
226
227 @Id
228 @Column(name = "HJID")
229 @GeneratedValue(strategy = GenerationType.AUTO)
230 public Long getHjid() {
231 return hjid;
232 }
233
234
235
236
237
238
239
240
241
242 public void setHjid(Long value) {
243 this.hjid = value;
244 }
245
246 public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
247 if ((object == null)||(this.getClass()!= object.getClass())) {
248 return false;
249 }
250 if (this == object) {
251 return true;
252 }
253 final CommitteeProposalComponentData that = ((CommitteeProposalComponentData) object);
254 {
255 AgainstProposalContainer lhsAgainstProposalContainer;
256 lhsAgainstProposalContainer = this.getAgainstProposalContainer();
257 AgainstProposalContainer rhsAgainstProposalContainer;
258 rhsAgainstProposalContainer = that.getAgainstProposalContainer();
259 if (!strategy.equals(LocatorUtils.property(thisLocator, "againstProposalContainer", lhsAgainstProposalContainer), LocatorUtils.property(thatLocator, "againstProposalContainer", rhsAgainstProposalContainer), lhsAgainstProposalContainer, rhsAgainstProposalContainer)) {
260 return false;
261 }
262 }
263 {
264 CommitteeDocumentData lhsDocument;
265 lhsDocument = this.getDocument();
266 CommitteeDocumentData rhsDocument;
267 rhsDocument = that.getDocument();
268 if (!strategy.equals(LocatorUtils.property(thisLocator, "document", lhsDocument), LocatorUtils.property(thatLocator, "document", rhsDocument), lhsDocument, rhsDocument)) {
269 return false;
270 }
271 }
272 {
273 CommitteeProposalContainer lhsCommitteeProposalContainer;
274 lhsCommitteeProposalContainer = this.getCommitteeProposalContainer();
275 CommitteeProposalContainer rhsCommitteeProposalContainer;
276 rhsCommitteeProposalContainer = that.getCommitteeProposalContainer();
277 if (!strategy.equals(LocatorUtils.property(thisLocator, "committeeProposalContainer", lhsCommitteeProposalContainer), LocatorUtils.property(thatLocator, "committeeProposalContainer", rhsCommitteeProposalContainer), lhsCommitteeProposalContainer, rhsCommitteeProposalContainer)) {
278 return false;
279 }
280 }
281 return true;
282 }
283
284 public boolean equals(Object object) {
285 final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
286 return equals(null, null, object, strategy);
287 }
288
289 public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
290 int currentHashCode = 1;
291 {
292 AgainstProposalContainer theAgainstProposalContainer;
293 theAgainstProposalContainer = this.getAgainstProposalContainer();
294 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "againstProposalContainer", theAgainstProposalContainer), currentHashCode, theAgainstProposalContainer);
295 }
296 {
297 CommitteeDocumentData theDocument;
298 theDocument = this.getDocument();
299 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "document", theDocument), currentHashCode, theDocument);
300 }
301 {
302 CommitteeProposalContainer theCommitteeProposalContainer;
303 theCommitteeProposalContainer = this.getCommitteeProposalContainer();
304 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "committeeProposalContainer", theCommitteeProposalContainer), currentHashCode, theCommitteeProposalContainer);
305 }
306 return currentHashCode;
307 }
308
309 public int hashCode() {
310 final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
311 return this.hashCode(null, strategy);
312 }
313
314 }