View Javadoc
1   //
2   // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
3   // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4   // Any modifications to this file will be lost upon recompilation of the source schema. 
5   // Generated on: 2017.04.23 at 07:22:12 PM CEST 
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   * <p>Java class for AssignmentData complex type.
48   * 
49   * <p>The following schema fragment specifies the expected content contained within this class.
50   * 
51   * <pre>
52   * &lt;complexType name="AssignmentData"&gt;
53   *   &lt;complexContent&gt;
54   *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
55   *       &lt;sequence&gt;
56   *         &lt;element name="organ_kod" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
57   *         &lt;element name="roll_kod" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
58   *         &lt;element name="ordningsnummer" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
59   *         &lt;element name="status" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
60   *         &lt;element name="typ" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
61   *         &lt;element name="from" type="{http://www.w3.org/2001/XMLSchema}date"/&gt;
62   *         &lt;element name="tom" type="{http://www.w3.org/2001/XMLSchema}date"/&gt;
63   *         &lt;element name="uppgift" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
64   *         &lt;element name="intressent_id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
65   *       &lt;/sequence&gt;
66   *     &lt;/restriction&gt;
67   *   &lt;/complexContent&gt;
68   * &lt;/complexType&gt;
69   * </pre>
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      * Gets the value of the orgCode property.
119      * 
120      * @return
121      *     possible object is
122      *     {@link String }
123      *     
124      */
125     @Basic
126     @Column(name = "ORG_CODE", length = 255)
127     public String getOrgCode() {
128         return orgCode;
129     }
130 
131     /**
132      * Sets the value of the orgCode property.
133      * 
134      * @param value
135      *     allowed object is
136      *     {@link String }
137      *     
138      */
139     public void setOrgCode(String value) {
140         this.orgCode = value;
141     }
142 
143     /**
144      * Gets the value of the roleCode property.
145      * 
146      * @return
147      *     possible object is
148      *     {@link String }
149      *     
150      */
151     @Basic
152     @Column(name = "ROLE_CODE", length = 255)
153     public String getRoleCode() {
154         return roleCode;
155     }
156 
157     /**
158      * Sets the value of the roleCode property.
159      * 
160      * @param value
161      *     allowed object is
162      *     {@link String }
163      *     
164      */
165     public void setRoleCode(String value) {
166         this.roleCode = value;
167     }
168 
169     /**
170      * Gets the value of the orderNumber property.
171      * 
172      * @return
173      *     possible object is
174      *     {@link String }
175      *     
176      */
177     @Basic
178     @Column(name = "ORDER_NUMBER", length = 255)
179     public String getOrderNumber() {
180         return orderNumber;
181     }
182 
183     /**
184      * Sets the value of the orderNumber property.
185      * 
186      * @param value
187      *     allowed object is
188      *     {@link String }
189      *     
190      */
191     public void setOrderNumber(String value) {
192         this.orderNumber = value;
193     }
194 
195     /**
196      * Gets the value of the status property.
197      * 
198      * @return
199      *     possible object is
200      *     {@link String }
201      *     
202      */
203     @Basic
204     @Column(name = "STATUS", length = 255)
205     public String getStatus() {
206         return status;
207     }
208 
209     /**
210      * Sets the value of the status property.
211      * 
212      * @param value
213      *     allowed object is
214      *     {@link String }
215      *     
216      */
217     public void setStatus(String value) {
218         this.status = value;
219     }
220 
221     /**
222      * Gets the value of the assignmentType property.
223      * 
224      * @return
225      *     possible object is
226      *     {@link String }
227      *     
228      */
229     @Basic
230     @Column(name = "ASSIGNMENT_TYPE", length = 255)
231     public String getAssignmentType() {
232         return assignmentType;
233     }
234 
235     /**
236      * Sets the value of the assignmentType property.
237      * 
238      * @param value
239      *     allowed object is
240      *     {@link String }
241      *     
242      */
243     public void setAssignmentType(String value) {
244         this.assignmentType = value;
245     }
246 
247     /**
248      * Gets the value of the fromDate property.
249      * 
250      * @return
251      *     possible object is
252      *     {@link String }
253      *     
254      */
255     @Basic
256     @Column(name = "FROM_DATE")
257     @Temporal(TemporalType.DATE)
258     public Date getFromDate() {
259         return fromDate;
260     }
261 
262     /**
263      * Sets the value of the fromDate property.
264      * 
265      * @param value
266      *     allowed object is
267      *     {@link String }
268      *     
269      */
270     public void setFromDate(Date value) {
271         this.fromDate = value;
272     }
273 
274     /**
275      * Gets the value of the toDate property.
276      * 
277      * @return
278      *     possible object is
279      *     {@link String }
280      *     
281      */
282     @Basic
283     @Column(name = "TO_DATE")
284     @Temporal(TemporalType.DATE)
285     public Date getToDate() {
286         return toDate;
287     }
288 
289     /**
290      * Sets the value of the toDate property.
291      * 
292      * @param value
293      *     allowed object is
294      *     {@link String }
295      *     
296      */
297     public void setToDate(Date value) {
298         this.toDate = value;
299     }
300 
301     /**
302      * Gets the value of the detail property.
303      * 
304      * @return
305      *     possible object is
306      *     {@link String }
307      *     
308      */
309     @Basic
310     @Column(name = "DETAIL", length = 65536)
311     public String getDetail() {
312         return detail;
313     }
314 
315     /**
316      * Sets the value of the detail property.
317      * 
318      * @param value
319      *     allowed object is
320      *     {@link String }
321      *     
322      */
323     public void setDetail(String value) {
324         this.detail = value;
325     }
326 
327     /**
328      * Gets the value of the intressentId property.
329      * 
330      * @return
331      *     possible object is
332      *     {@link String }
333      *     
334      */
335     @Basic
336     @Column(name = "INTRESSENT_ID", length = 255)
337     public String getIntressentId() {
338         return intressentId;
339     }
340 
341     /**
342      * Sets the value of the intressentId property.
343      * 
344      * @param value
345      *     allowed object is
346      *     {@link String }
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      * Gets the value of the hjid property.
463      * 
464      * @return
465      *     possible object is
466      *     {@link Long }
467      *     
468      */
469     @Id
470     @Column(name = "HJID")
471     @GeneratedValue(strategy = GenerationType.AUTO)
472     public Long getHjid() {
473         return hjid;
474     }
475 
476     /**
477      * Sets the value of the hjid property.
478      * 
479      * @param value
480      *     allowed object is
481      *     {@link Long }
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 }