Subversion Repositories SmartDukaan

Rev

Rev 5719 | Rev 5813 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5719 Rev 5739
Line 30... Line 30...
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);
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);
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);
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);
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);
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);
-
 
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);
35
 
36
 
36
  private long id; // required
37
  private long id; // required
37
  private String hotspotId; // required
38
  private String hotspotId; // required
38
  private String name; // required
39
  private String name; // required
39
  private String line1; // required
40
  private String line1; // required
40
  private String line2; // required
41
  private String line2; // required
41
  private String city; // required
42
  private String city; // required
42
  private String state; // required
43
  private String state; // required
43
  private String pin; // required
44
  private String pin; // required
44
  private String phone; // required
45
  private String phone; // required
-
 
46
  private String zone; // required
45
 
47
 
46
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
48
  /** 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 {
49
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
48
    ID((short)1, "id"),
50
    ID((short)1, "id"),
49
    HOTSPOT_ID((short)2, "hotspotId"),
51
    HOTSPOT_ID((short)2, "hotspotId"),
Line 51... Line 53...
51
    LINE1((short)4, "line1"),
53
    LINE1((short)4, "line1"),
52
    LINE2((short)5, "line2"),
54
    LINE2((short)5, "line2"),
53
    CITY((short)6, "city"),
55
    CITY((short)6, "city"),
54
    STATE((short)7, "state"),
56
    STATE((short)7, "state"),
55
    PIN((short)8, "pin"),
57
    PIN((short)8, "pin"),
56
    PHONE((short)9, "phone");
58
    PHONE((short)9, "phone"),
-
 
59
    ZONE((short)10, "zone");
57
 
60
 
58
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
61
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
59
 
62
 
60
    static {
63
    static {
61
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
64
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 84... Line 87...
84
          return STATE;
87
          return STATE;
85
        case 8: // PIN
88
        case 8: // PIN
86
          return PIN;
89
          return PIN;
87
        case 9: // PHONE
90
        case 9: // PHONE
88
          return PHONE;
91
          return PHONE;
-
 
92
        case 10: // ZONE
-
 
93
          return ZONE;
89
        default:
94
        default:
90
          return null;
95
          return null;
91
      }
96
      }
92
    }
97
    }
93
 
98
 
Line 148... Line 153...
148
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
153
        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, 
154
    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)));
155
        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, 
156
    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)));
157
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
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)));
153
    metaDataMap = Collections.unmodifiableMap(tmpMap);
160
    metaDataMap = Collections.unmodifiableMap(tmpMap);
154
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PickupStore.class, metaDataMap);
161
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PickupStore.class, metaDataMap);
155
  }
162
  }
156
 
163
 
157
  public PickupStore() {
164
  public PickupStore() {
Line 164... Line 171...
164
    String line1,
171
    String line1,
165
    String line2,
172
    String line2,
166
    String city,
173
    String city,
167
    String state,
174
    String state,
168
    String pin,
175
    String pin,
169
    String phone)
176
    String phone,
-
 
177
    String zone)
170
  {
178
  {
171
    this();
179
    this();
172
    this.id = id;
180
    this.id = id;
173
    setIdIsSet(true);
181
    setIdIsSet(true);
174
    this.hotspotId = hotspotId;
182
    this.hotspotId = hotspotId;
Line 177... Line 185...
177
    this.line2 = line2;
185
    this.line2 = line2;
178
    this.city = city;
186
    this.city = city;
179
    this.state = state;
187
    this.state = state;
180
    this.pin = pin;
188
    this.pin = pin;
181
    this.phone = phone;
189
    this.phone = phone;
-
 
190
    this.zone = zone;
182
  }
191
  }
183
 
192
 
184
  /**
193
  /**
185
   * Performs a deep copy on <i>other</i>.
194
   * Performs a deep copy on <i>other</i>.
186
   */
195
   */
Line 210... Line 219...
210
      this.pin = other.pin;
219
      this.pin = other.pin;
211
    }
220
    }
212
    if (other.isSetPhone()) {
221
    if (other.isSetPhone()) {
213
      this.phone = other.phone;
222
      this.phone = other.phone;
214
    }
223
    }
-
 
224
    if (other.isSetZone()) {
-
 
225
      this.zone = other.zone;
-
 
226
    }
215
  }
227
  }
216
 
228
 
217
  public PickupStore deepCopy() {
229
  public PickupStore deepCopy() {
218
    return new PickupStore(this);
230
    return new PickupStore(this);
219
  }
231
  }
Line 228... Line 240...
228
    this.line2 = null;
240
    this.line2 = null;
229
    this.city = null;
241
    this.city = null;
230
    this.state = null;
242
    this.state = null;
231
    this.pin = null;
243
    this.pin = null;
232
    this.phone = null;
244
    this.phone = null;
-
 
245
    this.zone = null;
233
  }
246
  }
234
 
247
 
235
  public long getId() {
248
  public long getId() {
236
    return this.id;
249
    return this.id;
237
  }
250
  }
Line 436... Line 449...
436
    if (!value) {
449
    if (!value) {
437
      this.phone = null;
450
      this.phone = null;
438
    }
451
    }
