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.Basic;
13  import javax.persistence.Column;
14  import javax.persistence.Embeddable;
15  import javax.xml.bind.annotation.XmlAccessType;
16  import javax.xml.bind.annotation.XmlAccessorType;
17  import javax.xml.bind.annotation.XmlElement;
18  import javax.xml.bind.annotation.XmlType;
19  import com.hack23.cia.model.common.api.ModelObject;
20  import org.jvnet.jaxb2_commons.lang.Equals;
21  import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
22  import org.jvnet.jaxb2_commons.lang.HashCode;
23  import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
24  import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
25  import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
26  import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
27  import org.jvnet.jaxb2_commons.lang.ToString;
28  import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
29  import org.jvnet.jaxb2_commons.locator.ObjectLocator;
30  import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
31  
32  
33  /**
34   * <p>Java class for WorldbankIndicatorDataCountrySummaryEmbeddedId complex type.
35   * 
36   * <p>The following schema fragment specifies the expected content contained within this class.
37   * 
38   * <pre>
39   * &lt;complexType name="WorldbankIndicatorDataCountrySummaryEmbeddedId"&gt;
40   *   &lt;complexContent&gt;
41   *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
42   *       &lt;sequence&gt;
43   *         &lt;element name="indicator_id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
44   *         &lt;element name="country_id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
45   *       &lt;/sequence&gt;
46   *     &lt;/restriction&gt;
47   *   &lt;/complexContent&gt;
48   * &lt;/complexType&gt;
49   * </pre>
50   * 
51   * 
52   */
53  @XmlAccessorType(XmlAccessType.FIELD)
54  @XmlType(name = "WorldbankIndicatorDataCountrySummaryEmbeddedId", propOrder = {
55      "indicatorId",
56      "countryId"
57  })
58  @Embeddable
59  public class WorldbankIndicatorDataCountrySummaryEmbeddedId
60      implements Serializable, ModelObject, Equals, HashCode, ToString
61  {
62  
63      private final static long serialVersionUID = 1L;
64      @XmlElement(name = "indicator_id", required = true)
65      protected String indicatorId;
66      @XmlElement(name = "country_id", required = true)
67      protected String countryId;
68  
69      /**
70       * Gets the value of the indicatorId property.
71       * 
72       * @return
73       *     possible object is
74       *     {@link String }
75       *     
76       */
77      @Basic
78      @Column(name = "INDICATOR_ID", length = 255)
79      public String getIndicatorId() {
80          return indicatorId;
81      }
82  
83      /**
84       * Sets the value of the indicatorId property.
85       * 
86       * @param value
87       *     allowed object is
88       *     {@link String }
89       *     
90       */
91      public void setIndicatorId(String value) {
92          this.indicatorId = value;
93      }
94  
95      /**
96       * Gets the value of the countryId property.
97       * 
98       * @return
99       *     possible object is
100      *     {@link String }
101      *     
102      */
103     @Basic
104     @Column(name = "COUNTRY_ID", length = 255)
105     public String getCountryId() {
106         return countryId;
107     }
108 
109     /**
110      * Sets the value of the countryId property.
111      * 
112      * @param value
113      *     allowed object is
114      *     {@link String }
115      *     
116      */
117     public void setCountryId(String value) {
118         this.countryId = value;
119     }
120 
121     public WorldbankIndicatorDataCountrySummaryEmbeddedId withIndicatorId(String value) {
122         setIndicatorId(value);
123         return this;
124     }
125 
126     public WorldbankIndicatorDataCountrySummaryEmbeddedId withCountryId(String value) {
127         setCountryId(value);
128         return this;
129     }
130 
131     public String toString() {
132         final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
133         final StringBuilder buffer = new StringBuilder();
134         append(null, buffer, strategy);
135         return buffer.toString();
136     }
137 
138     public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
139         strategy.appendStart(locator, this, buffer);
140         appendFields(locator, buffer, strategy);
141         strategy.appendEnd(locator, this, buffer);
142         return buffer;
143     }
144 
145     public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
146         {
147             String theIndicatorId;
148             theIndicatorId = this.getIndicatorId();
149             strategy.appendField(locator, this, "indicatorId", buffer, theIndicatorId);
150         }
151         {
152             String theCountryId;
153             theCountryId = this.getCountryId();
154             strategy.appendField(locator, this, "countryId", buffer, theCountryId);
155         }
156         return buffer;
157     }
158 
159     public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
160         if ((object == null)||(this.getClass()!= object.getClass())) {
161             return false;
162         }
163         if (this == object) {
164             return true;
165         }
166         final WorldbankIndicatorDataCountrySummaryEmbeddedId that = ((WorldbankIndicatorDataCountrySummaryEmbeddedId) object);
167         {
168             String lhsIndicatorId;
169             lhsIndicatorId = this.getIndicatorId();
170             String rhsIndicatorId;
171             rhsIndicatorId = that.getIndicatorId();
172             if (!strategy.equals(LocatorUtils.property(thisLocator, "indicatorId", lhsIndicatorId), LocatorUtils.property(thatLocator, "indicatorId", rhsIndicatorId), lhsIndicatorId, rhsIndicatorId)) {
173                 return false;
174             }
175         }
176         {
177             String lhsCountryId;
178             lhsCountryId = this.getCountryId();
179             String rhsCountryId;
180             rhsCountryId = that.getCountryId();
181             if (!strategy.equals(LocatorUtils.property(thisLocator, "countryId", lhsCountryId), LocatorUtils.property(thatLocator, "countryId", rhsCountryId), lhsCountryId, rhsCountryId)) {
182                 return false;
183             }
184         }
185         return true;
186     }
187 
188     public boolean equals(Object object) {
189         final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
190         return equals(null, null, object, strategy);
191     }
192 
193     public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
194         int currentHashCode = 1;
195         {
196             String theIndicatorId;
197             theIndicatorId = this.getIndicatorId();
198             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "indicatorId", theIndicatorId), currentHashCode, theIndicatorId);
199         }
200         {
201             String theCountryId;
202             theCountryId = this.getCountryId();
203             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "countryId", theCountryId), currentHashCode, theCountryId);
204         }
205         return currentHashCode;
206     }
207 
208     public int hashCode() {
209         final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
210         return this.hashCode(null, strategy);
211     }
212 
213 }