1
2
3
4
5
6
7
8
9 package com.hack23.cia.model.external.riksdagen.dokumentlista.impl;
10
11 import java.io.Serializable;
12 import java.math.BigInteger;
13 import java.util.ArrayList;
14 import java.util.Collection;
15 import java.util.List;
16 import javax.persistence.Basic;
17 import javax.persistence.CascadeType;
18 import javax.persistence.Column;
19 import javax.persistence.Entity;
20 import javax.persistence.GeneratedValue;
21 import javax.persistence.GenerationType;
22 import javax.persistence.Id;
23 import javax.persistence.Inheritance;
24 import javax.persistence.InheritanceType;
25 import javax.persistence.JoinColumn;
26 import javax.persistence.OneToMany;
27 import javax.persistence.Table;
28 import javax.xml.bind.annotation.XmlAccessType;
29 import javax.xml.bind.annotation.XmlAccessorType;
30 import javax.xml.bind.annotation.XmlAttribute;
31 import javax.xml.bind.annotation.XmlElement;
32 import javax.xml.bind.annotation.XmlSchemaType;
33 import javax.xml.bind.annotation.XmlType;
34 import com.hack23.cia.model.common.api.ModelObject;
35 import org.jvnet.jaxb2_commons.lang.Equals;
36 import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
37 import org.jvnet.jaxb2_commons.lang.HashCode;
38 import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
39 import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
40 import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
41 import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
42 import org.jvnet.jaxb2_commons.lang.ToString;
43 import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
44 import org.jvnet.jaxb2_commons.locator.ObjectLocator;
45 import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78 @XmlAccessorType(XmlAccessType.FIELD)
79 @XmlType(name = "DocumentContainerElement", propOrder = {
80 "dokument"
81 })
82 @Entity(name = "DocumentContainerElement")
83 @Table(name = "DOCUMENT_CONTAINER_ELEMENT")
84 @Inheritance(strategy = InheritanceType.JOINED)
85 public class DocumentContainerElement
86 implements Serializable, ModelObject, Equals, HashCode, ToString
87 {
88
89 @XmlElement(required = true)
90 protected List<DocumentElement> dokument;
91 @XmlAttribute(name = "datum", required = true)
92 protected String datum;
93 @XmlAttribute(name = "debug", required = true)
94 protected String debug;
95 @XmlAttribute(name = "nasta_sida", required = true)
96 @XmlSchemaType(name = "anyURI")
97 protected String nextPage;
98 @XmlAttribute(name = "sida", required = true)
99 protected BigInteger page;
100 @XmlAttribute(name = "sidor", required = true)
101 protected BigInteger totalPages;
102 @XmlAttribute(name = "skapad", required = true)
103 protected String created;
104 @XmlAttribute(name = "traff_fran", required = true)
105 protected BigInteger hitsFrom;
106 @XmlAttribute(name = "traff_till", required = true)
107 protected BigInteger hitsTo;
108 @XmlAttribute(name = "traffar", required = true)
109 protected BigInteger hits;
110 @XmlAttribute(name = "version", required = true)
111 protected String documentVersion;
112 @XmlAttribute(name = "warning", required = true)
113 protected String warning;
114 @XmlAttribute(name = "Hjid")
115 protected Long hjid;
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139 @OneToMany(targetEntity = DocumentElement.class, cascade = {
140 CascadeType.ALL
141 })
142 @JoinColumn(name = "DOKUMENT_DOCUMENT_CONTAINER__0")
143 public List<DocumentElement> getDokument() {
144 if (dokument == null) {
145 dokument = new ArrayList<DocumentElement>();
146 }
147 return this.dokument;
148 }
149
150
151
152
153
154 public void setDokument(List<DocumentElement> dokument) {
155 this.dokument = dokument;
156 }
157
158
159
160
161
162
163
164
165
166 @Basic
167 @Column(name = "DATUM", length = 255)
168 public String getDatum() {
169 return datum;
170 }
171
172
173
174
175
176
177
178
179
180 public void setDatum(String value) {
181 this.datum = value;
182 }
183
184
185
186
187
188
189
190
191
192 @Basic
193 @Column(name = "DEBUG", length = 255)
194 public String getDebug() {
195 return debug;
196 }
197
198
199
200
201
202
203
204
205
206 public void setDebug(String value) {
207 this.debug = value;
208 }
209
210
211
212
213
214
215
216
217
218 @Basic
219 @Column(name = "NEXT_PAGE")
220 public String getNextPage() {
221 return nextPage;
222 }
223
224
225
226
227
228
229
230
231
232 public void setNextPage(String value) {
233 this.nextPage = value;
234 }
235
236
237
238
239
240
241
242
243
244 @Basic
245 @Column(name = "PAGE", precision = 20, scale = 0)
246 public BigInteger getPage() {
247 return page;
248 }
249
250
251
252
253
254
255
256
257
258 public void setPage(BigInteger value) {
259 this.page = value;
260 }
261
262
263
264
265
266
267
268
269
270 @Basic
271 @Column(name = "TOTAL_PAGES", precision = 20, scale = 0)
272 public BigInteger getTotalPages() {
273 return totalPages;
274 }
275
276
277
278
279
280
281
282
283
284 public void setTotalPages(BigInteger value) {
285 this.totalPages = value;
286 }
287
288
289
290
291
292
293
294
295
296 @Basic
297 @Column(name = "CREATED", length = 255)
298 public String getCreated() {
299 return created;
300 }
301
302
303
304
305
306
307
308
309
310 public void setCreated(String value) {
311 this.created = value;
312 }
313
314
315
316
317
318
319
320
321
322 @Basic
323 @Column(name = "HITS_FROM", precision = 20, scale = 0)
324 public BigInteger getHitsFrom() {
325 return hitsFrom;
326 }
327
328
329
330
331
332
333
334
335
336 public void setHitsFrom(BigInteger value) {
337 this.hitsFrom = value;
338 }
339
340
341
342
343
344
345
346
347
348 @Basic
349 @Column(name = "HITS_TO", precision = 20, scale = 0)
350 public BigInteger getHitsTo() {
351 return hitsTo;
352 }
353
354
355
356
357
358
359
360
361
362 public void setHitsTo(BigInteger value) {
363 this.hitsTo = value;
364 }
365
366
367
368
369
370
371
372
373
374 @Basic
375 @Column(name = "HITS", precision = 20, scale = 0)
376 public BigInteger getHits() {
377 return hits;
378 }
379
380
381
382
383
384
385
386
387
388 public void setHits(BigInteger value) {
389 this.hits = value;
390 }
391
392
393
394
395
396
397
398
399
400 @Basic
401 @Column(name = "DOCUMENT_VERSION", length = 255)
402 public String getDocumentVersion() {
403 return documentVersion;
404 }
405
406
407
408
409
410
411
412
413
414 public void setDocumentVersion(String value) {
415 this.documentVersion = value;
416 }
417
418
419
420
421
422
423
424
425
426 @Basic
427 @Column(name = "WARNING", length = 255)
428 public String getWarning() {
429 return warning;
430 }
431
432
433
434
435
436
437
438
439
440 public void setWarning(String value) {
441 this.warning = value;
442 }
443
444 public DocumentContainerElement withDokument(DocumentElement... values) {
445 if (values!= null) {
446 for (DocumentElement value: values) {
447 getDokument().add(value);
448 }
449 }
450 return this;
451 }
452
453 public DocumentContainerElement withDokument(Collection<DocumentElement> values) {
454 if (values!= null) {
455 getDokument().addAll(values);
456 }
457 return this;
458 }
459
460 public DocumentContainerElement withDokument(List<DocumentElement> dokument) {
461 setDokument(dokument);
462 return this;
463 }
464
465 public DocumentContainerElement withDatum(String value) {
466 setDatum(value);
467 return this;
468 }
469
470 public DocumentContainerElement withDebug(String value) {
471 setDebug(value);
472 return this;
473 }
474
475 public DocumentContainerElement withNextPage(String value) {
476 setNextPage(value);
477 return this;
478 }
479
480 public DocumentContainerElement withPage(BigInteger value) {
481 setPage(value);
482 return this;
483 }
484
485 public DocumentContainerElement withTotalPages(BigInteger value) {
486 setTotalPages(value);
487 return this;
488 }
489
490 public DocumentContainerElement withCreated(String value) {
491 setCreated(value);
492 return this;
493 }
494
495 public DocumentContainerElement withHitsFrom(BigInteger value) {
496 setHitsFrom(value);
497 return this;
498 }
499
500 public DocumentContainerElement withHitsTo(BigInteger value) {
501 setHitsTo(value);
502 return this;
503 }
504
505 public DocumentContainerElement withHits(BigInteger value) {
506 setHits(value);
507 return this;
508 }
509
510 public DocumentContainerElement withDocumentVersion(String value) {
511 setDocumentVersion(value);
512 return this;
513 }
514
515 public DocumentContainerElement withWarning(String value) {
516 setWarning(value);
517 return this;
518 }
519
520 public String toString() {
521 final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
522 final StringBuilder buffer = new StringBuilder();
523 append(null, buffer, strategy);
524 return buffer.toString();
525 }
526
527 public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
528 strategy.appendStart(locator, this, buffer);
529 appendFields(locator, buffer, strategy);
530 strategy.appendEnd(locator, this, buffer);
531 return buffer;
532 }
533
534 public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
535 {
536 List<DocumentElement> theDokument;
537 theDokument = (((this.dokument!= null)&&(!this.dokument.isEmpty()))?this.getDokument():null);
538 strategy.appendField(locator, this, "dokument", buffer, theDokument);
539 }
540 {
541 String theDatum;
542 theDatum = this.getDatum();
543 strategy.appendField(locator, this, "datum", buffer, theDatum);
544 }
545 {
546 String theDebug;
547 theDebug = this.getDebug();
548 strategy.appendField(locator, this, "debug", buffer, theDebug);
549 }
550 {
551 String theNextPage;
552 theNextPage = this.getNextPage();
553 strategy.appendField(locator, this, "nextPage", buffer, theNextPage);
554 }
555 {
556 BigInteger thePage;
557 thePage = this.getPage();
558 strategy.appendField(locator, this, "page", buffer, thePage);
559 }
560 {
561 BigInteger theTotalPages;
562 theTotalPages = this.getTotalPages();
563 strategy.appendField(locator, this, "totalPages", buffer, theTotalPages);
564 }
565 {
566 String theCreated;
567 theCreated = this.getCreated();
568 strategy.appendField(locator, this, "created", buffer, theCreated);
569 }
570 {
571 BigInteger theHitsFrom;
572 theHitsFrom = this.getHitsFrom();
573 strategy.appendField(locator, this, "hitsFrom", buffer, theHitsFrom);
574 }
575 {
576 BigInteger theHitsTo;
577 theHitsTo = this.getHitsTo();
578 strategy.appendField(locator, this, "hitsTo", buffer, theHitsTo);
579 }
580 {
581 BigInteger theHits;
582 theHits = this.getHits();
583 strategy.appendField(locator, this, "hits", buffer, theHits);
584 }
585 {
586 String theDocumentVersion;
587 theDocumentVersion = this.getDocumentVersion();
588 strategy.appendField(locator, this, "documentVersion", buffer, theDocumentVersion);
589 }
590 {
591 String theWarning;
592 theWarning = this.getWarning();
593 strategy.appendField(locator, this, "warning", buffer, theWarning);
594 }
595 return buffer;
596 }
597
598
599
600
601
602
603
604
605
606 @Id
607 @Column(name = "HJID")
608 @GeneratedValue(strategy = GenerationType.AUTO)
609 public Long getHjid() {
610 return hjid;
611 }
612
613
614
615
616
617
618
619
620
621 public void setHjid(Long value) {
622 this.hjid = value;
623 }
624
625 public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
626 if ((object == null)||(this.getClass()!= object.getClass())) {
627 return false;
628 }
629 if (this == object) {
630 return true;
631 }
632 final DocumentContainerElement that = ((DocumentContainerElement) object);
633 {
634 List<DocumentElement> lhsDokument;
635 lhsDokument = (((this.dokument!= null)&&(!this.dokument.isEmpty()))?this.getDokument():null);
636 List<DocumentElement> rhsDokument;
637 rhsDokument = (((that.dokument!= null)&&(!that.dokument.isEmpty()))?that.getDokument():null);
638 if (!strategy.equals(LocatorUtils.property(thisLocator, "dokument", lhsDokument), LocatorUtils.property(thatLocator, "dokument", rhsDokument), lhsDokument, rhsDokument)) {
639 return false;
640 }
641 }
642 {
643 String lhsDatum;
644 lhsDatum = this.getDatum();
645 String rhsDatum;
646 rhsDatum = that.getDatum();
647 if (!strategy.equals(LocatorUtils.property(thisLocator, "datum", lhsDatum), LocatorUtils.property(thatLocator, "datum", rhsDatum), lhsDatum, rhsDatum)) {
648 return false;
649 }
650 }
651 {
652 String lhsDebug;
653 lhsDebug = this.getDebug();
654 String rhsDebug;
655 rhsDebug = that.getDebug();
656 if (!strategy.equals(LocatorUtils.property(thisLocator, "debug", lhsDebug), LocatorUtils.property(thatLocator, "debug", rhsDebug), lhsDebug, rhsDebug)) {
657 return false;
658 }
659 }
660 {
661 String lhsNextPage;
662 lhsNextPage = this.getNextPage();
663 String rhsNextPage;
664 rhsNextPage = that.getNextPage();
665 if (!strategy.equals(LocatorUtils.property(thisLocator, "nextPage", lhsNextPage), LocatorUtils.property(thatLocator, "nextPage", rhsNextPage), lhsNextPage, rhsNextPage)) {
666 return false;
667 }
668 }
669 {
670 BigInteger lhsPage;
671 lhsPage = this.getPage();
672 BigInteger rhsPage;
673 rhsPage = that.getPage();
674 if (!strategy.equals(LocatorUtils.property(thisLocator, "page", lhsPage), LocatorUtils.property(thatLocator, "page", rhsPage), lhsPage, rhsPage)) {
675 return false;
676 }
677 }
678 {
679 BigInteger lhsTotalPages;
680 lhsTotalPages = this.getTotalPages();
681 BigInteger rhsTotalPages;
682 rhsTotalPages = that.getTotalPages();
683 if (!strategy.equals(LocatorUtils.property(thisLocator, "totalPages", lhsTotalPages), LocatorUtils.property(thatLocator, "totalPages", rhsTotalPages), lhsTotalPages, rhsTotalPages)) {
684 return false;
685 }
686 }
687 {
688 String lhsCreated;
689 lhsCreated = this.getCreated();
690 String rhsCreated;
691 rhsCreated = that.getCreated();
692 if (!strategy.equals(LocatorUtils.property(thisLocator, "created", lhsCreated), LocatorUtils.property(thatLocator, "created", rhsCreated), lhsCreated, rhsCreated)) {
693 return false;
694 }
695 }
696 {
697 BigInteger lhsHitsFrom;
698 lhsHitsFrom = this.getHitsFrom();
699 BigInteger rhsHitsFrom;
700 rhsHitsFrom = that.getHitsFrom();
701 if (!strategy.equals(LocatorUtils.property(thisLocator, "hitsFrom", lhsHitsFrom), LocatorUtils.property(thatLocator, "hitsFrom", rhsHitsFrom), lhsHitsFrom, rhsHitsFrom)) {
702 return false;
703 }
704 }
705 {
706 BigInteger lhsHitsTo;
707 lhsHitsTo = this.getHitsTo();
708 BigInteger rhsHitsTo;
709 rhsHitsTo = that.getHitsTo();
710 if (!strategy.equals(LocatorUtils.property(thisLocator, "hitsTo", lhsHitsTo), LocatorUtils.property(thatLocator, "hitsTo", rhsHitsTo), lhsHitsTo, rhsHitsTo)) {
711 return false;
712 }
713 }
714 {
715 BigInteger lhsHits;
716 lhsHits = this.getHits();
717 BigInteger rhsHits;
718 rhsHits = that.getHits();
719 if (!strategy.equals(LocatorUtils.property(thisLocator, "hits", lhsHits), LocatorUtils.property(thatLocator, "hits", rhsHits), lhsHits, rhsHits)) {
720 return false;
721 }
722 }
723 {
724 String lhsDocumentVersion;
725 lhsDocumentVersion = this.getDocumentVersion();
726 String rhsDocumentVersion;
727 rhsDocumentVersion = that.getDocumentVersion();
728 if (!strategy.equals(LocatorUtils.property(thisLocator, "documentVersion", lhsDocumentVersion), LocatorUtils.property(thatLocator, "documentVersion", rhsDocumentVersion), lhsDocumentVersion, rhsDocumentVersion)) {
729 return false;
730 }
731 }
732 {
733 String lhsWarning;
734 lhsWarning = this.getWarning();
735 String rhsWarning;
736 rhsWarning = that.getWarning();
737 if (!strategy.equals(LocatorUtils.property(thisLocator, "warning", lhsWarning), LocatorUtils.property(thatLocator, "warning", rhsWarning), lhsWarning, rhsWarning)) {
738 return false;
739 }
740 }
741 return true;
742 }
743
744 public boolean equals(Object object) {
745 final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
746 return equals(null, null, object, strategy);
747 }
748
749 public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
750 int currentHashCode = 1;
751 {
752 List<DocumentElement> theDokument;
753 theDokument = (((this.dokument!= null)&&(!this.dokument.isEmpty()))?this.getDokument():null);
754 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "dokument", theDokument), currentHashCode, theDokument);
755 }
756 {
757 String theDatum;
758 theDatum = this.getDatum();
759 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "datum", theDatum), currentHashCode, theDatum);
760 }
761 {
762 String theDebug;
763 theDebug = this.getDebug();
764 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "debug", theDebug), currentHashCode, theDebug);
765 }
766 {
767 String theNextPage;
768 theNextPage = this.getNextPage();
769 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "nextPage", theNextPage), currentHashCode, theNextPage);
770 }
771 {
772 BigInteger thePage;
773 thePage = this.getPage();
774 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "page", thePage), currentHashCode, thePage);
775 }
776 {
777 BigInteger theTotalPages;
778 theTotalPages = this.getTotalPages();
779 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "totalPages", theTotalPages), currentHashCode, theTotalPages);
780 }
781 {
782 String theCreated;
783 theCreated = this.getCreated();
784 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "created", theCreated), currentHashCode, theCreated);
785 }
786 {
787 BigInteger theHitsFrom;
788 theHitsFrom = this.getHitsFrom();
789 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "hitsFrom", theHitsFrom), currentHashCode, theHitsFrom);
790 }
791 {
792 BigInteger theHitsTo;
793 theHitsTo = this.getHitsTo();
794 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "hitsTo", theHitsTo), currentHashCode, theHitsTo);
795 }
796 {
797 BigInteger theHits;
798 theHits = this.getHits();
799 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "hits", theHits), currentHashCode, theHits);
800 }
801 {
802 String theDocumentVersion;
803 theDocumentVersion = this.getDocumentVersion();
804 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "documentVersion", theDocumentVersion), currentHashCode, theDocumentVersion);
805 }
806 {
807 String theWarning;
808 theWarning = this.getWarning();
809 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "warning", theWarning), currentHashCode, theWarning);
810 }
811 return currentHashCode;
812 }
813
814 public int hashCode() {
815 final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
816 return this.hashCode(null, strategy);
817 }
818
819 }