Subversion Repositories SmartDukaan

Rev

Rev 5719 | Rev 5813 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5553 rajveer 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.logistics;
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 PickupStore implements org.apache.thrift.TBase<PickupStore, PickupStore._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PickupStore");
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);
5719 rajveer 27
  private static final org.apache.thrift.protocol.TField HOTSPOT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("hotspotId", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
29
  private static final org.apache.thrift.protocol.TField LINE1_FIELD_DESC = new org.apache.thrift.protocol.TField("line1", org.apache.thrift.protocol.TType.STRING, (short)4);
30
  private static final org.apache.thrift.protocol.TField LINE2_FIELD_DESC = new org.apache.thrift.protocol.TField("line2", org.apache.thrift.protocol.TType.STRING, (short)5);
31
  private static final org.apache.thrift.protocol.TField CITY_FIELD_DESC = new org.apache.thrift.protocol.TField("city", org.apache.thrift.protocol.TType.STRING, (short)6);
32
  private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.STRING, (short)7);
33
  private static final org.apache.thrift.protocol.TField PIN_FIELD_DESC = new org.apache.thrift.protocol.TField("pin", org.apache.thrift.protocol.TType.STRING, (short)8);
34
  private static final org.apache.thrift.protocol.TField PHONE_FIELD_DESC = new org.apache.thrift.protocol.TField("phone", org.apache.thrift.protocol.TType.STRING, (short)9);
5739 rajveer 35
  private static final org.apache.thrift.protocol.TField ZONE_FIELD_DESC = new org.apache.thrift.protocol.TField("zone", org.apache.thrift.protocol.TType.STRING, (short)10);
5553 rajveer 36
 
37
  private long id; // required
5719 rajveer 38
  private String hotspotId; // required
5553 rajveer 39
  private String name; // required
40
  private String line1; // required
41
  private String line2; // required
42
  private String city; // required
43
  private String state; // required
44
  private String pin; // required
45
  private String phone; // required
5739 rajveer 46
  private String zone; // required
5553 rajveer 47
 
48
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
49
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
50
    ID((short)1, "id"),
5719 rajveer 51
    HOTSPOT_ID((short)2, "hotspotId"),
52
    NAME((short)3, "name"),
53
    LINE1((short)4, "line1"),
54
    LINE2((short)5, "line2"),
55
    CITY((short)6, "city"),
56
    STATE((short)7, "state"),
57
    PIN((short)8, "pin"),
5739 rajveer 58
    PHONE((short)9, "phone"),
59
    ZONE((short)10, "zone");
5553 rajveer 60
 
61
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
62
 
63
    static {
64
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
65
        byName.put(field.getFieldName(), field);
66
      }
67
    }
68
 
69
    /**
70
     * Find the _Fields constant that matches fieldId, or null if its not found.
71
     */
72
    public static _Fields findByThriftId(int fieldId) {
73
      switch(fieldId) {
74
        case 1: // ID
75
          return ID;
5719 rajveer 76
        case 2: // HOTSPOT_ID
77
          return HOTSPOT_ID;
78
        case 3: // NAME
5553 rajveer 79
          return NAME;
5719 rajveer 80
        case 4: // LINE1
5553 rajveer 81
          return LINE1;
5719 rajveer 82
        case 5: // LINE2
5553 rajveer 83
          return LINE2;
5719 rajveer 84
        case 6: // CITY
5553 rajveer 85
          return CITY;
5719 rajveer 86
        case 7: // STATE
5553 rajveer 87
          return STATE;
5719 rajveer 88
        case 8: // PIN
5553 rajveer 89
          return PIN;
5719 rajveer 90
        case 9: // PHONE
5553 rajveer 91
          return PHONE;
5739 rajveer 92
        case 10: // ZONE
93
          return ZONE;
5553 rajveer 94
        default:
95
          return null;
96
      }
97
    }
98
 
99
    /**
100
     * Find the _Fields constant that matches fieldId, throwing an exception
101
     * if it is not found.
102
     */
103
    public static _Fields findByThriftIdOrThrow(int fieldId) {
104
      _Fields fields = findByThriftId(fieldId);
105
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
106
      return fields;
107
    }
108
 
109
    /**
110
     * Find the _Fields constant that matches name, or null if its not found.
111
     */
