1
2
3
4
5
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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
71
72
73
74
75
76
77 @Basic
78 @Column(name = "INDICATOR_ID", length = 255)
79 public String getIndicatorId() {
80 return indicatorId;
81 }
82
83
84
85
86
87
88
89
90
91 public void setIndicatorId(String value) {
92 this.indicatorId = value;
93 }
94
95
96
97
98
99
100
101
102
103 @Basic
104 @Column(name = "COUNTRY_ID", length = 255)
105 public String getCountryId() {
106 return countryId;
107 }
108
109
110
111
112
113
114
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 }