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.impl;
10  
11  import java.io.Serializable;
12  import javax.persistence.AttributeOverride;
13  import javax.persistence.AttributeOverrides;
14  import javax.persistence.Basic;
15  import javax.persistence.Column;
16  import javax.persistence.EmbeddedId;
17  import javax.persistence.Entity;
18  import javax.persistence.Inheritance;
19  import javax.persistence.InheritanceType;
20  import javax.persistence.Table;
21  import javax.xml.bind.annotation.XmlAccessType;
22  import javax.xml.bind.annotation.XmlAccessorType;
23  import javax.xml.bind.annotation.XmlElement;
24  import javax.xml.bind.annotation.XmlType;
25  import com.hack23.cia.model.common.api.ModelObject;
26  import org.jvnet.jaxb2_commons.lang.Equals;
27  import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
28  import org.jvnet.jaxb2_commons.lang.HashCode;
29  import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
30  import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
31  import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
32  import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
33  import org.jvnet.jaxb2_commons.lang.ToString;
34  import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
35  import org.jvnet.jaxb2_commons.locator.ObjectLocator;
36  import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
37  
38  
39  /**
40   * <p>Java class for ViewWorldbankIndicatorDataCountrySummary complex type.
41   * 
42   * <p>The following schema fragment specifies the expected content contained within this class.
43   * 
44   * <pre>
45   * &lt;complexType name="ViewWorldbankIndicatorDataCountrySummary"&gt;
46   *   &lt;complexContent&gt;
47   *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
48   *       &lt;sequence&gt;
49   *         &lt;element name="embeddedId" type="{http://data.application.internal.model.cia.hack23.com/impl}WorldbankIndicatorDataCountrySummaryEmbeddedId"/&gt;
50   *         &lt;element name="indicator_name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
51   *         &lt;element name="source_note" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
52   *         &lt;element name="source_value" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
53   *         &lt;element name="source_organization" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
54   *         &lt;element name="start_year" type="{http://www.w3.org/2001/XMLSchema}int"/&gt;
55   *         &lt;element name="end_year" type="{http://www.w3.org/2001/XMLSchema}int"/&gt;
56   *         &lt;element name="data_point" type="{http://www.w3.org/2001/XMLSchema}long"/&gt;
57   *         &lt;element name="topics" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
58   *       &lt;/sequence&gt;
59   *     &lt;/restriction&gt;
60   *   &lt;/complexContent&gt;
61   * &lt;/complexType&gt;
62   * </pre>
63   * 
64   * 
65   */
66  @XmlAccessorType(XmlAccessType.FIELD)
67  @XmlType(name = "ViewWorldbankIndicatorDataCountrySummary", propOrder = {
68      "embeddedId",
69      "indicatorName",
70      "sourceNote",
71      "sourceValue",
72      "sourceOrganization",
73      "startYear",
74      "endYear",
75      "dataPoint",
76      "topics"
77  })
78  @Entity(name = "ViewWorldbankIndicatorDataCountrySummary")
79  @Table(name = "view_worldbank_indicator_data_country_summary")
80  @Inheritance(strategy = InheritanceType.JOINED)
81  public class ViewWorldbankIndicatorDataCountrySummary
82      implements Serializable, ModelObject, Equals, HashCode, ToString
83  {
84  
85      private final static long serialVersionUID = 1L;
86      @XmlElement(required = true)
87      protected WorldbankIndicatorDataCountrySummaryEmbeddedId embeddedId;
88      @XmlElement(name = "indicator_name", required = true)
89      protected String indicatorName;
90      @XmlElement(name = "source_note", required = true)
91      protected String sourceNote;
92      @XmlElement(name = "source_value", required = true)
93      protected String sourceValue;
94      @XmlElement(name = "source_organization", required = true)
95      protected String sourceOrganization;
96      @XmlElement(name = "start_year", required = true, type = Integer.class, nillable = true)
97      protected Integer startYear;
98      @XmlElement(name = "end_year", required = true, type = Integer.class, nillable = true)
99      protected Integer endYear;
100     @XmlElement(name = "data_point")
101     protected long dataPoint;
102     @XmlElement(required = true)
103     protected String topics;
104 
105     /**
106      * Gets the value of the embeddedId property.
107      * 
108      * @return
109      *     possible object is
110      *     {@link WorldbankIndicatorDataCountrySummaryEmbeddedId }
111      *     
112      */
113     @EmbeddedId
114     @AttributeOverrides({
115         @AttributeOverride(name = "indicatorId", column = @Column(name = "EMBEDDED_ID_INDICATOR_ID", length = 255)),
116         @AttributeOverride(name = "countryId", column = @Column(name = "EMBEDDED_ID_COUNTRY_ID", length = 255))
117     })
118     public WorldbankIndicatorDataCountrySummaryEmbeddedId getEmbeddedId() {
119         return embeddedId;
120     }
121 
122     /**
123      * Sets the value of the embeddedId property.
124      * 
125      * @param value
126      *     allowed object is
127      *     {@link WorldbankIndicatorDataCountrySummaryEmbeddedId }
128      *     
129      */
130     public void setEmbeddedId(WorldbankIndicatorDataCountrySummaryEmbeddedId value) {
131         this.embeddedId = value;
132     }
133 
134     /**
135      * Gets the value of the indicatorName property.
136      * 
137      * @return
138      *     possible object is
139      *     {@link String }
140      *     
141      */
142     @Basic
143     @Column(name = "INDICATOR_NAME", length = 255)
144     public String getIndicatorName() {
145         return indicatorName;
146     }
147 
148     /**
149      * Sets the value of the indicatorName property.
150      * 
151      * @param value
152      *     allowed object is
153      *     {@link String }
154      *     
155      */
156     public void setIndicatorName(String value) {
157         this.indicatorName = value;
158     }
159 
160     /**
161      * Gets the value of the sourceNote property.
162      * 
163      * @return
164      *     possible object is
165      *     {@link String }
166      *     
167      */
168     @Basic
169     @Column(name = "SOURCE_NOTE", length = 255)
170     public String getSourceNote() {
171         return sourceNote;
172     }
173 
174     /**
175      * Sets the value of the sourceNote property.
176      * 
177      * @param value
178      *     allowed object is
179      *     {@link String }
180      *     
181      */
182     public void setSourceNote(String value) {
183         this.sourceNote = value;
184     }
185 
186     /**
187      * Gets the value of the sourceValue property.
188      * 
189      * @return
190      *     possible object is
191      *     {@link String }
192      *     
193      */
194     @Basic
195     @Column(name = "SOURCE_VALUE", length = 255)
196     public String getSourceValue() {
197         return sourceValue;
198     }
199 
200     /**
201      * Sets the value of the sourceValue property.
202      * 
203      * @param value
204      *     allowed object is
205      *     {@link String }
206      *     
207      */
208     public void setSourceValue(String value) {
209         this.sourceValue = value;
210     }
211 
212     /**
213      * Gets the value of the sourceOrganization property.
214      * 
215      * @return
216      *     possible object is
217      *     {@link String }
218      *     
219      */
220     @Basic
221     @Column(name = "SOURCE_ORGANIZATION", length = 255)
222     public String getSourceOrganization() {
223         return sourceOrganization;
224     }
225 
226     /**
227      * Sets the value of the sourceOrganization property.
228      * 
229      * @param value
230      *     allowed object is
231      *     {@link String }
232      *     
233      */
234     public void setSourceOrganization(String value) {
235         this.sourceOrganization = value;
236     }
237 
238     /**
239      * Gets the value of the startYear property.
240      * 
241      * @return
242      *     possible object is
243      *     {@link Integer }
244      *     
245      */
246     @Basic
247     @Column(name = "START_YEAR", precision = 10, scale = 0)
248     public Integer getStartYear() {
249         return startYear;
250     }
251 
252     /**
253      * Sets the value of the startYear property.
254      * 
255      * @param value
256      *     allowed object is
257      *     {@link Integer }
258      *     
259      */
260     public void setStartYear(Integer value) {
261         this.startYear = value;
262     }
263 
264     /**
265      * Gets the value of the endYear property.
266      * 
267      * @return
268      *     possible object is
269      *     {@link Integer }
270      *     
271      */
272     @Basic
273     @Column(name = "END_YEAR", precision = 10, scale = 0)
274     public Integer getEndYear() {
275         return endYear;
276     }
277 
278     /**
279      * Sets the value of the endYear property.
280      * 
281      * @param value
282      *     allowed object is
283      *     {@link Integer }
284      *     
285      */
286     public void setEndYear(Integer value) {
287         this.endYear = value;
288     }
289 
290     /**
291      * Gets the value of the dataPoint property.
292      * 
293      */
294     @Basic
295     @Column(name = "DATA_POINT", precision = 20, scale = 0)
296     public long getDataPoint() {
297         return dataPoint;
298     }
299 
300     /**
301      * Sets the value of the dataPoint property.
302      * 
303      */
304     public void setDataPoint(long value) {
305         this.dataPoint = value;
306     }
307 
308     /**
309      * Gets the value of the topics property.
310      * 
311      * @return
312      *     possible object is
313      *     {@link String }
314      *     
315      */
316     @Basic
317     @Column(name = "TOPICS", length = 255)
318     public String getTopics() {
319         return topics;
320     }
321 
322     /**
323      * Sets the value of the topics property.
324      * 
325      * @param value
326      *     allowed object is
327      *     {@link String }
328      *     
329      */
330     public void setTopics(String value) {
331         this.topics = value;
332     }
333 
334     public ViewWorldbankIndicatorDataCountrySummary withEmbeddedId(WorldbankIndicatorDataCountrySummaryEmbeddedId value) {
335         setEmbeddedId(value);
336         return this;
337     }
338 
339     public ViewWorldbankIndicatorDataCountrySummary withIndicatorName(String value) {
340         setIndicatorName(value);
341         return this;
342     }
343 
344     public ViewWorldbankIndicatorDataCountrySummary withSourceNote(String value) {
345         setSourceNote(value);
346         return this;
347     }
348 
349     public ViewWorldbankIndicatorDataCountrySummary withSourceValue(String value) {
350         setSourceValue(value);
351         return this;
352     }
353 
354     public ViewWorldbankIndicatorDataCountrySummary withSourceOrganization(String value) {
355         setSourceOrganization(value);
356         return this;
357     }
358 
359     public ViewWorldbankIndicatorDataCountrySummary withStartYear(Integer value) {
360         setStartYear(value);
361         return this;
362     }
363 
364     public ViewWorldbankIndicatorDataCountrySummary withEndYear(Integer value) {
365         setEndYear(value);
366         return this;
367     }
368 
369     public ViewWorldbankIndicatorDataCountrySummary withDataPoint(long value) {
370         setDataPoint(value);
371         return this;
372     }
373 
374     public ViewWorldbankIndicatorDataCountrySummary withTopics(String value) {
375         setTopics(value);
376         return this;
377     }
378 
379     public String toString() {
380         final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
381         final StringBuilder buffer = new StringBuilder();
382         append(null, buffer, strategy);
383         return buffer.toString();
384     }
385 
386     public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
387         strategy.appendStart(locator, this, buffer);
388         appendFields(locator, buffer, strategy);
389         strategy.appendEnd(locator, this, buffer);
390         return buffer;
391     }
392 
393     public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
394         {
395             WorldbankIndicatorDataCountrySummaryEmbeddedId theEmbeddedId;
396             theEmbeddedId = this.getEmbeddedId();
397             strategy.appendField(locator, this, "embeddedId", buffer, theEmbeddedId);
398         }
399         {
400             String theIndicatorName;
401             theIndicatorName = this.getIndicatorName();
402             strategy.appendField(locator, this, "indicatorName", buffer, theIndicatorName);
403         }
404         {
405             String theSourceNote;
406             theSourceNote = this.getSourceNote();
407             strategy.appendField(locator, this, "sourceNote", buffer, theSourceNote);
408         }
409         {
410             String theSourceValue;
411             theSourceValue = this.getSourceValue();
412             strategy.appendField(locator, this, "sourceValue", buffer, theSourceValue);
413         }
414         {
415             String theSourceOrganization;
416             theSourceOrganization = this.getSourceOrganization();
417             strategy.appendField(locator, this, "sourceOrganization", buffer, theSourceOrganization);
418         }
419         {
420             Integer theStartYear;
421             theStartYear = this.getStartYear();
422             strategy.appendField(locator, this, "startYear", buffer, theStartYear);
423         }
424         {
425             Integer theEndYear;
426             theEndYear = this.getEndYear();
427             strategy.appendField(locator, this, "endYear", buffer, theEndYear);
428         }
429         {
430             long theDataPoint;
431             theDataPoint = this.getDataPoint();
432             strategy.appendField(locator, this, "dataPoint", buffer, theDataPoint);
433         }
434         {
435             String theTopics;
436             theTopics = this.getTopics();
437             strategy.appendField(locator, this, "topics", buffer, theTopics);
438         }
439         return buffer;
440     }
441 
442     public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
443         if ((object == null)||(this.getClass()!= object.getClass())) {
444             return false;
445         }
446         if (this == object) {
447             return true;
448         }
449         final ViewWorldbankIndicatorDataCountrySummary that = ((ViewWorldbankIndicatorDataCountrySummary) object);
450         {
451             WorldbankIndicatorDataCountrySummaryEmbeddedId lhsEmbeddedId;
452             lhsEmbeddedId = this.getEmbeddedId();
453             WorldbankIndicatorDataCountrySummaryEmbeddedId rhsEmbeddedId;
454             rhsEmbeddedId = that.getEmbeddedId();
455             if (!strategy.equals(LocatorUtils.property(thisLocator, "embeddedId", lhsEmbeddedId), LocatorUtils.property(thatLocator, "embeddedId", rhsEmbeddedId), lhsEmbeddedId, rhsEmbeddedId)) {
456                 return false;
457             }
458         }
459         {
460             String lhsIndicatorName;
461             lhsIndicatorName = this.getIndicatorName();
462             String rhsIndicatorName;
463             rhsIndicatorName = that.getIndicatorName();
464             if (!strategy.equals(LocatorUtils.property(thisLocator, "indicatorName", lhsIndicatorName), LocatorUtils.property(thatLocator, "indicatorName", rhsIndicatorName), lhsIndicatorName, rhsIndicatorName)) {
465                 return false;
466             }
467         }
468         {
469             String lhsSourceNote;
470             lhsSourceNote = this.getSourceNote();
471             String rhsSourceNote;
472             rhsSourceNote = that.getSourceNote();
473             if (!strategy.equals(LocatorUtils.property(thisLocator, "sourceNote", lhsSourceNote), LocatorUtils.property(thatLocator, "sourceNote", rhsSourceNote), lhsSourceNote, rhsSourceNote)) {
474                 return false;
475             }
476         }
477         {
478             String lhsSourceValue;
479             lhsSourceValue = this.getSourceValue();
480             String rhsSourceValue;
481             rhsSourceValue = that.getSourceValue();
482             if (!strategy.equals(LocatorUtils.property(thisLocator, "sourceValue", lhsSourceValue), LocatorUtils.property(thatLocator, "sourceValue", rhsSourceValue), lhsSourceValue, rhsSourceValue)) {
483                 return false;
484             }
485         }
486         {
487             String lhsSourceOrganization;
488             lhsSourceOrganization = this.getSourceOrganization();
489             String rhsSourceOrganization;
490             rhsSourceOrganization = that.getSourceOrganization();
491             if (!strategy.equals(LocatorUtils.property(thisLocator, "sourceOrganization", lhsSourceOrganization), LocatorUtils.property(thatLocator, "sourceOrganization", rhsSourceOrganization), lhsSourceOrganization, rhsSourceOrganization)) {
492                 return false;
493             }
494         }
495         {
496             Integer lhsStartYear;
497             lhsStartYear = this.getStartYear();
498             Integer rhsStartYear;
499             rhsStartYear = that.getStartYear();
500             if (!strategy.equals(LocatorUtils.property(thisLocator, "startYear", lhsStartYear), LocatorUtils.property(thatLocator, "startYear", rhsStartYear), lhsStartYear, rhsStartYear)) {
501                 return false;
502             }
503         }
504         {
505             Integer lhsEndYear;
506             lhsEndYear = this.getEndYear();
507             Integer rhsEndYear;
508             rhsEndYear = that.getEndYear();
509             if (!strategy.equals(LocatorUtils.property(thisLocator, "endYear", lhsEndYear), LocatorUtils.property(thatLocator, "endYear", rhsEndYear), lhsEndYear, rhsEndYear)) {
510                 return false;
511             }
512         }
513         {
514             long lhsDataPoint;
515             lhsDataPoint = this.getDataPoint();
516             long rhsDataPoint;
517             rhsDataPoint = that.getDataPoint();
518             if (!strategy.equals(LocatorUtils.property(thisLocator, "dataPoint", lhsDataPoint), LocatorUtils.property(thatLocator, "dataPoint", rhsDataPoint), lhsDataPoint, rhsDataPoint)) {
519                 return false;
520             }
521         }
522         {
523             String lhsTopics;
524             lhsTopics = this.getTopics();
525             String rhsTopics;
526             rhsTopics = that.getTopics();
527             if (!strategy.equals(LocatorUtils.property(thisLocator, "topics", lhsTopics), LocatorUtils.property(thatLocator, "topics", rhsTopics), lhsTopics, rhsTopics)) {
528                 return false;
529             }
530         }
531         return true;
532     }
533 
534     public boolean equals(Object object) {
535         final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
536         return equals(null, null, object, strategy);
537     }
538 
539     public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
540         int currentHashCode = 1;
541         {
542             WorldbankIndicatorDataCountrySummaryEmbeddedId theEmbeddedId;
543             theEmbeddedId = this.getEmbeddedId();
544             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "embeddedId", theEmbeddedId), currentHashCode, theEmbeddedId);
545         }
546         {
547             String theIndicatorName;
548             theIndicatorName = this.getIndicatorName();
549             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "indicatorName", theIndicatorName), currentHashCode, theIndicatorName);
550         }
551         {
552             String theSourceNote;
553             theSourceNote = this.getSourceNote();
554             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "sourceNote", theSourceNote), currentHashCode, theSourceNote);
555         }
556         {
557             String theSourceValue;
558             theSourceValue = this.getSourceValue();
559             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "sourceValue", theSourceValue), currentHashCode, theSourceValue);
560         }
561         {
562             String theSourceOrganization;
563             theSourceOrganization = this.getSourceOrganization();
564             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "sourceOrganization", theSourceOrganization), currentHashCode, theSourceOrganization);
565         }
566         {
567             Integer theStartYear;
568             theStartYear = this.getStartYear();
569             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "startYear", theStartYear), currentHashCode, theStartYear);
570         }
571         {
572             Integer theEndYear;
573             theEndYear = this.getEndYear();
574             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "endYear", theEndYear), currentHashCode, theEndYear);
575         }
576         {
577             long theDataPoint;
578             theDataPoint = this.getDataPoint();
579             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "dataPoint", theDataPoint), currentHashCode, theDataPoint);
580         }
581         {
582             String theTopics;
583             theTopics = this.getTopics();
584             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "topics", theTopics), currentHashCode, theTopics);
585         }
586         return currentHashCode;
587     }
588 
589     public int hashCode() {
590         final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
591         return this.hashCode(null, strategy);
592     }
593 
594 }