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:23:18 PM CEST 
6   //
7   
8   
9   package com.hack23.cia.model.internal.application.data.party.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.Id;
17  import javax.persistence.Inheritance;
18  import javax.persistence.InheritanceType;
19  import javax.persistence.Table;
20  import javax.persistence.Temporal;
21  import javax.persistence.TemporalType;
22  import javax.xml.bind.annotation.XmlAccessType;
23  import javax.xml.bind.annotation.XmlAccessorType;
24  import javax.xml.bind.annotation.XmlElement;
25  import javax.xml.bind.annotation.XmlSchemaType;
26  import javax.xml.bind.annotation.XmlType;
27  import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
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  import org.w3._2001.xmlschema.Adapter3;
41  
42  
43  /**
44   * <p>Java class for ViewRiksdagenParty complex type.
45   * 
46   * <p>The following schema fragment specifies the expected content contained within this class.
47   * 
48   * <pre>
49   * &lt;complexType name="ViewRiksdagenParty"&gt;
50   *   &lt;complexContent&gt;
51   *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
52   *       &lt;sequence&gt;
53   *         &lt;element name="partyId" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
54   *         &lt;element name="partyNumber" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
55   *         &lt;element name="partyName" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
56   *         &lt;element name="headCount" type="{http://www.w3.org/2001/XMLSchema}long"/&gt;
57   *         &lt;element name="website" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
58   *         &lt;element name="registeredDate" type="{http://www.w3.org/2001/XMLSchema}date"/&gt;
59   *       &lt;/sequence&gt;
60   *     &lt;/restriction&gt;
61   *   &lt;/complexContent&gt;
62   * &lt;/complexType&gt;
63   * </pre>
64   * 
65   * 
66   */
67  @XmlAccessorType(XmlAccessType.FIELD)
68  @XmlType(name = "ViewRiksdagenParty", propOrder = {
69      "partyId",
70      "partyNumber",
71      "partyName",
72      "headCount",
73      "website",
74      "registeredDate"
75  })
76  @Entity(name = "ViewRiksdagenParty")
77  @Table(name = "VIEW_RIKSDAGEN_PARTY")
78  @Inheritance(strategy = InheritanceType.JOINED)
79  public class ViewRiksdagenParty
80      implements Serializable, ModelObject, Equals, HashCode, ToString
81  {
82  
83      private final static long serialVersionUID = 1L;
84      @XmlElement(required = true)
85      protected String partyId;
86      @XmlElement(required = true)
87      protected String partyNumber;
88      @XmlElement(required = true)
89      protected String partyName;
90      protected long headCount;
91      @XmlElement(required = true)
92      protected String website;
93      @XmlElement(required = true, type = String.class)
94      @XmlJavaTypeAdapter(Adapter3 .class)
95      @XmlSchemaType(name = "date")
96      protected Date registeredDate;
97  
98      /**
99       * Gets the value of the partyId property.
100      * 
101      * @return
102      *     possible object is
103      *     {@link String }
104      *     
105      */
106     @Id
107     @Column(name = "PARTY_ID")
108     public String getPartyId() {
109         return partyId;
110     }
111 
112     /**
113      * Sets the value of the partyId property.
114      * 
115      * @param value
116      *     allowed object is
117      *     {@link String }
118      *     
119      */
120     public void setPartyId(String value) {
121         this.partyId = value;
122     }
123 
124     /**
125      * Gets the value of the partyNumber property.
126      * 
127      * @return
128      *     possible object is
129      *     {@link String }
130      *     
131      */
132     @Basic
133     @Column(name = "PARTY_NUMBER", length = 255)
134     public String getPartyNumber() {
135         return partyNumber;
136     }
137 
138     /**
139      * Sets the value of the partyNumber property.
140      * 
141      * @param value
142      *     allowed object is
143      *     {@link String }
144      *     
145      */
146     public void setPartyNumber(String value) {
147         this.partyNumber = value;
148     }
149 
150     /**
151      * Gets the value of the partyName property.
152      * 
153      * @return
154      *     possible object is
155      *     {@link String }
156      *     
157      */
158     @Basic
159     @Column(name = "PARTY_NAME", length = 255)
160     public String getPartyName() {
161         return partyName;
162     }
163 
164     /**
165      * Sets the value of the partyName property.
166      * 
167      * @param value
168      *     allowed object is
169      *     {@link String }
170      *     
171      */
172     public void setPartyName(String value) {
173         this.partyName = value;
174     }
175 
176     /**
177      * Gets the value of the headCount property.
178      * 
179      */
180     @Basic
181     @Column(name = "HEAD_COUNT", precision = 20, scale = 0)
182     public long getHeadCount() {
183         return headCount;
184     }
185 
186     /**
187      * Sets the value of the headCount property.
188      * 
189      */
190     public void setHeadCount(long value) {
191         this.headCount = value;
192     }
193 
194     /**
195      * Gets the value of the website property.
196      * 
197      * @return
198      *     possible object is
199      *     {@link String }
200      *     
201      */
202     @Basic
203     @Column(name = "WEBSITE", length = 255)
204     public String getWebsite() {
205         return website;
206     }
207 
208     /**
209      * Sets the value of the website property.
210      * 
211      * @param value
212      *     allowed object is
213      *     {@link String }
214      *     
215      */
216     public void setWebsite(String value) {
217         this.website = value;
218     }
219 
220     /**
221      * Gets the value of the registeredDate property.
222      * 
223      * @return
224      *     possible object is
225      *     {@link String }
226      *     
227      */
228     @Basic
229     @Column(name = "REGISTERED_DATE")
230     @Temporal(TemporalType.DATE)
231     public Date getRegisteredDate() {
232         return registeredDate;
233     }
234 
235     /**
236      * Sets the value of the registeredDate property.
237      * 
238      * @param value
239      *     allowed object is
240      *     {@link String }
241      *     
242      */
243     public void setRegisteredDate(Date value) {
244         this.registeredDate = value;
245     }
246 
247     public ViewRiksdagenParty withPartyId(String value) {
248         setPartyId(value);
249         return this;
250     }
251 
252     public ViewRiksdagenParty withPartyNumber(String value) {
253         setPartyNumber(value);
254         return this;
255     }
256 
257     public ViewRiksdagenParty withPartyName(String value) {
258         setPartyName(value);
259         return this;
260     }
261 
262     public ViewRiksdagenParty withHeadCount(long value) {
263         setHeadCount(value);
264         return this;
265     }
266 
267     public ViewRiksdagenParty withWebsite(String value) {
268         setWebsite(value);
269         return this;
270     }
271 
272     public ViewRiksdagenParty withRegisteredDate(Date value) {
273         setRegisteredDate(value);
274         return this;
275     }
276 
277     public String toString() {
278         final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
279         final StringBuilder buffer = new StringBuilder();
280         append(null, buffer, strategy);
281         return buffer.toString();
282     }
283 
284     public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
285         strategy.appendStart(locator, this, buffer);
286         appendFields(locator, buffer, strategy);
287         strategy.appendEnd(locator, this, buffer);
288         return buffer;
289     }
290 
291     public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
292         {
293             String thePartyId;
294             thePartyId = this.getPartyId();
295             strategy.appendField(locator, this, "partyId", buffer, thePartyId);
296         }
297         {
298             String thePartyNumber;
299             thePartyNumber = this.getPartyNumber();
300             strategy.appendField(locator, this, "partyNumber", buffer, thePartyNumber);
301         }
302         {
303             String thePartyName;
304             thePartyName = this.getPartyName();
305             strategy.appendField(locator, this, "partyName", buffer, thePartyName);
306         }
307         {
308             long theHeadCount;
309             theHeadCount = this.getHeadCount();
310             strategy.appendField(locator, this, "headCount", buffer, theHeadCount);
311         }
312         {
313             String theWebsite;
314             theWebsite = this.getWebsite();
315             strategy.appendField(locator, this, "website", buffer, theWebsite);
316         }
317         {
318             Date theRegisteredDate;
319             theRegisteredDate = this.getRegisteredDate();
320             strategy.appendField(locator, this, "registeredDate", buffer, theRegisteredDate);
321         }
322         return buffer;
323     }
324 
325     public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
326         if ((object == null)||(this.getClass()!= object.getClass())) {
327             return false;
328         }
329         if (this == object) {
330             return true;
331         }
332         final ViewRiksdagenParty that = ((ViewRiksdagenParty) object);
333         {
334             String lhsPartyId;
335             lhsPartyId = this.getPartyId();
336             String rhsPartyId;
337             rhsPartyId = that.getPartyId();
338             if (!strategy.equals(LocatorUtils.property(thisLocator, "partyId", lhsPartyId), LocatorUtils.property(thatLocator, "partyId", rhsPartyId), lhsPartyId, rhsPartyId)) {
339                 return false;
340             }
341         }
342         {
343             String lhsPartyNumber;
344             lhsPartyNumber = this.getPartyNumber();
345             String rhsPartyNumber;
346             rhsPartyNumber = that.getPartyNumber();
347             if (!strategy.equals(LocatorUtils.property(thisLocator, "partyNumber", lhsPartyNumber), LocatorUtils.property(thatLocator, "partyNumber", rhsPartyNumber), lhsPartyNumber, rhsPartyNumber)) {
348                 return false;
349             }
350         }
351         {
352             String lhsPartyName;
353             lhsPartyName = this.getPartyName();
354             String rhsPartyName;
355             rhsPartyName = that.getPartyName();
356             if (!strategy.equals(LocatorUtils.property(thisLocator, "partyName", lhsPartyName), LocatorUtils.property(thatLocator, "partyName", rhsPartyName), lhsPartyName, rhsPartyName)) {
357                 return false;
358             }
359         }
360         {
361             long lhsHeadCount;
362             lhsHeadCount = this.getHeadCount();
363             long rhsHeadCount;
364             rhsHeadCount = that.getHeadCount();
365             if (!strategy.equals(LocatorUtils.property(thisLocator, "headCount", lhsHeadCount), LocatorUtils.property(thatLocator, "headCount", rhsHeadCount), lhsHeadCount, rhsHeadCount)) {
366                 return false;
367             }
368         }
369         {
370             String lhsWebsite;
371             lhsWebsite = this.getWebsite();
372             String rhsWebsite;
373             rhsWebsite = that.getWebsite();
374             if (!strategy.equals(LocatorUtils.property(thisLocator, "website", lhsWebsite), LocatorUtils.property(thatLocator, "website", rhsWebsite), lhsWebsite, rhsWebsite)) {
375                 return false;
376             }
377         }
378         {
379             Date lhsRegisteredDate;
380             lhsRegisteredDate = this.getRegisteredDate();
381             Date rhsRegisteredDate;
382             rhsRegisteredDate = that.getRegisteredDate();
383             if (!strategy.equals(LocatorUtils.property(thisLocator, "registeredDate", lhsRegisteredDate), LocatorUtils.property(thatLocator, "registeredDate", rhsRegisteredDate), lhsRegisteredDate, rhsRegisteredDate)) {
384                 return false;
385             }
386         }
387         return true;
388     }
389 
390     public boolean equals(Object object) {
391         final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
392         return equals(null, null, object, strategy);
393     }
394 
395     public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
396         int currentHashCode = 1;
397         {
398             String thePartyId;
399             thePartyId = this.getPartyId();
400             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "partyId", thePartyId), currentHashCode, thePartyId);
401         }
402         {
403             String thePartyNumber;
404             thePartyNumber = this.getPartyNumber();
405             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "partyNumber", thePartyNumber), currentHashCode, thePartyNumber);
406         }
407         {
408             String thePartyName;
409             thePartyName = this.getPartyName();
410             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "partyName", thePartyName), currentHashCode, thePartyName);
411         }
412         {
413             long theHeadCount;
414             theHeadCount = this.getHeadCount();
415             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "headCount", theHeadCount), currentHashCode, theHeadCount);
416         }
417         {
418             String theWebsite;
419             theWebsite = this.getWebsite();
420             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "website", theWebsite), currentHashCode, theWebsite);
421         }
422         {
423             Date theRegisteredDate;
424             theRegisteredDate = this.getRegisteredDate();
425             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "registeredDate", theRegisteredDate), currentHashCode, theRegisteredDate);
426         }
427         return currentHashCode;
428     }
429 
430     public int hashCode() {
431         final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
432         return this.hashCode(null, strategy);
433     }
434 
435 }