| 12280 |
amit.gupta |
1 |
/**
|
|
|
2 |
* Autogenerated by Thrift Compiler (0.7.0)
|
|
|
3 |
*
|
|
|
4 |
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
|
5 |
*/
|
|
|
6 |
package in.shop2020.model.v1.inventory;
|
|
|
7 |
|
|
|
8 |
import java.util.List;
|
|
|
9 |
import java.util.ArrayList;
|
|
|
10 |
import java.util.Map;
|
|
|
11 |
import java.util.HashMap;
|
|
|
12 |
import java.util.EnumMap;
|
|
|
13 |
import java.util.Set;
|
|
|
14 |
import java.util.HashSet;
|
|
|
15 |
import java.util.EnumSet;
|
|
|
16 |
import java.util.Collections;
|
|
|
17 |
import java.util.BitSet;
|
|
|
18 |
import java.nio.ByteBuffer;
|
|
|
19 |
import java.util.Arrays;
|
|
|
20 |
import org.slf4j.Logger;
|
|
|
21 |
import org.slf4j.LoggerFactory;
|
|
|
22 |
|
|
|
23 |
public class StateInfo implements org.apache.thrift.TBase<StateInfo, StateInfo._Fields>, java.io.Serializable, Cloneable {
|
|
|
24 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("StateInfo");
|
|
|
25 |
|
|
|
26 |
private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
|
|
|
27 |
private static final org.apache.thrift.protocol.TField STATE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("stateName", org.apache.thrift.protocol.TType.STRING, (short)2);
|
|
|
28 |
private static final org.apache.thrift.protocol.TField VAT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("vatType", org.apache.thrift.protocol.TType.I32, (short)3);
|
| 21838 |
amit.gupta |
29 |
private static final org.apache.thrift.protocol.TField STATE_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("stateCode", org.apache.thrift.protocol.TType.STRING, (short)4);
|
| 21844 |
amit.gupta |
30 |
private static final org.apache.thrift.protocol.TField SHORT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("shortName", org.apache.thrift.protocol.TType.STRING, (short)5);
|
| 12280 |
amit.gupta |
31 |
|
|
|
32 |
private long id; // required
|
|
|
33 |
private String stateName; // required
|
|
|
34 |
private VatType vatType; // required
|
| 21838 |
amit.gupta |
35 |
private String stateCode; // required
|
| 21844 |
amit.gupta |
36 |
private String shortName; // required
|
| 12280 |
amit.gupta |
37 |
|
|
|
38 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
39 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
40 |
ID((short)1, "id"),
|
|
|
41 |
STATE_NAME((short)2, "stateName"),
|
|
|
42 |
/**
|
|
|
43 |
*
|
|
|
44 |
* @see VatType
|
|
|
45 |
*/
|
| 21838 |
amit.gupta |
46 |
VAT_TYPE((short)3, "vatType"),
|
| 21844 |
amit.gupta |
47 |
STATE_CODE((short)4, "stateCode"),
|
|
|
48 |
SHORT_NAME((short)5, "shortName");
|
| 12280 |
amit.gupta |
49 |
|
|
|
50 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
51 |
|
|
|
52 |
static {
|
|
|
53 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
54 |
byName.put(field.getFieldName(), field);
|
|
|
55 |
}
|
|
|
56 |
}
|
|
|
57 |
|
|
|
58 |
/**
|
|
|
59 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
60 |
*/
|
|
|
61 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
62 |
switch(fieldId) {
|
|
|
63 |
case 1: // ID
|
|
|
64 |
return ID;
|
|
|
65 |
case 2: // STATE_NAME
|
|
|
66 |
return STATE_NAME;
|
|
|
67 |
case 3: // VAT_TYPE
|
|
|
68 |
return VAT_TYPE;
|
| 21838 |
amit.gupta |
69 |
case 4: // STATE_CODE
|
|
|
70 |
return STATE_CODE;
|
| 21844 |
amit.gupta |
71 |
case 5: // SHORT_NAME
|
|
|
72 |
return SHORT_NAME;
|
| 12280 |
amit.gupta |
73 |
default:
|
|
|
74 |
return null;
|
|
|
75 |
}
|
|
|
76 |
}
|
|
|
77 |
|
|
|
78 |
/**
|
|
|
79 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
80 |
* if it is not found.
|
|
|
81 |
*/
|
|
|
82 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
83 |
_Fields fields = findByThriftId(fieldId);
|
|
|
84 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
85 |
return fields;
|
|
|
86 |
}
|
|
|
87 |
|
|
|
88 |
/**
|
|
|
89 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
90 |
*/
|
|
|
91 |
public static _Fields findByName(String name) {
|
|
|
92 |
return byName.get(name);
|
|
|
93 |
}
|
|
|
94 |
|
|
|
95 |
private final short _thriftId;
|
|
|
96 |
private final String _fieldName;
|
|
|
97 |
|
|
|
98 |
_Fields(short thriftId, String fieldName) {
|
|
|
99 |
_thriftId = thriftId;
|
|
|
100 |
_fieldName = fieldName;
|
|
|
101 |
}
|
|
|
102 |
|
|
|
103 |
public short getThriftFieldId() {
|
|
|
104 |
return _thriftId;
|
|
|
105 |
}
|
|
|
106 |
|
|
|
107 |
public String getFieldName() {
|
|
|
108 |
return _fieldName;
|
|
|
109 |
}
|
|
|
110 |
}
|
|
|
111 |
|
|
|
112 |
// isset id assignments
|
|
|
113 |
private static final int __ID_ISSET_ID = 0;
|
|
|
114 |
private BitSet __isset_bit_vector = new BitSet(1);
|
|
|
115 |
|
|
|
116 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
117 |
static {
|
|
|
118 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
119 |
tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
120 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
121 |
tmpMap.put(_Fields.STATE_NAME, new org.apache.thrift.meta_data.FieldMetaData("stateName", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
122 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
|
|
123 |
tmpMap.put(_Fields.VAT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("vatType", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
124 |
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, VatType.class)));
|
| 21838 |
amit.gupta |
125 |
tmpMap.put(_Fields.STATE_CODE, new org.apache.thrift.meta_data.FieldMetaData("stateCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
126 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
| 21844 |
amit.gupta |
127 |
tmpMap.put(_Fields.SHORT_NAME, new org.apache.thrift.meta_data.FieldMetaData("shortName", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
128 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
| 12280 |
amit.gupta |
129 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
130 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(StateInfo.class, metaDataMap);
|
|
|
131 |
}
|
|
|
132 |
|
|
|
133 |
public StateInfo() {
|
|
|
134 |
}
|
|
|
135 |
|
|
|
136 |
public StateInfo(
|
|
|
137 |
long id,
|
|
|
138 |
String stateName,
|
| 21838 |
amit.gupta |
139 |
VatType vatType,
|
| 21844 |
amit.gupta |
140 |
String stateCode,
|
|
|
141 |
String shortName)
|
| 12280 |
amit.gupta |
142 |
{
|
|
|
143 |
this();
|
|
|
144 |
this.id = id;
|
|
|
145 |
setIdIsSet(true);
|
|
|
146 |
this.stateName = stateName;
|
|
|
147 |
this.vatType = vatType;
|
| 21838 |
amit.gupta |
148 |
this.stateCode = stateCode;
|
| 21844 |
amit.gupta |
149 |
this.shortName = shortName;
|
| 12280 |
amit.gupta |
150 |
}
|
|
|
151 |
|
|
|
152 |
/**
|
|
|
153 |
* Performs a deep copy on <i>other</i>.
|
|
|
154 |
*/
|
|
|
155 |
public StateInfo(StateInfo other) {
|
|
|
156 |
__isset_bit_vector.clear();
|
|
|
157 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
158 |
this.id = other.id;
|
|
|
159 |
if (other.isSetStateName()) {
|
|
|
160 |
this.stateName = other.stateName;
|
|
|
161 |
}
|
|
|
162 |
if (other.isSetVatType()) {
|
|
|
163 |
this.vatType = other.vatType;
|
|
|
164 |
}
|
| 21838 |
amit.gupta |
165 |
if (other.isSetStateCode()) {
|
|
|
166 |
this.stateCode = other.stateCode;
|
|
|
167 |
}
|
| 21844 |
amit.gupta |
168 |
if (other.isSetShortName()) {
|
|
|
169 |
this.shortName = other.shortName;
|
|
|
170 |
}
|
| 12280 |
amit.gupta |
171 |
}
|
|
|
172 |
|
|
|
173 |
public StateInfo deepCopy() {
|
|
|
174 |
return new StateInfo(this);
|
|
|
175 |
}
|
|
|
176 |
|
|
|
177 |
@Override
|
|
|
178 |
public void clear() {
|
|
|
179 |
setIdIsSet(false);
|
|
|
180 |
this.id = 0;
|
|
|
181 |
this.stateName = null;
|
|
|
182 |
this.vatType = null;
|
| 21838 |
amit.gupta |
183 |
this.stateCode = null;
|
| 21844 |
amit.gupta |
184 |
this.shortName = null;
|
| 12280 |
amit.gupta |
185 |
}
|
|
|
186 |
|
|
|
187 |
public long getId() {
|
|
|
188 |
return this.id;
|
|
|
189 |
}
|
|
|
190 |
|
|
|
191 |
public void setId(long id) {
|
|
|
192 |
this.id = id;
|
|
|
193 |
setIdIsSet(true);
|
|
|
194 |
}
|
|
|
195 |
|
|
|
196 |
public void unsetId() {
|
|
|
197 |
__isset_bit_vector.clear(__ID_ISSET_ID);
|
|
|
198 |
}
|
|
|
199 |
|
|
|
200 |
/** Returns true if field id is set (has been assigned a value) and false otherwise */
|
|
|
201 |
public boolean isSetId() {
|
|
|
202 |
return __isset_bit_vector.get(__ID_ISSET_ID);
|
|
|
203 |
}
|
|
|
204 |
|
|
|
205 |
public void setIdIsSet(boolean value) {
|
|
|
206 |
__isset_bit_vector.set(__ID_ISSET_ID, value);
|
|
|
207 |
}
|
|
|
208 |
|
|
|
209 |
public String getStateName() {
|
|
|
210 |
return this.stateName;
|
|
|
211 |
}
|
|
|
212 |
|
|
|
213 |
public void setStateName(String stateName) {
|
|
|
214 |
this.stateName = stateName;
|
|
|
215 |
}
|
|
|
216 |
|
|
|
217 |
public void unsetStateName() {
|
|
|
218 |
this.stateName = null;
|
|
|
219 |
}
|
|
|
220 |
|
|
|
221 |
/** Returns true if field stateName is set (has been assigned a value) and false otherwise */
|
|
|
222 |
public boolean isSetStateName() {
|
|
|
223 |
return this.stateName != null;
|
|
|
224 |
}
|
|
|
225 |
|
|
|
226 |
public void setStateNameIsSet(boolean value) {
|
|
|
227 |
if (!value) {
|
|
|
228 |
this.stateName = null;
|
|
|
229 |
}
|
|
|
230 |
}
|
|
|
231 |
|
|
|
232 |
/**
|
|
|
233 |
*
|
|
|
234 |
* @see VatType
|
|
|
235 |
*/
|
|
|
236 |
public VatType getVatType() {
|
|
|
237 |
return this.vatType;
|
|
|
238 |
}
|
|
|
239 |
|
|
|
240 |
/**
|
|
|
241 |
*
|
|
|
242 |
* @see VatType
|
|
|
243 |
*/
|
|
|
244 |
public void setVatType(VatType vatType) {
|
|
|
245 |
this.vatType = vatType;
|
|
|
246 |
}
|
|
|
247 |
|
|
|
248 |
public void unsetVatType() {
|
|
|
249 |
this.vatType = null;
|
|
|
250 |
}
|
|
|
251 |
|
|
|
252 |
/** Returns true if field vatType is set (has been assigned a value) and false otherwise */
|
|
|
253 |
public boolean isSetVatType() {
|
|
|
254 |
return this.vatType != null;
|
|
|
255 |
}
|
|
|
256 |
|
|
|
257 |
public void setVatTypeIsSet(boolean value) {
|
|
|
258 |
if (!value) {
|
|
|
259 |
this.vatType = null;
|
|
|
260 |
}
|
|
|
261 |
}
|
|
|
262 |
|
| 21838 |
amit.gupta |
263 |
public String getStateCode() {
|
|
|
264 |
return this.stateCode;
|
|
|
265 |
}
|
|
|
266 |
|
|
|
267 |
public void setStateCode(String stateCode) {
|
|
|
268 |
this.stateCode = stateCode;
|
|
|
269 |
}
|
|
|
270 |
|
|
|
271 |
public void unsetStateCode() {
|
|
|
272 |
this.stateCode = null;
|
|
|
273 |
}
|
|
|
274 |
|
|
|
275 |
/** Returns true if field stateCode is set (has been assigned a value) and false otherwise */
|
|
|
276 |
public boolean isSetStateCode() {
|
|
|
277 |
return this.stateCode != null;
|
|
|
278 |
}
|
|
|
279 |
|
|
|
280 |
public void setStateCodeIsSet(boolean value) {
|
|
|
281 |
if (!value) {
|
|
|
282 |
this.stateCode = null;
|
|
|
283 |
}
|
|
|
284 |
}
|
|
|
285 |
|
| 21844 |
amit.gupta |
286 |
public String getShortName() {
|
|
|
287 |
return this.shortName;
|
|
|
288 |
}
|
|
|
289 |
|
|
|
290 |
public void setShortName(String shortName) {
|
|
|
291 |
this.shortName = shortName;
|
|
|
292 |
}
|
|
|
293 |
|
|
|
294 |
public void unsetShortName() {
|
|
|
295 |
this.shortName = null;
|
|
|
296 |
}
|
|
|
297 |
|
|
|
298 |
/** Returns true if field shortName is set (has been assigned a value) and false otherwise */
|
|
|
299 |
public boolean isSetShortName() {
|
|
|
300 |
return this.shortName != null;
|
|
|
301 |
}
|
|
|
302 |
|
|
|
303 |
public void setShortNameIsSet(boolean value) {
|
|
|
304 |
if (!value) {
|
|
|
305 |
this.shortName = null;
|
|
|
306 |
}
|
|
|
307 |
}
|
|
|
308 |
|
| 12280 |
amit.gupta |
309 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
310 |
switch (field) {
|
|
|
311 |
case ID:
|
|
|
312 |
if (value == null) {
|
|
|
313 |
unsetId();
|
|
|
314 |
} else {
|
|
|
315 |
setId((Long)value);
|
|
|
316 |
}
|
|
|
317 |
break;
|
|
|
318 |
|
|
|
319 |
case STATE_NAME:
|
|
|
320 |
if (value == null) {
|
|
|
321 |
unsetStateName();
|
|
|
322 |
} else {
|
|
|
323 |
setStateName((String)value);
|
|
|
324 |
}
|
|
|
325 |
break;
|
|
|
326 |
|
|
|
327 |
case VAT_TYPE:
|
|
|
328 |
if (value == null) {
|
|
|
329 |
unsetVatType();
|
|
|
330 |
} else {
|
|
|
331 |
setVatType((VatType)value);
|
|
|
332 |
}
|
|
|
333 |
break;
|
|
|
334 |
|
| 21838 |
amit.gupta |
335 |
case STATE_CODE:
|
|
|
336 |
if (value == null) {
|
|
|
337 |
unsetStateCode();
|
|
|
338 |
} else {
|
|
|
339 |
setStateCode((String)value);
|
|
|
340 |
}
|
|
|
341 |
break;
|
|
|
342 |
|
| 21844 |
amit.gupta |
343 |
case SHORT_NAME:
|
|
|
344 |
if (value == null) {
|
|
|
345 |
unsetShortName();
|
|
|
346 |
} else {
|
|
|
347 |
setShortName((String)value);
|
|
|
348 |
}
|
|
|
349 |
break;
|
|
|
350 |
|
| 12280 |
amit.gupta |
351 |
}
|
|
|
352 |
}
|
|
|
353 |
|
|
|
354 |
public Object getFieldValue(_Fields field) {
|
|
|
355 |
switch (field) {
|
|
|
356 |
case ID:
|
|
|
357 |
return Long.valueOf(getId());
|
|
|
358 |
|
|
|
359 |
case STATE_NAME:
|
|
|
360 |
return getStateName();
|
|
|
361 |
|
|
|
362 |
case VAT_TYPE:
|
|
|
363 |
return getVatType();
|
|
|
364 |
|
| 21838 |
amit.gupta |
365 |
case STATE_CODE:
|
|
|
366 |
return getStateCode();
|
|
|
367 |
|
| 21844 |
amit.gupta |
368 |
case SHORT_NAME:
|
|
|
369 |
return getShortName();
|
|
|
370 |
|
| 12280 |
amit.gupta |
371 |
}
|
|
|
372 |
throw new IllegalStateException();
|
|
|
373 |
}
|
|
|
374 |
|
|
|
375 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
376 |
public boolean isSet(_Fields field) {
|
|
|
377 |
if (field == null) {
|
|
|
378 |
throw new IllegalArgumentException();
|
|
|
379 |
}
|
|
|
380 |
|
|
|
381 |
switch (field) {
|
|
|
382 |
case ID:
|
|
|
383 |
return isSetId();
|
|
|
384 |
case STATE_NAME:
|
|
|
385 |
return isSetStateName();
|
|
|
386 |
case VAT_TYPE:
|
|
|
387 |
return isSetVatType();
|
| 21838 |
amit.gupta |
388 |
case STATE_CODE:
|
|
|
389 |
return isSetStateCode();
|
| 21844 |
amit.gupta |
390 |
case SHORT_NAME:
|
|
|
391 |
return isSetShortName();
|
| 12280 |
amit.gupta |
392 |
}
|
|
|
393 |
throw new IllegalStateException();
|
|
|
394 |
}
|
|
|
395 |
|
|
|
396 |
@Override
|
|
|
397 |
public boolean equals(Object that) {
|
|
|
398 |
if (that == null)
|
|
|
399 |
return false;
|
|
|
400 |
if (that instanceof StateInfo)
|
|
|
401 |
return this.equals((StateInfo)that);
|
|
|
402 |
return false;
|
|
|
403 |
}
|
|
|
404 |
|
|
|
405 |
public boolean equals(StateInfo that) {
|
|
|
406 |
if (that == null)
|
|
|
407 |
return false;
|
|
|
408 |
|
|
|
409 |
boolean this_present_id = true;
|
|
|
410 |
boolean that_present_id = true;
|
|
|
411 |
if (this_present_id || that_present_id) {
|
|
|
412 |
if (!(this_present_id && that_present_id))
|
|
|
413 |
return false;
|
|
|
414 |
if (this.id != that.id)
|
|
|
415 |
return false;
|
|
|
416 |
}
|
|
|
417 |
|
|
|
418 |
boolean this_present_stateName = true && this.isSetStateName();
|
|
|
419 |
boolean that_present_stateName = true && that.isSetStateName();
|
|
|
420 |
if (this_present_stateName || that_present_stateName) {
|
|
|
421 |
if (!(this_present_stateName && that_present_stateName))
|
|
|
422 |
return false;
|
|
|
423 |
if (!this.stateName.equals(that.stateName))
|
|
|
424 |
return false;
|
|
|
425 |
}
|
|
|
426 |
|
|
|
427 |
boolean this_present_vatType = true && this.isSetVatType();
|
|
|
428 |
boolean that_present_vatType = true && that.isSetVatType();
|
|
|
429 |
if (this_present_vatType || that_present_vatType) {
|
|
|
430 |
if (!(this_present_vatType && that_present_vatType))
|
|
|
431 |
return false;
|
|
|
432 |
if (!this.vatType.equals(that.vatType))
|
|
|
433 |
return false;
|
|
|
434 |
}
|
|
|
435 |
|
| 21838 |
amit.gupta |
436 |
boolean this_present_stateCode = true && this.isSetStateCode();
|
|
|
437 |
boolean that_present_stateCode = true && that.isSetStateCode();
|
|
|
438 |
if (this_present_stateCode || that_present_stateCode) {
|
|
|
439 |
if (!(this_present_stateCode && that_present_stateCode))
|
|
|
440 |
return false;
|
|
|
441 |
if (!this.stateCode.equals(that.stateCode))
|
|
|
442 |
return false;
|
|
|
443 |
}
|
|
|
444 |
|
| 21844 |
amit.gupta |
445 |
boolean this_present_shortName = true && this.isSetShortName();
|
|
|
446 |
boolean that_present_shortName = true && that.isSetShortName();
|
|
|
447 |
if (this_present_shortName || that_present_shortName) {
|
|
|
448 |
if (!(this_present_shortName && that_present_shortName))
|
|
|
449 |
return false;
|
|
|
450 |
if (!this.shortName.equals(that.shortName))
|
|
|
451 |
return false;
|
|
|
452 |
}
|
|
|
453 |
|
| 12280 |
amit.gupta |
454 |
return true;
|
|
|
455 |
}
|
|
|
456 |
|
|
|
457 |
@Override
|
|
|
458 |
public int hashCode() {
|
|
|
459 |
return 0;
|
|
|
460 |
}
|
|
|
461 |
|
|
|
462 |
public int compareTo(StateInfo other) {
|
|
|
463 |
if (!getClass().equals(other.getClass())) {
|
|
|
464 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
465 |
}
|
|
|
466 |
|
|
|
467 |
int lastComparison = 0;
|
|
|
468 |
StateInfo typedOther = (StateInfo)other;
|
|
|
469 |
|
|
|
470 |
lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
|
|
|
471 |
if (lastComparison != 0) {
|
|
|
472 |
return lastComparison;
|
|
|
473 |
}
|
|
|
474 |
if (isSetId()) {
|
|
|
475 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
|
|
|
476 |
if (lastComparison != 0) {
|
|
|
477 |
return lastComparison;
|
|
|
478 |
}
|
|
|
479 |
}
|
|
|
480 |
lastComparison = Boolean.valueOf(isSetStateName()).compareTo(typedOther.isSetStateName());
|
|
|
481 |
if (lastComparison != 0) {
|
|
|
482 |
return lastComparison;
|
|
|
483 |
}
|
|
|
484 |
if (isSetStateName()) {
|
|
|
485 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stateName, typedOther.stateName);
|
|
|
486 |
if (lastComparison != 0) {
|
|
|
487 |
return lastComparison;
|
|
|
488 |
}
|
|
|
489 |
}
|
|
|
490 |
lastComparison = Boolean.valueOf(isSetVatType()).compareTo(typedOther.isSetVatType());
|
|
|
491 |
if (lastComparison != 0) {
|
|
|
492 |
return lastComparison;
|
|
|
493 |
}
|
|
|
494 |
if (isSetVatType()) {
|
|
|
495 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vatType, typedOther.vatType);
|
|
|
496 |
if (lastComparison != 0) {
|
|
|
497 |
return lastComparison;
|
|
|
498 |
}
|
|
|
499 |
}
|
| 21838 |
amit.gupta |
500 |
lastComparison = Boolean.valueOf(isSetStateCode()).compareTo(typedOther.isSetStateCode());
|
|
|
501 |
if (lastComparison != 0) {
|
|
|
502 |
return lastComparison;
|
|
|
503 |
}
|
|
|
504 |
if (isSetStateCode()) {
|
|
|
505 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stateCode, typedOther.stateCode);
|
|
|
506 |
if (lastComparison != 0) {
|
|
|
507 |
return lastComparison;
|
|
|
508 |
}
|
|
|
509 |
}
|
| 21844 |
amit.gupta |
510 |
lastComparison = Boolean.valueOf(isSetShortName()).compareTo(typedOther.isSetShortName());
|
|
|
511 |
if (lastComparison != 0) {
|
|
|
512 |
return lastComparison;
|
|
|
513 |
}
|
|
|
514 |
if (isSetShortName()) {
|
|
|
515 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shortName, typedOther.shortName);
|
|
|
516 |
if (lastComparison != 0) {
|
|
|
517 |
return lastComparison;
|
|
|
518 |
}
|
|
|
519 |
}
|
| 12280 |
amit.gupta |
520 |
return 0;
|
|
|
521 |
}
|
|
|
522 |
|
|
|
523 |
public _Fields fieldForId(int fieldId) {
|
|
|
524 |
return _Fields.findByThriftId(fieldId);
|
|
|
525 |
}
|
|
|
526 |
|
|
|
527 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
528 |
org.apache.thrift.protocol.TField field;
|
|
|
529 |
iprot.readStructBegin();
|
|
|
530 |
while (true)
|
|
|
531 |
{
|
|
|
532 |
field = iprot.readFieldBegin();
|
|
|
533 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
534 |
break;
|
|
|
535 |
}
|
|
|
536 |
switch (field.id) {
|
|
|
537 |
case 1: // ID
|
|
|
538 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
539 |
this.id = iprot.readI64();
|
|
|
540 |
setIdIsSet(true);
|
|
|
541 |
} else {
|
|
|
542 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
543 |
}
|
|
|
544 |
break;
|
|
|
545 |
case 2: // STATE_NAME
|
|
|
546 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
547 |
this.stateName = iprot.readString();
|
|
|
548 |
} else {
|
|
|
549 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
550 |
}
|
|
|
551 |
break;
|
|
|
552 |
case 3: // VAT_TYPE
|
|
|
553 |
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
|
|
554 |
this.vatType = VatType.findByValue(iprot.readI32());
|
|
|
555 |
} else {
|
|
|
556 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
557 |
}
|
|
|
558 |
break;
|
| 21838 |
amit.gupta |
559 |
case 4: // STATE_CODE
|
|
|
560 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
561 |
this.stateCode = iprot.readString();
|
|
|
562 |
} else {
|
|
|
563 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
564 |
}
|
|
|
565 |
break;
|
| 21844 |
amit.gupta |
566 |
case 5: // SHORT_NAME
|
|
|
567 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
|
|
568 |
this.shortName = iprot.readString();
|
|
|
569 |
} else {
|
|
|
570 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
571 |
}
|
|
|
572 |
break;
|
| 12280 |
amit.gupta |
573 |
default:
|
|
|
574 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
575 |
}
|
|
|
576 |
iprot.readFieldEnd();
|
|
|
577 |
}
|
|
|
578 |
iprot.readStructEnd();
|
|
|
579 |
validate();
|
|
|
580 |
}
|
|
|
581 |
|
|
|
582 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
583 |
validate();
|
|
|
584 |
|
|
|
585 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
586 |
oprot.writeFieldBegin(ID_FIELD_DESC);
|
|
|
587 |
oprot.writeI64(this.id);
|
|
|
588 |
oprot.writeFieldEnd();
|
|
|
589 |
if (this.stateName != null) {
|
|
|
590 |
oprot.writeFieldBegin(STATE_NAME_FIELD_DESC);
|
|
|
591 |
oprot.writeString(this.stateName);
|
|
|
592 |
oprot.writeFieldEnd();
|
|
|
593 |
}
|
|
|
594 |
if (this.vatType != null) {
|
|
|
595 |
oprot.writeFieldBegin(VAT_TYPE_FIELD_DESC);
|
|
|
596 |
oprot.writeI32(this.vatType.getValue());
|
|
|
597 |
oprot.writeFieldEnd();
|
|
|
598 |
}
|
| 21838 |
amit.gupta |
599 |
if (this.stateCode != null) {
|
|
|
600 |
oprot.writeFieldBegin(STATE_CODE_FIELD_DESC);
|
|
|
601 |
oprot.writeString(this.stateCode);
|
|
|
602 |
oprot.writeFieldEnd();
|
|
|
603 |
}
|
| 21844 |
amit.gupta |
604 |
if (this.shortName != null) {
|
|
|
605 |
oprot.writeFieldBegin(SHORT_NAME_FIELD_DESC);
|
|
|
606 |
oprot.writeString(this.shortName);
|
|
|
607 |
oprot.writeFieldEnd();
|
|
|
608 |
}
|
| 12280 |
amit.gupta |
609 |
oprot.writeFieldStop();
|
|
|
610 |
oprot.writeStructEnd();
|
|
|
611 |
}
|
|
|
612 |
|
|
|
613 |
@Override
|
|
|
614 |
public String toString() {
|
|
|
615 |
StringBuilder sb = new StringBuilder("StateInfo(");
|
|
|
616 |
boolean first = true;
|
|
|
617 |
|
|
|
618 |
sb.append("id:");
|
|
|
619 |
sb.append(this.id);
|
|
|
620 |
first = false;
|
|
|
621 |
if (!first) sb.append(", ");
|
|
|
622 |
sb.append("stateName:");
|
|
|
623 |
if (this.stateName == null) {
|
|
|
624 |
sb.append("null");
|
|
|
625 |
} else {
|
|
|
626 |
sb.append(this.stateName);
|
|
|
627 |
}
|
|
|
628 |
first = false;
|
|
|
629 |
if (!first) sb.append(", ");
|
|
|
630 |
sb.append("vatType:");
|
|
|
631 |
if (this.vatType == null) {
|
|
|
632 |
sb.append("null");
|
|
|
633 |
} else {
|
|
|
634 |
sb.append(this.vatType);
|
|
|
635 |
}
|
|
|
636 |
first = false;
|
| 21838 |
amit.gupta |
637 |
if (!first) sb.append(", ");
|
|
|
638 |
sb.append("stateCode:");
|
|
|
639 |
if (this.stateCode == null) {
|
|
|
640 |
sb.append("null");
|
|
|
641 |
} else {
|
|
|
642 |
sb.append(this.stateCode);
|
|
|
643 |
}
|
|
|
644 |
first = false;
|
| 21844 |
amit.gupta |
645 |
if (!first) sb.append(", ");
|
|
|
646 |
sb.append("shortName:");
|
|
|
647 |
if (this.shortName == null) {
|
|
|
648 |
sb.append("null");
|
|
|
649 |
} else {
|
|
|
650 |
sb.append(this.shortName);
|
|
|
651 |
}
|
|
|
652 |
first = false;
|
| 12280 |
amit.gupta |
653 |
sb.append(")");
|
|
|
654 |
return sb.toString();
|
|
|
655 |
}
|
|
|
656 |
|
|
|
657 |
public void validate() throws org.apache.thrift.TException {
|
|
|
658 |
// check for required fields
|
|
|
659 |
}
|
|
|
660 |
|
|
|
661 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
662 |
try {
|
|
|
663 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
664 |
} catch (org.apache.thrift.TException te) {
|
|
|
665 |
throw new java.io.IOException(te);
|
|
|
666 |
}
|
|
|
667 |
}
|
|
|
668 |
|
|
|
669 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
670 |
try {
|
|
|
671 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
672 |
__isset_bit_vector = new BitSet(1);
|
|
|
673 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
674 |
} catch (org.apache.thrift.TException te) {
|
|
|
675 |
throw new java.io.IOException(te);
|
|
|
676 |
}
|
|
|
677 |
}
|
|
|
678 |
|
|
|
679 |
}
|
|
|
680 |
|