1
2
3
4
5
6
7
8
9 package com.hack23.cia.model.external.riksdagen.person.impl;
10
11 import java.io.Serializable;
12 import java.util.Date;
13 import javax.persistence.Basic;
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.Table;
22 import javax.persistence.Temporal;
23 import javax.persistence.TemporalType;
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.XmlSchemaType;
29 import javax.xml.bind.annotation.XmlType;
30 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
31 import com.hack23.cia.model.common.api.ModelObject;
32 import org.jvnet.jaxb2_commons.lang.Equals;
33 import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
34 import org.jvnet.jaxb2_commons.lang.HashCode;
35 import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
36 import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
37 import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
38 import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
39 import org.jvnet.jaxb2_commons.lang.ToString;
40 import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
41 import org.jvnet.jaxb2_commons.locator.ObjectLocator;
42 import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
43 import org.w3._2001.xmlschema.Adapter3;
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
70
71
72
73 @XmlAccessorType(XmlAccessType.FIELD)
74 @XmlType(name = "AssignmentData", propOrder = {
75 "orgCode",
76 "roleCode",
77 "orderNumber",
78 "status",
79 "assignmentType",
80 "fromDate",
81 "toDate",
82 "detail",
83 "intressentId"
84 })
85 @Entity(name = "AssignmentData")
86 @Table(name = "ASSIGNMENT_DATA")
87 @Inheritance(strategy = InheritanceType.JOINED)
88 public class AssignmentData
89 implements Serializable, ModelObject, Equals, HashCode, ToString
90 {
91
92 @XmlElement(name = "organ_kod", required = true)
93 protected String orgCode;
94 @XmlElement(name = "roll_kod", required = true)
95 protected String roleCode;
96 @XmlElement(name = "ordningsnummer", required = true)
97 protected String orderNumber;
98 @XmlElement(required = true)
99 protected String status;
100 @XmlElement(name = "typ", required = true)
101 protected String assignmentType;
102 @XmlElement(name = "from", required = true, type = String.class)
103 @XmlJavaTypeAdapter(Adapter3 .class)
104 @XmlSchemaType(name = "date")
105 protected Date fromDate;
106 @XmlElement(name = "tom", required = true, type = String.class)
107 @XmlJavaTypeAdapter(Adapter3 .class)
108 @XmlSchemaType(name = "date")
109 protected Date toDate;
110 @XmlElement(name = "uppgift", required = true)
111 protected String detail;
112 @XmlElement(name = "intressent_id", required = true)
113 protected String intressentId;
114 @XmlAttribute(name = "Hjid")
115 protected Long hjid;
116
117
118
119
120
121
122
123
124
125 @Basic
126 @Column(name = "ORG_CODE", length = 255)
127 public String getOrgCode() {
128 return orgCode;
129 }
130
131
132
133
134
135
136
137
138
139 public void setOrgCode(String value) {
140 this.orgCode = value;
141 }
142
143
144
145
146
147
148
149
150
151 @Basic
152 @Column(name = "ROLE_CODE", length = 255)
153 public String getRoleCode() {
154 return roleCode;
155 }
156
157
158
159
160
161
162
163
164
165 public void setRoleCode(String value) {
166 this.roleCode = value;
167 }
168
169
170
171
172
173
174
175
176
177 @Basic
178 @Column(name = "ORDER_NUMBER", length = 255)
179 public String getOrderNumber() {
180 return orderNumber;
181 }
182
183
184
185
186
187
188
189
190
191 public void setOrderNumber(String value) {
192 this.orderNumber = value;
193 }
194
195
196
197
198
199
200
201
202
203 @Basic
204 @Column(name = "STATUS", length = 255)
205 public String getStatus() {
206 return status;
207 }
208
209
210
211
212
213
214
215
216
217 public void setStatus(String value) {
218 this.status = value;
219 }
220
221
222
223
224
225
226
227
228
229 @Basic
230 @Column(name = "ASSIGNMENT_TYPE", length = 255)
231 public String getAssignmentType() {
232 return assignmentType;
233 }
234
235
236
237
238
239
240
241
242
243 public void setAssignmentType(String value) {
244 this.assignmentType = value;
245 }
246
247
248
249
250
251
252
253
254
255 @Basic
256 @Column(name = "FROM_DATE")
257 @Temporal(TemporalType.DATE)
258 public Date getFromDate() {
259 return fromDate;
260 }
261
262
263
264
265
266
267
268
269
270 public void setFromDate(Date value) {
271 this.fromDate = value;
272 }
273
274
275
276
277
278
279
280
281
282 @Basic
283 @Column(name = "TO_DATE")
284 @Temporal(TemporalType.DATE)
285 public Date getToDate() {
286 return toDate;
287 }
288
289
290
291
292
293
294
295
296
297 public void setToDate(Date value) {
298 this.toDate = value;
299 }
300
301
302
303
304
305
306
307
308
309 @Basic
310 @Column(name = "DETAIL", length = 65536)
311 public String getDetail() {
312 return detail;
313 }
314
315
316
317
318
319
320
321
322
323 public void setDetail(String value) {
324 this.detail = value;
325 }
326
327
328
329
330
331
332
333
334
335 @Basic
336 @Column(name = "INTRESSENT_ID", length = 255)
337 public String getIntressentId() {
338 return intressentId;
339 }
340
341
342
343
344
345
346
347
348
349 public void setIntressentId(String value) {
350 this.intressentId = value;
351 }
352
353 public AssignmentData withOrgCode(String value) {
354 setOrgCode(value);
355 return this;
356 }
357
358 public AssignmentData withRoleCode(String value) {
359 setRoleCode(value);
360 return this;
361 }
362
363 public AssignmentData withOrderNumber(String value) {
364 setOrderNumber(value);
365 return this;
366 }
367
368 public AssignmentData withStatus(String value) {
369 setStatus(value);
370 return this;
371 }
372
373 public AssignmentData withAssignmentType(String value) {
374 setAssignmentType(value);
375 return this;
376 }
377
378 public AssignmentData withFromDate(Date value) {
379 setFromDate(value);
380 return this;
381 }
382
383 public AssignmentData withToDate(Date value) {
384 setToDate(value);
385 return this;
386 }
387
388 public AssignmentData withDetail(String value) {
389 setDetail(value);
390 return this;
391 }
392
393 public AssignmentData withIntressentId(String value) {
394 setIntressentId(value);
395 return this;
396 }
397
398 public String toString() {
399 final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
400 final StringBuilder buffer = new StringBuilder();
401 append(null, buffer, strategy);
402 return buffer.toString();
403 }
404
405 public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
406 strategy.appendStart(locator, this, buffer);
407 appendFields(locator, buffer, strategy);
408 strategy.appendEnd(locator, this, buffer);
409 return buffer;
410 }
411
412 public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
413 {
414 String theOrgCode;
415 theOrgCode = this.getOrgCode();
416 strategy.appendField(locator, this, "orgCode", buffer, theOrgCode);
417 }
418 {
419 String theRoleCode;
420 theRoleCode = this.getRoleCode();
421 strategy.appendField(locator, this, "roleCode", buffer, theRoleCode);
422 }
423 {
424 String theOrderNumber;
425 theOrderNumber = this.getOrderNumber();
426 strategy.appendField(locator, this, "orderNumber", buffer, theOrderNumber);
427 }
428 {
429 String theStatus;
430 theStatus = this.getStatus();
431 strategy.appendField(locator, this, "status", buffer, theStatus);
432 }
433 {
434 String theAssignmentType;
435 theAssignmentType = this.getAssignmentType();
436 strategy.appendField(locator, this, "assignmentType", buffer, theAssignmentType);
437 }
438 {
439 Date theFromDate;
440 theFromDate = this.getFromDate();
441 strategy.appendField(locator, this, "fromDate", buffer, theFromDate);
442 }
443 {
444 Date theToDate;
445 theToDate = this.getToDate();
446 strategy.appendField(locator, this, "toDate", buffer, theToDate);
447 }
448 {
449 String theDetail;
450 theDetail = this.getDetail();
451 strategy.appendField(locator, this, "detail", buffer, theDetail);
452 }
453 {
454 String theIntressentId;
455 theIntressentId = this.getIntressentId();
456 strategy.appendField(locator, this, "intressentId", buffer, theIntressentId);
457 }
458 return buffer;
459 }
460
461
462
463
464
465
466
467
468
469 @Id
470 @Column(name = "HJID")
471 @GeneratedValue(strategy = GenerationType.AUTO)
472 public Long getHjid() {
473 return hjid;
474 }
475
476
477
478
479
480
481
482
483
484 public void setHjid(Long value) {
485 this.hjid = value;
486 }
487
488 public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
489 if ((object == null)||(this.getClass()!= object.getClass())) {
490 return false;
491 }
492 if (this == object) {
493 return true;
494 }
495 final AssignmentData that = ((AssignmentData) object);
496 {
497 String lhsOrgCode;
498 lhsOrgCode = this.getOrgCode();
499 String rhsOrgCode;
500 rhsOrgCode = that.getOrgCode();
501 if (!strategy.equals(LocatorUtils.property(thisLocator, "orgCode", lhsOrgCode), LocatorUtils.property(thatLocator, "orgCode", rhsOrgCode), lhsOrgCode, rhsOrgCode)) {
502 return false;
503 }
504 }
505 {
506 String lhsRoleCode;
507 lhsRoleCode = this.getRoleCode();
508 String rhsRoleCode;
509 rhsRoleCode = that.getRoleCode();
510 if (!strategy.equals(LocatorUtils.property(thisLocator, "roleCode", lhsRoleCode), LocatorUtils.property(thatLocator, "roleCode", rhsRoleCode), lhsRoleCode, rhsRoleCode)) {
511 return false;
512 }
513 }
514 {
515 String lhsOrderNumber;
516 lhsOrderNumber = this.getOrderNumber();
517 String rhsOrderNumber;
518 rhsOrderNumber = that.getOrderNumber();
519 if (!strategy.equals(LocatorUtils.property(thisLocator, "orderNumber", lhsOrderNumber), LocatorUtils.property(thatLocator, "orderNumber", rhsOrderNumber), lhsOrderNumber, rhsOrderNumber)) {
520 return false;
521 }
522 }
523 {
524 String lhsStatus;
525 lhsStatus = this.getStatus();
526 String rhsStatus;
527 rhsStatus = that.getStatus();
528 if (!strategy.equals(LocatorUtils.property(thisLocator, "status", lhsStatus), LocatorUtils.property(thatLocator, "status", rhsStatus), lhsStatus, rhsStatus)) {
529 return false;
530 }
531 }
532 {
533 String lhsAssignmentType;
534 lhsAssignmentType = this.getAssignmentType();
535 String rhsAssignmentType;
536 rhsAssignmentType = that.getAssignmentType();
537 if (!strategy.equals(LocatorUtils.property(thisLocator, "assignmentType", lhsAssignmentType), LocatorUtils.property(thatLocator, "assignmentType", rhsAssignmentType), lhsAssignmentType, rhsAssignmentType)) {
538 return false;
539 }
540 }
541 {
542 Date lhsFromDate;
543 lhsFromDate = this.getFromDate();
544 Date rhsFromDate;
545 rhsFromDate = that.getFromDate();
546 if (!strategy.equals(LocatorUtils.property(thisLocator, "fromDate", lhsFromDate), LocatorUtils.property(thatLocator, "fromDate", rhsFromDate), lhsFromDate, rhsFromDate)) {
547 return false;
548 }
549 }
550 {
551 Date lhsToDate;
552 lhsToDate = this.getToDate();
553 Date rhsToDate;
554 rhsToDate = that.getToDate();
555 if (!strategy.equals(LocatorUtils.property(thisLocator, "toDate", lhsToDate), LocatorUtils.property(thatLocator, "toDate", rhsToDate), lhsToDate, rhsToDate)) {
556 return false;
557 }
558 }
559 {
560 String lhsDetail;
561 lhsDetail = this.getDetail();
562 String rhsDetail;
563 rhsDetail = that.getDetail();
564 if (!strategy.equals(LocatorUtils.property(thisLocator, "detail", lhsDetail), LocatorUtils.property(thatLocator, "detail", rhsDetail), lhsDetail, rhsDetail)) {
565 return false;
566 }
567 }
568 {
569 String lhsIntressentId;
570 lhsIntressentId = this.getIntressentId();
571 String rhsIntressentId;
572 rhsIntressentId = that.getIntressentId();
573 if (!strategy.equals(LocatorUtils.property(thisLocator, "intressentId", lhsIntressentId), LocatorUtils.property(thatLocator, "intressentId", rhsIntressentId), lhsIntressentId, rhsIntressentId)) {
574 return false;
575 }
576 }
577 return true;
578 }
579
580 public boolean equals(Object object) {
581 final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
582 return equals(null, null, object, strategy);
583 }
584
585 public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
586 int currentHashCode = 1;
587 {
588 String theOrgCode;
589 theOrgCode = this.getOrgCode();
590 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "orgCode", theOrgCode), currentHashCode, theOrgCode);
591 }
592 {
593 String theRoleCode;
594 theRoleCode = this.getRoleCode();
595 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "roleCode", theRoleCode), currentHashCode, theRoleCode);
596 }
597 {
598 String theOrderNumber;
599 theOrderNumber = this.getOrderNumber();
600 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "orderNumber", theOrderNumber), currentHashCode, theOrderNumber);
601 }
602 {
603 String theStatus;
604 theStatus = this.getStatus();
605 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus);
606 }
607 {
608 String theAssignmentType;
609 theAssignmentType = this.getAssignmentType();
610 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "assignmentType", theAssignmentType), currentHashCode, theAssignmentType);
611 }
612 {
613 Date theFromDate;
614 theFromDate = this.getFromDate();
615 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "fromDate", theFromDate), currentHashCode, theFromDate);
616 }
617 {
618 Date theToDate;
619 theToDate = this.getToDate();
620 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "toDate", theToDate), currentHashCode, theToDate);
621 }
622 {
623 String theDetail;
624 theDetail = this.getDetail();
625 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "detail", theDetail), currentHashCode, theDetail);
626 }
627 {
628 String theIntressentId;
629 theIntressentId = this.getIntressentId();
630 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "intressentId", theIntressentId), currentHashCode, theIntressentId);
631 }
632 return currentHashCode;
633 }
634
635 public int hashCode() {
636 final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
637 return this.hashCode(null, strategy);
638 }
639
640 }