Subversion Repositories SmartDukaan

Rev

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