112
    public static _Fields findByName(String name) {
113
      return byName.get(name);
114
    }
115
 
116
    private final short _thriftId;
117
    private final String _fieldName;
118
 
119
    _Fields(short thriftId, String fieldName) {
120
      _thriftId = thriftId;
121
      _fieldName = fieldName;
122
    }
123
 
124
    public short getThriftFieldId() {
125
      return _thriftId;
126
    }
127
 
128
    public String getFieldName() {
129
      return _fieldName;
130
    }
131
  }
132
 
133
  // isset id assignments
134
  private static final int __ID_ISSET_ID = 0;
135
  private BitSet __isset_bit_vector = new BitSet(1);
136
 
137
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
138
  static {
139
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
140
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
141
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5719 rajveer 142
    tmpMap.put(_Fields.HOTSPOT_ID, new org.apache.thrift.meta_data.FieldMetaData("hotspotId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
143
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
5553 rajveer 144
    tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
145
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
146
    tmpMap.put(_Fields.LINE1, new org.apache.thrift.meta_data.FieldMetaData("line1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
147
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
148
    tmpMap.put(_Fields.LINE2, new org.apache.thrift.meta_data.FieldMetaData("line2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
149
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
150
    tmpMap.put(_Fields.CITY, new org.apache.thrift.meta_data.FieldMetaData("city", org.apache.thrift.TFieldRequirementType.DEFAULT, 
151
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
152
    tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.DEFAULT, 
153
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
154
    tmpMap.put(_Fields.PIN, new org.apache.thrift.meta_data.FieldMetaData("pin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
155
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
156
    tmpMap.put(_Fields.PHONE, new org.apache.thrift.meta_data.FieldMetaData("phone", org.apache.thrift.TFieldRequirementType.DEFAULT, 
157
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
5739 rajveer 158
    tmpMap.put(_Fields.ZONE, new org.apache.thrift.meta_data.FieldMetaData("zone", org.apache.thrift.TFieldRequirementType.DEFAULT, 
159
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
5553 rajveer 160
    metaDataMap = Collections.unmodifiableMap(tmpMap);
161
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PickupStore.class, metaDataMap);
162
  }
163
 
164
  public PickupStore() {
165
  }
166
 
167
  public PickupStore(
168
    long id,
5719 rajveer 169
    String hotspotId,
5553 rajveer 170
    String name,
171
    String line1,
172
    String line2,
173
    String city,
174
    String state,
175
    String pin,
5739 rajveer 176
    String phone,
177
    String zone)
5553 rajveer 178
  {
179
    this();
180
    this.id = id;
181
    setIdIsSet(true);
5719 rajveer 182
    this.hotspotId = hotspotId;
5553 rajveer 183
    this.name = name;
184
    this.line1 = line1;
185
    this.line2 = line2;
186
    this.city = city;
187
    this.state = state;
188
    this.pin = pin;
189
    this.phone = phone;
5739 rajveer 190
    this.zone = zone;
5553 rajveer 191
  }
192
 
193
  /**
194
   * Performs a deep copy on <i>other</i>.
195
   */
196
  public PickupStore(PickupStore other) {
197
    __isset_bit_vector.clear();
198
    __isset_bit_vector.or(other.__isset_bit_vector);
199
    this.id = other.id;
5719 rajveer 200
    if (other.isSetHotspotId()) {
201
      this.hotspotId = other.hotspotId;
202
    }
5553 rajveer 203
    if (other.isSetName()) {
204
      this.name = other.name;
205
    }
206
    if (other.isSetLine1()) {
207
      this.line1 = other.line1;
208
    }
209
    if (other.isSetLine2()) {
210
      this.line2 = other.line2;
211
    }
212
    if (other.isSetCity()) {
213
      this.city = other.city;
214
    }
215
    if (other.isSetState()) {
216
      this.state = other.state;
217
    }
218
    if (other.isSetPin()) {
219
      this.pin = other.pin;
220
    }
221
    if (other.isSetPhone()) {
222
      this.phone = other.phone;
223
    }
5739 rajveer 224
    if (other.isSetZone()) {
225
      this.zone = other.zone;
226
    }
5553 rajveer 227
  }
228
 
229
  public PickupStore deepCopy() {
230
    return new PickupStore(this);
231
  }
232
 
233
  @Override
234
  public void clear() {
235
    setIdIsSet(false);
236
    this.id = 0;
5719 rajveer 237
    this.hotspotId = null;
5553 rajveer 238
    this.name = null;
239
    this.line1 = null;
240
    this.line2 = null;
241
    this.city = null;
242
    this.state = null;
243
    this.pin = null;
244
    this.phone = null;
5739 rajveer 245
    this.zone = null;
5553 rajveer 246
  }
247
 
248
  public long getId() {
249
    return this.id;
250
  }
251
 
252
  public void setId(long id) {
253
    this.id = id;
254
    setIdIsSet(true);
255
  }
256
 
257
  public void unsetId() {
258
    __isset_bit_vector.clear(__ID_ISSET_ID);
259
  }
260
 
261
  /** Returns true if field id is set (has been assigned a value) and false otherwise */
262
  public boolean isSetId() {
263
    return __isset_bit_vector.get(__ID_ISSET_ID);
264
  }
265
 
266
  public void setIdIsSet(boolean value) {
267
    __isset_bit_vector.set(__ID_ISSET_ID, value);
268
  }
269
 
5719 rajveer 270
  public String getHotspotId() {
271
    return this.hotspotId;
272
  }
273
 
274
  public void setHotspotId(String hotspotId) {
275
    this.hotspotId = hotspotId;
276
  }
277
 
278
  public void unsetHotspotId() {
279
    this.hotspotId = null;
280
  }
281
 
282
  /** Returns true if field hotspotId is set (has been assigned a value) and false otherwise */
283
  public boolean isSetHotspotId() {
284
    return this.hotspotId != null;
285
  }
286
 
287
  public void setHotspotIdIsSet(boolean value) {
288
    if (!value) {
289
      this.hotspotId = null;
290
    }
291
  }
292
 
5553 rajveer 293
  public String getName() {
294
    return this.name;
295
  }
296
 
297
  public void setName(String name) {
298
    this.name = name;
299
  }
300
 
301
  public void unsetName() {
302
    this.name = null;
303
  }
304
 
305
  /** Returns true if field name is set (has been assigned a value) and false otherwise */
306
  public boolean isSetName() {
307
    return this.name != null;
308
  }
309
 
310
  public void setNameIsSet(boolean value) {
311
    if (!value) {
312
      this.name = null;
313
    }
314
  }
315
 
316
  public String getLine1() {
317
    return this.line1;
318
  }
319
 
320
  public void setLine1(String line1) {
321
    this.line1 = line1;
322
  }
323
 
324
  public void unsetLine1() {
325
    this.line1 = null;
326
  }
327
 
328
  /** Returns true if field line1 is set (has been assigned a value) and false otherwise */
329
  public boolean isSetLine1() {
330
    return this.line1 != null;
331
  }
332
 
333
  public void setLine1IsSet(boolean value) {
334
    if (!value) {
335
      this.line1 = null;
336
    }
337
  }
338
 
339
  public String getLine2() {
340
    return this.line2;
341
  }
342
 
343
  public void setLine2(String line2) {
344
    this.line2 = line2;
345
  }
346
 
347
  public void unsetLine2() {
348
    this.line2 = null;
349
  }
350
 
351
  /** Returns true if field line2 is set (has been assigned a value) and false otherwise */
352
  public boolean isSetLine2() {
353
    return this.line2 != null;
354
  }
355
 
356
  public void setLine2IsSet(boolean value) {
357
    if (!value) {
358
      this.line2 = null;
359
    }
360
  }
361
 
362
  public String getCity() {
363
    return this.city;
364
  }
365
 
366
  public void setCity(String city) {
367
    this.city = city;
368
  }
369
 
370
  public void unsetCity() {
371
    this.city = null;
372
  }
373
 
374
  /** Returns true if field city is set (has been assigned a value) and false otherwise */
375
  public boolean isSetCity() {
376
    return this.city != null;
377
  }
378
 
379
  public void setCityIsSet(boolean value) {
380
    if (!value) {
381
      this.city = null;
382
    }
383
  }
384
 
385
  public String getState() {
386
    return this.state;
387
  }
388
 
389
  public void setState(String state) {
390
    this.state = state;
391
  }
392
 
393
  public void unsetState() {
394
    this.state = null;
395
  }
396
 
397
  /** Returns true if field state is set (has been assigned a value) and false otherwise */
398
  public boolean isSetState() {
399
    return this.state != null;
400
  }
401
 
402
  public void setStateIsSet(boolean value) {
403
    if (!value) {
404
      this.state = null;
405
    }
406
  }
407
 
408
  public String getPin() {
409
    return this.pin;
410
  }
411
 
412
  public void setPin(String pin) {
413
    this.pin = pin;
414
  }
415
 
416
  public void unsetPin() {
417
    this.pin = null;
418
  }
419
 
420
  /** Returns true if field pin is set (has been assigned a value) and false otherwise */
421
  public boolean isSetPin() {
422
    return this.pin != null;
423
  }
424
 
425
  public void setPinIsSet(boolean value) {
426
    if (!value) {
427
      this.pin = null;
428
    }
429
  }
430
 
431
  public String getPhone() {
432
    return this.phone;
433
  }
434
 
435
  public void setPhone(String phone) {
436
    this.phone = phone;
437
  }
438
 
439
  public void unsetPhone() {
440
    this.phone = null;
441
  }
442
 
443
  /** Returns true if field phone is set (has been assigned a value) and false otherwise */
444
  public boolean isSetPhone() {
445
    return this.phone != null;
446
  }
447
 
448
  public void setPhoneIsSet(boolean value) {
449
    if (!value) {
450
      this.phone = null;
451
    }
452
  }
453
 
5739 rajveer 454
  public String getZone() {
455
    return this.zone;
456
  }
457
 
458
  public void setZone(String zone) {
459
    this.zone = zone;
460
  }
461
 
462
  public void unsetZone() {
463
    this.zone = null;
464
  }
465
 
466
  /** Returns true if field zone is set (has been assigned a value) and false otherwise */
467
  public boolean isSetZone() {
468
    return this.zone != null;
469
  }
470
 
471
  public void setZoneIsSet(boolean value) {
472
    if (!value) {
473
      this.zone = null;
474
    }
475
  }
476
 
5553 rajveer 477
  public void setFieldValue(_Fields field, Object value) {
478
    switch (field) {
479
    case ID:
480
      if (value == null) {
481
        unsetId();
482
      } else {
483
        setId((Long)value);
484
      }
485
      break;
486
 
5719 rajveer 487
    case HOTSPOT_ID:
488
      if (value == null) {
489
        unsetHotspotId();
490
      } else {
491
        setHotspotId((String)value);
492
      }
493
      break;
494
 
5553 rajveer 495
    case NAME:
496
      if (value == null) {
497
        unsetName();
498
      } else {
499
        setName((String)value);
500
      }
501
      break;
502
 
503
    case LINE1:
504
      if (value == null) {
505
        unsetLine1();
506
      } else {
507
        setLine1((String)value);
508
      }
509
      break;
510
 
511
    case LINE2:
512
      if (value == null) {
513
        unsetLine2();
514
      } else {
515
        setLine2((String)value);
516
      }
517
      break;
518
 
519
    case CITY:
520
      if (value == null) {
521
        unsetCity();
522
      } else {
523
        setCity((String)value);
524
      }
525
      break;
526
 
527
    case STATE:
528
      if (value == null) {
529
        unsetState();
530
      } else {
531
        setState((String)value);
532
      }
533
      break;
534
 
535
    case PIN:
536
      if (value == null) {
537
        unsetPin();
538
      } else {
539
        setPin((String)value);
540
      }
541
      break;
542
 
543
    case PHONE:
544
      if (value == null) {
545
        unsetPhone();
546
      } else {
547
        setPhone((String)value);
548
      }
549
      break;
550
 
5739 rajveer 551
    case ZONE:
552
      if (value == null) {
553
        unsetZone();
554
      } else {
555
        setZone((String)value);
556
      }
557
      break;
558
 
5553 rajveer 559
    }
560
  }
561
 
562
  public Object getFieldValue(_Fields field) {
563
    switch (field) {
564
    case ID:
565
      return Long.valueOf(getId());
566
 
5719 rajveer 567
    case HOTSPOT_ID:
568
      return getHotspotId();
569
 
5553 rajveer 570
    case NAME:
571
      return getName();
572
 
573
    case LINE1:
574
      return getLine1();
575
 
576
    case LINE2:
577
      return getLine2();
578
 
579
    case CITY:
580
      return getCity();
581
 
582
    case STATE:
583
      return getState();
584
 
585
    case PIN:
586
      return getPin();
587
 
588
    case PHONE:
589
      return getPhone();
590
 
5739 rajveer 591
    case ZONE:
592
      return getZone();
593
 
5553 rajveer 594
    }
595
    throw new IllegalStateException();
596
  }
597
 
598
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
599
  public boolean isSet(_Fields field) {
600
    if (field == null) {
601
      throw new IllegalArgumentException();
602
    }
603
 
604
    switch (field) {
605
    case ID:
606
      return isSetId();
5719 rajveer 607
    case HOTSPOT_ID:
608
      return isSetHotspotId();
5553 rajveer 609
    case NAME:
610
      return isSetName();
611
    case LINE1:
612
      return isSetLine1();
613
    case LINE2:
614
      return isSetLine2();
615
    case CITY:
616
      return isSetCity();
617
    case STATE:
618
      return isSetState();
619
    case PIN:
620
      return isSetPin();
621
    case PHONE:
622
      return isSetPhone();
5739 rajveer 623
    case ZONE:
624
      return isSetZone();
5553 rajveer 625
    }
626
    throw new IllegalStateException();
627
  }
628
 
629
  @Override
630
  public boolean equals(Object that) {
631
    if (that == null)
632
      return false;
633
    if (that instanceof PickupStore)
634
      return this.equals((PickupStore)that);
635
    return false;
636
  }
637
 
638
  public boolean equals(PickupStore that) {
639
    if (that == null)
640
      return false;
641
 
642
    boolean this_present_id = true;
643
    boolean that_present_id = true;
644
    if (this_present_id || that_present_id) {
645
      if (!(this_present_id && that_present_id))
646
        return false;
647
      if (this.id != that.id)
648
        return false;
649
    }
650
 
5719 rajveer 651
    boolean this_present_hotspotId = true && this.isSetHotspotId();
652
    boolean that_present_hotspotId = true && that.isSetHotspotId();
653
    if (this_present_hotspotId || that_present_hotspotId) {
654
      if (!(this_present_hotspotId && that_present_hotspotId))
655
        return false;
656
      if (!this.hotspotId.equals(that.hotspotId))
657
        return false;
658
    }
659
 
5553 rajveer 660
    boolean this_present_name = true && this.isSetName();
661
    boolean that_present_name = true && that.isSetName();
662
    if (this_present_name || that_present_name) {
663
      if (!(this_present_name && that_present_name))
664
        return false;
665
      if (!this.name.equals(that.name))
666
        return false;
667
    }
668
 
669
    boolean this_present_line1 = true && this.isSetLine1();
670
    boolean that_present_line1 = true && that.isSetLine1();
671
    if (this_present_line1 || that_present_line1) {
672
      if (!(this_present_line1 && that_present_line1))
673
        return false;
674
      if (!this.line1.equals(that.line1))
675
        return false;
676
    }
677
 
678
    boolean this_present_line2 = true && this.isSetLine2();
679
    boolean that_present_line2 = true && that.isSetLine2();
680
    if (this_present_line2 || that_present_line2) {
681
      if (!(this_present_line2 && that_present_line2))
682
        return false;
683
      if (!this.line2.equals(that.line2))
684
        return false;
685
    }
686
 
687
    boolean this_present_city = true && this.isSetCity();
688
    boolean that_present_city = true && that.isSetCity();
689
    if (this_present_city || that_present_city) {
690
      if (!(this_present_city && that_present_city))
691
        return false;
692
      if (!this.city.equals(that.city))
693
        return false;
694
    }
695
 
696
    boolean this_present_state = true && this.isSetState();
697
    boolean that_present_state = true && that.isSetState();
698
    if (this_present_state || that_present_state) {
699
      if (!(this_present_state && that_present_state))
700
        return false;
701
      if (!this.state.equals(that.state))
702
        return false;
703
    }
704
 
705
    boolean this_present_pin = true && this.isSetPin();
706
    boolean that_present_pin = true && that.isSetPin();
707
    if (this_present_pin || that_present_pin) {
708
      if (!(this_present_pin && that_present_pin))
709
        return false;
710
      if (!this.pin.equals(that.pin))
711
        return false;
712
    }
713
 
714
    boolean this_present_phone = true && this.isSetPhone();
715
    boolean that_present_phone = true && that.isSetPhone();
716
    if (this_present_phone || that_present_phone) {
717
      if (!(this_present_phone && that_present_phone))
718
        return false;
719
      if (!this.phone.equals(that.phone))
720
        return false;
721
    }
722
 
5739 rajveer 723
    boolean this_present_zone = true && this.isSetZone();
724
    boolean that_present_zone = true && that.isSetZone();
725
    if (this_present_zone || that_present_zone) {
726
      if (!(this_present_zone && that_present_zone))
727
        return false;
728
      if (!this.zone.equals(that.zone))
729
        return false;
730
    }
731
 
5553 rajveer 732
    return true;
733
  }
734
 
735
  @Override
736
  public int hashCode() {
737
    return 0;
738
  }
739
 
740
  public int compareTo(PickupStore other) {
741
    if (!getClass().equals(other.getClass())) {
742
      return getClass().getName().compareTo(other.getClass().getName());
743
    }
744
 
745
    int lastComparison = 0;
746
    PickupStore typedOther = (PickupStore)other;
747
 
748
    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
749
    if (lastComparison != 0) {
750
      return lastComparison;
751
    }
752
    if (isSetId()) {
753
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
754
      if (lastComparison != 0) {
755
        return lastComparison;
756
      }
757
    }
5719 rajveer 758
    lastComparison = Boolean.valueOf(isSetHotspotId()).compareTo(typedOther.isSetHotspotId());
759
    if (lastComparison != 0) {
760
      return lastComparison;
761
    }
762
    if (isSetHotspotId()) {
763
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hotspotId, typedOther.hotspotId);
764
      if (lastComparison != 0) {
765
        return lastComparison;
766
      }
767
    }
5553 rajveer 768
    lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
769
    if (lastComparison != 0) {
770
      return lastComparison;
771
    }
772
    if (isSetName()) {
773
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
774
      if (lastComparison != 0) {
775
        return lastComparison;
776
      }
777
    }
778
    lastComparison = Boolean.valueOf(isSetLine1()).compareTo(typedOther.isSetLine1());
779
    if (lastComparison != 0) {
780
      return lastComparison;
781
    }
782
    if (isSetLine1()) {
783
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.line1, typedOther.line1);
784
      if (lastComparison != 0) {
785
        return lastComparison;
786
      }
787
    }
788
    lastComparison = Boolean.valueOf(isSetLine2()).compareTo(typedOther.isSetLine2());
789
    if (lastComparison != 0) {
790
      return lastComparison;
791
    }
792
    if (isSetLine2()) {
793
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.line2, typedOther.line2);
794
      if (lastComparison != 0) {
795
        return lastComparison;
796
      }
797
    }
798
    lastComparison = Boolean.valueOf(isSetCity()).compareTo(typedOther.isSetCity());
799
    if (lastComparison != 0) {
800
      return lastComparison;
801
    }
802
    if (isSetCity()) {
803
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.city, typedOther.city);
804
      if (lastComparison != 0) {
805
        return lastComparison;
806
      }
807
    }
808
    lastComparison = Boolean.valueOf(isSetState()).compareTo(typedOther.isSetState());
809
    if (lastComparison != 0) {
810
      return lastComparison;
811
    }
812
    if (isSetState()) {
813
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, typedOther.state);
814
      if (lastComparison != 0) {
815
        return lastComparison;
816
      }
817
    }
818
    lastComparison = Boolean.valueOf(isSetPin()).compareTo(typedOther.isSetPin());
819
    if (lastComparison != 0) {
820
      return lastComparison;
821
    }
822
    if (isSetPin()) {
823
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pin, typedOther.pin);
824
      if (lastComparison != 0) {
825
        return lastComparison;
826
      }
827
    }
828
    lastComparison = Boolean.valueOf(isSetPhone()).compareTo(typedOther.isSetPhone());
829
    if (lastComparison != 0) {
830
      return lastComparison;
831
    }
832
    if (isSetPhone()) {
833
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.phone, typedOther.phone);
834
      if (lastComparison != 0) {
835
        return lastComparison;
836
      }
837
    }
5739 rajveer 838
    lastComparison = Boolean.valueOf(isSetZone()).compareTo(typedOther.isSetZone());
839
    if (lastComparison != 0) {
840
      return lastComparison;
841
    }
842
    if (isSetZone()) {
843
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.zone, typedOther.zone);
844
      if (lastComparison != 0) {
845
        return lastComparison;
846
      }
847
    }
5553 rajveer 848
    return 0;
849
  }
850
 
851
  public _Fields fieldForId(int fieldId) {
852
    return _Fields.findByThriftId(fieldId);
853
  }
854
 
855
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
856
    org.apache.thrift.protocol.TField field;
857
    iprot.readStructBegin();
858
    while (true)
859
    {
860
      field = iprot.readFieldBegin();
861
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
862
        break;
863
      }
864
      switch (field.id) {
865
        case 1: // ID
866
          if (field.type == org.apache.thrift.protocol.TType.I64) {
867
            this.id = iprot.readI64();
868
            setIdIsSet(true);
869
          } else { 
870
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
871
          }
872
          break;
5719 rajveer 873
        case 2: // HOTSPOT_ID
5553 rajveer 874
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
5719 rajveer 875
            this.hotspotId = iprot.readString();
876
          } else { 
877
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
878
          }
879
          break;
880
        case 3: // NAME
881
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
5553 rajveer 882
            this.name = iprot.readString();
883
          } else { 
884
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
885
          }
886
          break;
5719 rajveer 887
        case 4: // LINE1
5553 rajveer 888
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
889
            this.line1 = iprot.readString();
890
          } else { 
891
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
892
          }
893
          break;
5719 rajveer 894
        case 5: // LINE2
5553 rajveer 895
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
896
            this.line2 = iprot.readString();
897
          } else { 
898
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
899
          }
900
          break;
5719 rajveer 901
        case 6: // CITY
5553 rajveer 902
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
903
            this.city = iprot.readString();
904
          } else { 
905
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
906
          }
907
          break;
5719 rajveer 908
        case 7: // STATE
5553 rajveer 909
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
910
            this.state = iprot.readString();
911
          } else { 
912
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
913
          }