439
  }
452
  }
440
 
453
 
-
 
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
 
441
  public void setFieldValue(_Fields field, Object value) {
477
  public void setFieldValue(_Fields field, Object value) {
442
    switch (field) {
478
    switch (field) {
443
    case ID:
479
    case ID:
444
      if (value == null) {
480
      if (value == null) {
445
        unsetId();
481
        unsetId();
Line 510... Line 546...
510
      } else {
546
      } else {
511
        setPhone((String)value);
547
        setPhone((String)value);
512
      }
548
      }
513
      break;
549
      break;
514
 
550
 
-
 
551
    case ZONE:
-
 
552
      if (value == null) {
-
 
553
        unsetZone();
-
 
554
      } else {
-
 
555
        setZone((String)value);
-
 
556
      }
-
 
557
      break;
-
 
558
 
515
    }
559
    }
516
  }
560
  }
517
 
561
 
518
  public Object getFieldValue(_Fields field) {
562
  public Object getFieldValue(_Fields field) {
519
    switch (field) {
563
    switch (field) {
Line 542... Line 586...
542
      return getPin();
586
      return getPin();
543
 
587
 
544
    case PHONE:
588
    case PHONE:
545
      return getPhone();
589
      return getPhone();
546
 
590
 
-
 
591
    case ZONE:
-
 
592
      return getZone();
-
 
593
 
547
    }
594
    }
548
    throw new IllegalStateException();
595
    throw new IllegalStateException();
549
  }
596
  }
550
 
597
 
551
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
598
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 571... Line 618...
571
      return isSetState();
618
      return isSetState();
572
    case PIN:
619
    case PIN:
573
      return isSetPin();
620
      return isSetPin();
574
    case PHONE:
621
    case PHONE:
575
      return isSetPhone();
622
      return isSetPhone();
-
 
623
    case ZONE:
-
 
624
      return isSetZone();
576
    }
625
    }
577
    throw new IllegalStateException();
626
    throw new IllegalStateException();
578
  }
627
  }
579
 
628
 
580
  @Override
629
  @Override
Line 669... Line 718...
669
        return false;
718
        return false;
670
      if (!this.phone.equals(that.phone))
719
      if (!this.phone.equals(that.phone))
671
        return false;
720
        return false;
672
    }
721
    }
673
 
722
 
-
 
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
 
674
    return true;
732
    return true;
675
  }
733
  }
676
 
734
 
677
  @Override
735
  @Override
678
  public int hashCode() {
736
  public int hashCode() {
Line 775... Line 833...
775
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.phone, typedOther.phone);
833
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.phone, typedOther.phone);
776
      if (lastComparison != 0) {
834
      if (lastComparison != 0) {
777
        return lastComparison;
835
        return lastComparison;
778
      }
836
      }
779
    }
837
    }
-
 
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
    }
780
    return 0;
848
    return 0;
781
  }
849
  }
782
 
850
 
783
  public _Fields fieldForId(int fieldId) {
851
  public _Fields fieldForId(int fieldId) {
784
    return _Fields.findByThriftId(fieldId);
852
    return _Fields.findByThriftId(fieldId);
Line 856... Line 924...
856
            this.phone = iprot.readString();
924
            this.phone = iprot.readString();
857
          } else { 
925
          } else { 
858
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
926
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
859
          }
927
          }
860
          break;
928
          break;
-
 
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;
861
        default:
936
        default:
862
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
937
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
863
      }
938
      }
864
      iprot.readFieldEnd();
939
      iprot.readFieldEnd();
865
    }
940
    }
Line 912... Line 987...
912
    if (this.phone != null) {
987
    if (this.phone != null) {
913
      oprot.writeFieldBegin(PHONE_FIELD_DESC);
988
      oprot.writeFieldBegin(PHONE_FIELD_DESC);
914
      oprot.writeString(this.phone);
989
      oprot.writeString(this.phone);
915
      oprot.writeFieldEnd();
990
      oprot.writeFieldEnd();
916
    }
991
    }
-
 
992
    if (this.zone != null) {
-
 
993
      oprot.writeFieldBegin(ZONE_FIELD_DESC);
-
 
994
      oprot.writeString(this.zone);
-
 
995
      oprot.writeFieldEnd();
-
 
996
    }
917
    oprot.writeFieldStop();
997
    oprot.writeFieldStop();
918
    oprot.writeStructEnd();
998
    oprot.writeStructEnd();
919
  }
999
  }
920
 
1000
 
921
  @Override
1001
  @Override
Line 988... Line 1068...
988
      sb.append("null");
1068
      sb.append("null");
989
    } else {
1069
    } else {
990
      sb.append(this.phone);
1070
      sb.append(this.phone);
991
    }
1071
    }
992
    first = false;
1072
    first = false;
-
 
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;
993
    sb.append(")");
1081
    sb.append(")");
994
    return sb.toString();
1082
    return sb.toString();
995
  }
1083
  }
996
 
1084
 
997
  public void validate() throws org.apache.thrift.TException {
1085
  public void validate() throws org.apache.thrift.TException {