1
2
3
4
5
6
7
8
9 package com.hack23.cia.model.external.riksdagen.dokumentstatus.impl;
10
11 import java.io.Serializable;
12 import javax.persistence.Basic;
13 import javax.persistence.CascadeType;
14 import javax.persistence.Column;
15 import javax.persistence.Entity;
16 import javax.persistence.GeneratedValue;
17 import javax.persistence.GenerationType;
18 import javax.persistence.Id;
19 import javax.persistence.Inheritance;
20 import javax.persistence.InheritanceType;
21 import javax.persistence.JoinColumn;
22 import javax.persistence.ManyToOne;
23 import javax.persistence.Table;
24 import javax.xml.bind.annotation.XmlAccessType;
25 import javax.xml.bind.annotation.XmlAccessorType;
26 import javax.xml.bind.annotation.XmlAttribute;
27 import javax.xml.bind.annotation.XmlElement;
28 import javax.xml.bind.annotation.XmlType;
29 import com.hack23.cia.model.common.api.ModelObject;
30 import org.jvnet.jaxb2_commons.lang.Equals;
31 import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
32 import org.jvnet.jaxb2_commons.lang.HashCode;
33 import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
34 import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
35 import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
36 import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
37 import org.jvnet.jaxb2_commons.lang.ToString;
38 import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
39 import org.jvnet.jaxb2_commons.locator.ObjectLocator;
40 import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
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
66
67
68
69 @XmlAccessorType(XmlAccessType.FIELD)
70 @XmlType(name = "DocumentStatusContainer", propOrder = {
71 "document",
72 "documentProposal",
73 "documentActivityContainer",
74 "documentDetailContainer",
75 "documentAttachmentContainer",
76 "documentReferenceContainer",
77 "documentPersonReferenceContainer",
78 "documentCategory"
79 })
80 @Entity(name = "DocumentStatusContainer")
81 @Table(name = "DOCUMENT_STATUS_CONTAINER")
82 @Inheritance(strategy = InheritanceType.JOINED)
83 public class DocumentStatusContainer
84 implements Serializable, ModelObject, Equals, HashCode, ToString
85 {
86
87 @XmlElement(name = "dokument", required = true)
88 protected DocumentData document;
89 @XmlElement(name = "dokforslag", required = true)
90 protected DocumentProposalContainer documentProposal;
91 @XmlElement(name = "dokaktivitet", required = true)
92 protected DocumentActivityContainer documentActivityContainer;
93 @XmlElement(name = "dokuppgift", required = true)
94 protected DocumentDetailContainer documentDetailContainer;
95 @XmlElement(name = "dokbilaga", required = true)
96 protected DocumentAttachmentContainer documentAttachmentContainer;
97 @XmlElement(name = "dokreferens", required = true)
98 protected DocumentReferenceContainer documentReferenceContainer;
99 @XmlElement(name = "dokintressent", required = true)
100 protected DocumentPersonReferenceContainer documentPersonReferenceContainer;
101 @XmlElement(name = "dokkategori", required = true)
102 protected String documentCategory;
103 @XmlAttribute(name = "Hjid")
104 protected Long hjid;
105
106
107
108
109
110
111
112
113
114 @ManyToOne(targetEntity = DocumentData.class, cascade = {
115 CascadeType.ALL
116 })
117 @JoinColumn(name = "DOCUMENT_DOCUMENT_STATUS_CON_0")
118 public DocumentData getDocument() {
119 return document;
120 }
121
122
123
124
125
126
127
128
129
130 public void setDocument(DocumentData value) {
131 this.document = value;
132 }
133
134
135
136
137
138
139
140
141
142 @ManyToOne(targetEntity = DocumentProposalContainer.class, cascade = {
143 CascadeType.ALL
144 })
145 @JoinColumn(name = "DOCUMENT_PROPOSAL_DOCUMENT_S_0")
146 public DocumentProposalContainer getDocumentProposal() {
147 return documentProposal;
148 }
149
150
151
152
153
154
155
156
157
158 public void setDocumentProposal(DocumentProposalContainer value) {
159 this.documentProposal = value;
160 }
161
162
163
164
165
166
167
168
169
170 @ManyToOne(targetEntity = DocumentActivityContainer.class, cascade = {
171 CascadeType.ALL
172 })
173 @JoinColumn(name = "DOCUMENT_ACTIVITY_CONTAINER__0")
174 public DocumentActivityContainer getDocumentActivityContainer() {
175 return documentActivityContainer;
176 }
177
178
179
180
181
182
183
184
185
186 public void setDocumentActivityContainer(DocumentActivityContainer value) {
187 this.documentActivityContainer = value;
188 }
189
190
191
192
193
194
195
196
197
198 @ManyToOne(targetEntity = DocumentDetailContainer.class, cascade = {
199 CascadeType.ALL
200 })
201 @JoinColumn(name = "DOCUMENT_DETAIL_CONTAINER_DO_0")
202 public DocumentDetailContainer getDocumentDetailContainer() {
203 return documentDetailContainer;
204 }
205
206
207
208
209
210
211
212
213
214 public void setDocumentDetailContainer(DocumentDetailContainer value) {
215 this.documentDetailContainer = value;
216 }
217
218
219
220
221
222
223
224
225
226 @ManyToOne(targetEntity = DocumentAttachmentContainer.class, cascade = {
227 CascadeType.ALL
228 })
229 @JoinColumn(name = "DOCUMENT_ATTACHMENT_CONTAINE_0")
230 public DocumentAttachmentContainer getDocumentAttachmentContainer() {
231 return documentAttachmentContainer;
232 }
233
234
235
236
237
238
239
240
241
242 public void setDocumentAttachmentContainer(DocumentAttachmentContainer value) {
243 this.documentAttachmentContainer = value;
244 }
245
246
247
248
249
250
251
252
253
254 @ManyToOne(targetEntity = DocumentReferenceContainer.class, cascade = {
255 CascadeType.ALL
256 })
257 @JoinColumn(name = "DOCUMENT_REFERENCE_CONTAINER_0")
258 public DocumentReferenceContainer getDocumentReferenceContainer() {
259 return documentReferenceContainer;
260 }
261
262
263
264
265
266
267
268
269
270 public void setDocumentReferenceContainer(DocumentReferenceContainer value) {
271 this.documentReferenceContainer = value;
272 }
273
274
275
276
277
278
279
280
281
282 @ManyToOne(targetEntity = DocumentPersonReferenceContainer.class, cascade = {
283 CascadeType.ALL
284 })
285 @JoinColumn(name = "DOCUMENT_PERSON_REFERENCE_CO_1")
286 public DocumentPersonReferenceContainer getDocumentPersonReferenceContainer() {
287 return documentPersonReferenceContainer;
288 }
289
290
291
292
293
294
295
296
297
298 public void setDocumentPersonReferenceContainer(DocumentPersonReferenceContainer value) {
299 this.documentPersonReferenceContainer = value;
300 }
301
302
303
304
305
306
307
308
309
310 @Basic
311 @Column(name = "DOCUMENT_CATEGORY", length = 255)
312 public String getDocumentCategory() {
313 return documentCategory;
314 }
315
316
317
318
319
320
321
322
323
324 public void setDocumentCategory(String value) {
325 this.documentCategory = value;
326 }
327
328 public DocumentStatusContainer withDocument(DocumentData value) {
329 setDocument(value);
330 return this;
331 }
332
333 public DocumentStatusContainer withDocumentProposal(DocumentProposalContainer value) {
334 setDocumentProposal(value);
335 return this;
336 }
337
338 public DocumentStatusContainer withDocumentActivityContainer(DocumentActivityContainer value) {
339 setDocumentActivityContainer(value);
340 return this;
341 }
342
343 public DocumentStatusContainer withDocumentDetailContainer(DocumentDetailContainer value) {
344 setDocumentDetailContainer(value);
345 return this;
346 }
347
348 public DocumentStatusContainer withDocumentAttachmentContainer(DocumentAttachmentContainer value) {
349 setDocumentAttachmentContainer(value);
350 return this;
351 }
352
353 public DocumentStatusContainer withDocumentReferenceContainer(DocumentReferenceContainer value) {
354 setDocumentReferenceContainer(value);
355 return this;
356 }
357
358 public DocumentStatusContainer withDocumentPersonReferenceContainer(DocumentPersonReferenceContainer value) {
359 setDocumentPersonReferenceContainer(value);
360 return this;
361 }
362
363 public DocumentStatusContainer withDocumentCategory(String value) {
364 setDocumentCategory(value);
365 return this;
366 }
367
368 public String toString() {
369 final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
370 final StringBuilder buffer = new StringBuilder();
371 append(null, buffer, strategy);
372 return buffer.toString();
373 }
374
375 public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
376 strategy.appendStart(locator, this, buffer);
377 appendFields(locator, buffer, strategy);
378 strategy.appendEnd(locator, this, buffer);
379 return buffer;
380 }
381
382 public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
383 {
384 DocumentData theDocument;
385 theDocument = this.getDocument();
386 strategy.appendField(locator, this, "document", buffer, theDocument);
387 }
388 {
389 DocumentProposalContainer theDocumentProposal;
390 theDocumentProposal = this.getDocumentProposal();
391 strategy.appendField(locator, this, "documentProposal", buffer, theDocumentProposal);
392 }
393 {
394 DocumentActivityContainer theDocumentActivityContainer;
395 theDocumentActivityContainer = this.getDocumentActivityContainer();
396 strategy.appendField(locator, this, "documentActivityContainer", buffer, theDocumentActivityContainer);
397 }
398 {
399 DocumentDetailContainer theDocumentDetailContainer;
400 theDocumentDetailContainer = this.getDocumentDetailContainer();
401 strategy.appendField(locator, this, "documentDetailContainer", buffer, theDocumentDetailContainer);
402 }
403 {
404 DocumentAttachmentContainer theDocumentAttachmentContainer;
405 theDocumentAttachmentContainer = this.getDocumentAttachmentContainer();
406 strategy.appendField(locator, this, "documentAttachmentContainer", buffer, theDocumentAttachmentContainer);
407 }
408 {
409 DocumentReferenceContainer theDocumentReferenceContainer;
410 theDocumentReferenceContainer = this.getDocumentReferenceContainer();
411 strategy.appendField(locator, this, "documentReferenceContainer", buffer, theDocumentReferenceContainer);
412 }
413 {
414 DocumentPersonReferenceContainer theDocumentPersonReferenceContainer;
415 theDocumentPersonReferenceContainer = this.getDocumentPersonReferenceContainer();
416 strategy.appendField(locator, this, "documentPersonReferenceContainer", buffer, theDocumentPersonReferenceContainer);
417 }
418 {
419 String theDocumentCategory;
420 theDocumentCategory = this.getDocumentCategory();
421 strategy.appendField(locator, this, "documentCategory", buffer, theDocumentCategory);
422 }
423 return buffer;
424 }
425
426
427
428
429
430
431
432
433
434 @Id
435 @Column(name = "HJID")
436 @GeneratedValue(strategy = GenerationType.AUTO)
437 public Long getHjid() {
438 return hjid;
439 }
440
441
442
443
444
445
446
447
448
449 public void setHjid(Long value) {
450 this.hjid = value;
451 }
452
453 public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
454 if ((object == null)||(this.getClass()!= object.getClass())) {
455 return false;
456 }
457 if (this == object) {
458 return true;
459 }
460 final DocumentStatusContainer that = ((DocumentStatusContainer) object);
461 {
462 DocumentData lhsDocument;
463 lhsDocument = this.getDocument();
464 DocumentData rhsDocument;
465 rhsDocument = that.getDocument();
466 if (!strategy.equals(LocatorUtils.property(thisLocator, "document", lhsDocument), LocatorUtils.property(thatLocator, "document", rhsDocument), lhsDocument, rhsDocument)) {
467 return false;
468 }
469 }
470 {
471 DocumentProposalContainer lhsDocumentProposal;
472 lhsDocumentProposal = this.getDocumentProposal();
473 DocumentProposalContainer rhsDocumentProposal;
474 rhsDocumentProposal = that.getDocumentProposal();
475 if (!strategy.equals(LocatorUtils.property(thisLocator, "documentProposal", lhsDocumentProposal), LocatorUtils.property(thatLocator, "documentProposal", rhsDocumentProposal), lhsDocumentProposal, rhsDocumentProposal)) {
476 return false;
477 }
478 }
479 {
480 DocumentActivityContainer lhsDocumentActivityContainer;
481 lhsDocumentActivityContainer = this.getDocumentActivityContainer();
482 DocumentActivityContainer rhsDocumentActivityContainer;
483 rhsDocumentActivityContainer = that.getDocumentActivityContainer();
484 if (!strategy.equals(LocatorUtils.property(thisLocator, "documentActivityContainer", lhsDocumentActivityContainer), LocatorUtils.property(thatLocator, "documentActivityContainer", rhsDocumentActivityContainer), lhsDocumentActivityContainer, rhsDocumentActivityContainer)) {
485 return false;
486 }
487 }
488 {
489 DocumentDetailContainer lhsDocumentDetailContainer;
490 lhsDocumentDetailContainer = this.getDocumentDetailContainer();
491 DocumentDetailContainer rhsDocumentDetailContainer;
492 rhsDocumentDetailContainer = that.getDocumentDetailContainer();
493 if (!strategy.equals(LocatorUtils.property(thisLocator, "documentDetailContainer", lhsDocumentDetailContainer), LocatorUtils.property(thatLocator, "documentDetailContainer", rhsDocumentDetailContainer), lhsDocumentDetailContainer, rhsDocumentDetailContainer)) {
494 return false;
495 }
496 }
497 {
498 DocumentAttachmentContainer lhsDocumentAttachmentContainer;
499 lhsDocumentAttachmentContainer = this.getDocumentAttachmentContainer();
500 DocumentAttachmentContainer rhsDocumentAttachmentContainer;
501 rhsDocumentAttachmentContainer = that.getDocumentAttachmentContainer();
502 if (!strategy.equals(LocatorUtils.property(thisLocator, "documentAttachmentContainer", lhsDocumentAttachmentContainer), LocatorUtils.property(thatLocator, "documentAttachmentContainer", rhsDocumentAttachmentContainer), lhsDocumentAttachmentContainer, rhsDocumentAttachmentContainer)) {
503 return false;
504 }
505 }
506 {
507 DocumentReferenceContainer lhsDocumentReferenceContainer;
508 lhsDocumentReferenceContainer = this.getDocumentReferenceContainer();
509 DocumentReferenceContainer rhsDocumentReferenceContainer;
510 rhsDocumentReferenceContainer = that.getDocumentReferenceContainer();
511 if (!strategy.equals(LocatorUtils.property(thisLocator, "documentReferenceContainer", lhsDocumentReferenceContainer), LocatorUtils.property(thatLocator, "documentReferenceContainer", rhsDocumentReferenceContainer), lhsDocumentReferenceContainer, rhsDocumentReferenceContainer)) {
512 return false;
513 }
514 }
515 {
516 DocumentPersonReferenceContainer lhsDocumentPersonReferenceContainer;
517 lhsDocumentPersonReferenceContainer = this.getDocumentPersonReferenceContainer();
518 DocumentPersonReferenceContainer rhsDocumentPersonReferenceContainer;
519 rhsDocumentPersonReferenceContainer = that.getDocumentPersonReferenceContainer();
520 if (!strategy.equals(LocatorUtils.property(thisLocator, "documentPersonReferenceContainer", lhsDocumentPersonReferenceContainer), LocatorUtils.property(thatLocator, "documentPersonReferenceContainer", rhsDocumentPersonReferenceContainer), lhsDocumentPersonReferenceContainer, rhsDocumentPersonReferenceContainer)) {
521 return false;
522 }
523 }
524 {
525 String lhsDocumentCategory;
526 lhsDocumentCategory = this.getDocumentCategory();
527 String rhsDocumentCategory;
528 rhsDocumentCategory = that.getDocumentCategory();
529 if (!strategy.equals(LocatorUtils.property(thisLocator, "documentCategory", lhsDocumentCategory), LocatorUtils.property(thatLocator, "documentCategory", rhsDocumentCategory), lhsDocumentCategory, rhsDocumentCategory)) {
530 return false;
531 }
532 }
533 return true;
534 }
535
536 public boolean equals(Object object) {
537 final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
538 return equals(null, null, object, strategy);
539 }
540
541 public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
542 int currentHashCode = 1;
543 {
544 DocumentData theDocument;
545 theDocument = this.getDocument();
546 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "document", theDocument), currentHashCode, theDocument);
547 }
548 {
549 DocumentProposalContainer theDocumentProposal;
550 theDocumentProposal = this.getDocumentProposal();
551 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "documentProposal", theDocumentProposal), currentHashCode, theDocumentProposal);
552 }
553 {
554 DocumentActivityContainer theDocumentActivityContainer;
555 theDocumentActivityContainer = this.getDocumentActivityContainer();
556 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "documentActivityContainer", theDocumentActivityContainer), currentHashCode, theDocumentActivityContainer);
557 }
558 {
559 DocumentDetailContainer theDocumentDetailContainer;
560 theDocumentDetailContainer = this.getDocumentDetailContainer();
561 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "documentDetailContainer", theDocumentDetailContainer), currentHashCode, theDocumentDetailContainer);
562 }
563 {
564 DocumentAttachmentContainer theDocumentAttachmentContainer;
565 theDocumentAttachmentContainer = this.getDocumentAttachmentContainer();
566 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "documentAttachmentContainer", theDocumentAttachmentContainer), currentHashCode, theDocumentAttachmentContainer);
567 }
568 {
569 DocumentReferenceContainer theDocumentReferenceContainer;
570 theDocumentReferenceContainer = this.getDocumentReferenceContainer();
571 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "documentReferenceContainer", theDocumentReferenceContainer), currentHashCode, theDocumentReferenceContainer);
572 }
573 {
574 DocumentPersonReferenceContainer theDocumentPersonReferenceContainer;
575 theDocumentPersonReferenceContainer = this.getDocumentPersonReferenceContainer();
576 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "documentPersonReferenceContainer", theDocumentPersonReferenceContainer), currentHashCode, theDocumentPersonReferenceContainer);
577 }
578 {
579 String theDocumentCategory;
580 theDocumentCategory = this.getDocumentCategory();
581 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "documentCategory", theDocumentCategory), currentHashCode, theDocumentCategory);
582 }
583 return currentHashCode;
584 }
585
586 public int hashCode() {
587 final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
588 return this.hashCode(null, strategy);
589 }
590
591 }