914
          break;
5719 rajveer 915
        case 8: // PIN
5553 rajveer 916
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
917
            this.pin = iprot.readString();
918
          } else { 
919
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
920
          }
921
          break;
5719 rajveer 922
        case 9: // PHONE
5553 rajveer 923
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
924
            this.phone = iprot.readString();
925
          } else { 
926
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
927
          }
928
          break;
5739 rajveer 929
        case 10: // ZONE
930
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
931
            this.zone = iprot.readString();
932
          } else { 
933
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
934
          }
935
          break;
5553 rajveer 936
        default:
937
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
938
      }
939
      iprot.readFieldEnd();
940
    }
941
    iprot.readStructEnd();
942
    validate();
943
  }
944
 
945
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
946
    validate();
947
 
948
    oprot.writeStructBegin(STRUCT_DESC);
949
    oprot.writeFieldBegin(ID_FIELD_DESC);
950
    oprot.writeI64(this.id);
951
    oprot.writeFieldEnd();
5719 rajveer 952
    if (this.hotspotId != null) {
953
      oprot.writeFieldBegin(HOTSPOT_ID_FIELD_DESC);
954
      oprot.writeString(this.hotspotId);
955
      oprot.writeFieldEnd();
956
    }
5553 rajveer 957
    if (this.name != null) {
958
      oprot.writeFieldBegin(NAME_FIELD_DESC);
959
      oprot.writeString(this.name);
960
      oprot.writeFieldEnd();
961
    }
962
    if (this.line1 != null) {
963
      oprot.writeFieldBegin(LINE1_FIELD_DESC);
964
      oprot.writeString(this.line1);
965
      oprot.writeFieldEnd();
966
    }
967
    if (this.line2 != null) {
968
      oprot.writeFieldBegin(LINE2_FIELD_DESC);
969
      oprot.writeString(this.line2);
970
      oprot.writeFieldEnd();
971
    }
972
    if (this.city != null) {
973
      oprot.writeFieldBegin(CITY_FIELD_DESC);
974
      oprot.writeString(this.city);
975
      oprot.writeFieldEnd();
976
    }
977
    if (this.state != null) {
978
      oprot.writeFieldBegin(STATE_FIELD_DESC);
979
      oprot.writeString(this.state);
980
      oprot.writeFieldEnd();
981
    }
982
    if (this.pin != null) {
983
      oprot.writeFieldBegin(PIN_FIELD_DESC);
984
      oprot.writeString(this.pin);
985
      oprot.writeFieldEnd();
986
    }
987
    if (this.phone != null) {
988
      oprot.writeFieldBegin(PHONE_FIELD_DESC);
989
      oprot.writeString(this.phone);
990
      oprot.writeFieldEnd();
991
    }
5739 rajveer 992
    if (this.zone != null) {
993
      oprot.writeFieldBegin(ZONE_FIELD_DESC);
994
      oprot.writeString(this.zone);
995
      oprot.writeFieldEnd();
996
    }
5553 rajveer 997
    oprot.writeFieldStop();
998
    oprot.writeStructEnd();
999
  }
1000
 
1001
  @Override
1002
  public String toString() {
1003
    StringBuilder sb = new StringBuilder("PickupStore(");
1004
    boolean first = true;
1005
 
1006
    sb.append("id:");
1007
    sb.append(this.id);
1008
    first = false;
1009
    if (!first) sb.append(", ");
5719 rajveer 1010
    sb.append("hotspotId:");
1011
    if (this.hotspotId == null) {
1012
      sb.append("null");
1013
    } else {
1014
      sb.append(this.hotspotId);
1015
    }
1016
    first = false;
1017
    if (!first) sb.append(", ");
5553 rajveer 1018
    sb.append("name:");
1019
    if (this.name == null) {
1020
      sb.append("null");
1021
    } else {
1022
      sb.append(this.name);
1023
    }
1024
    first = false;
1025
    if (!first) sb.append(", ");
1026
    sb.append("line1:");
1027
    if (this.line1 == null) {
1028
      sb.append("null");
1029
    } else {
1030
      sb.append(this.line1);
1031
    }
1032
    first = false;
1033
    if (!first) sb.append(", ");
1034
    sb.append("line2:");
1035
    if (this.line2 == null) {
1036
      sb.append("null");
1037
    } else {
1038
      sb.append(this.line2);
1039
    }
1040
    first = false;
1041
    if (!first) sb.append(", ");
1042
    sb.append("city:");
1043
    if (this.city == null) {
1044
      sb.append("null");
1045
    } else {
1046
      sb.append(this.city);
1047
    }
1048
    first = false;
1049
    if (!first) sb.append(", ");
1050
    sb.append("state:");
1051
    if (this.state == null) {
1052
      sb.append("null");
1053
    } else {
1054
      sb.append(this.state);
1055
    }
1056
    first = false;
1057
    if (!first) sb.append(", ");
1058
    sb.append("pin:");
1059
    if (this.pin == null) {
1060
      sb.append("null");
1061
    } else {
1062
      sb.append(this.pin);
1063
    }
1064
    first = false;
1065
    if (!first) sb.append(", ");
1066
    sb.append("phone:");
1067
    if (this.phone == null) {
1068
      sb.append("null");
1069
    } else {
1070
      sb.append(this.phone);
1071
    }
1072
    first = false;
5739 rajveer 1073
    if (!first) sb.append(", ");
1074
    sb.append("zone:");
1075
    if (this.zone == null) {
1076
      sb.append("null");
1077
    } else {
1078
      sb.append(this.zone);
1079
    }
1080
    first = false;
5553 rajveer 1081
    sb.append(")");
1082
    return sb.toString();
1083
  }
1084
 
1085
  public void validate() throws org.apache.thrift.TException {
1086
    // check for required fields
1087
  }
1088
 
1089
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1090
    try {
1091
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1092
    } catch (org.apache.thrift.TException te) {
1093
      throw new java.io.IOException(te);
1094
    }
1095
  }
1096
 
1097
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1098
    try {
1099
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1100
      __isset_bit_vector = new BitSet(1);
1101
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1102
    } catch (org.apache.thrift.TException te) {
1103
      throw new java.io.IOException(te);
1104
    }
1105
  }
1106
 
1107
}
1108