Subversion Repositories SmartDukaan

Rev

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

Rev 4009 Rev 4865
Line 26... Line 26...
26
  private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)1);
26
  private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)1);
27
  private static final org.apache.thrift.protocol.TField PROVIDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("providerId", org.apache.thrift.protocol.TType.I64, (short)2);
27
  private static final org.apache.thrift.protocol.TField PROVIDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("providerId", org.apache.thrift.protocol.TType.I64, (short)2);
28
  private static final org.apache.thrift.protocol.TField DELIVERY_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("deliveryTime", org.apache.thrift.protocol.TType.I64, (short)3);
28
  private static final org.apache.thrift.protocol.TField DELIVERY_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("deliveryTime", org.apache.thrift.protocol.TType.I64, (short)3);
29
  private static final org.apache.thrift.protocol.TField AIRWAY_BILLNO_FIELD_DESC = new org.apache.thrift.protocol.TField("airway_billno", org.apache.thrift.protocol.TType.STRING, (short)4);
29
  private static final org.apache.thrift.protocol.TField AIRWAY_BILLNO_FIELD_DESC = new org.apache.thrift.protocol.TField("airway_billno", org.apache.thrift.protocol.TType.STRING, (short)4);
30
  private static final org.apache.thrift.protocol.TField SHIPPING_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("shippingTime", org.apache.thrift.protocol.TType.I64, (short)5);
30
  private static final org.apache.thrift.protocol.TField SHIPPING_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("shippingTime", org.apache.thrift.protocol.TType.I64, (short)5);
-
 
31
  private static final org.apache.thrift.protocol.TField COD_ALLOWED_FIELD_DESC = new org.apache.thrift.protocol.TField("codAllowed", org.apache.thrift.protocol.TType.BOOL, (short)6);
31
 
32
 
32
  private long warehouseId; // required
33
  private long warehouseId; // required
33
  private long providerId; // required
34
  private long providerId; // required
34
  private long deliveryTime; // required
35
  private long deliveryTime; // required
35
  private String airway_billno; // required
36
  private String airway_billno; // required
36
  private long shippingTime; // required
37
  private long shippingTime; // required
-
 
38
  private boolean codAllowed; // required
37
 
39
 
38
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
40
  /** 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 {
41
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
40
    WAREHOUSE_ID((short)1, "warehouseId"),
42
    WAREHOUSE_ID((short)1, "warehouseId"),
41
    PROVIDER_ID((short)2, "providerId"),
43
    PROVIDER_ID((short)2, "providerId"),
42
    DELIVERY_TIME((short)3, "deliveryTime"),
44
    DELIVERY_TIME((short)3, "deliveryTime"),
43
    AIRWAY_BILLNO((short)4, "airway_billno"),
45
    AIRWAY_BILLNO((short)4, "airway_billno"),
44
    SHIPPING_TIME((short)5, "shippingTime");
46
    SHIPPING_TIME((short)5, "shippingTime"),
-
 
47
    COD_ALLOWED((short)6, "codAllowed");
45
 
48
 
46
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
49
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
47
 
50
 
48
    static {
51
    static {
49
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
52
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 64... Line 67...
64
          return DELIVERY_TIME;
67
          return DELIVERY_TIME;
65
        case 4: // AIRWAY_BILLNO
68
        case 4: // AIRWAY_BILLNO
66
          return AIRWAY_BILLNO;
69
          return AIRWAY_BILLNO;
67
        case 5: // SHIPPING_TIME
70
        case 5: // SHIPPING_TIME
68
          return SHIPPING_TIME;
71
          return SHIPPING_TIME;
-
 
72
        case 6: // COD_ALLOWED
-
 
73
          return COD_ALLOWED;
69
        default:
74
        default:
70
          return null;
75
          return null;
71
      }
76
      }
72
    }
77
    }
73
 
78
 
Line 108... Line 113...
108
  // isset id assignments
113
  // isset id assignments
109
  private static final int __WAREHOUSEID_ISSET_ID = 0;
114
  private static final int __WAREHOUSEID_ISSET_ID = 0;
110
  private static final int __PROVIDERID_ISSET_ID = 1;
115
  private static final int __PROVIDERID_ISSET_ID = 1;
111
  private static final int __DELIVERYTIME_ISSET_ID = 2;
116
  private static final int __DELIVERYTIME_ISSET_ID = 2;
112
  private static final int __SHIPPINGTIME_ISSET_ID = 3;
117
  private static final int __SHIPPINGTIME_ISSET_ID = 3;
-
 
118
  private static final int __CODALLOWED_ISSET_ID = 4;
113
  private BitSet __isset_bit_vector = new BitSet(4);
119
  private BitSet __isset_bit_vector = new BitSet(5);
114
 
120
 
115
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
121
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
116
  static {
122
  static {
117
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
123
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
118
    tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
124
    tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 123... Line 129...
123
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
129
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
124
    tmpMap.put(_Fields.AIRWAY_BILLNO, new org.apache.thrift.meta_data.FieldMetaData("airway_billno", org.apache.thrift.TFieldRequirementType.DEFAULT, 
130
    tmpMap.put(_Fields.AIRWAY_BILLNO, new org.apache.thrift.meta_data.FieldMetaData("airway_billno", org.apache.thrift.TFieldRequirementType.DEFAULT, 
125
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
131
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
126
    tmpMap.put(_Fields.SHIPPING_TIME, new org.apache.thrift.meta_data.FieldMetaData("shippingTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
132
    tmpMap.put(_Fields.SHIPPING_TIME, new org.apache.thrift.meta_data.FieldMetaData("shippingTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
127
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
133
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
134
    tmpMap.put(_Fields.COD_ALLOWED, new org.apache.thrift.meta_data.FieldMetaData("codAllowed", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
135
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
128
    metaDataMap = Collections.unmodifiableMap(tmpMap);
136
    metaDataMap = Collections.unmodifiableMap(tmpMap);
129
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LogisticsInfo.class, metaDataMap);
137
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LogisticsInfo.class, metaDataMap);
130
  }
138
  }
131
 
139
 
132
  public LogisticsInfo() {
140
  public LogisticsInfo() {
Line 135... Line 143...
135
  public LogisticsInfo(
143
  public LogisticsInfo(
136
    long warehouseId,
144
    long warehouseId,
137
    long providerId,
145
    long providerId,
138
    long deliveryTime,
146
    long deliveryTime,
139
    String airway_billno,
147
    String airway_billno,
140
    long shippingTime)
148
    long shippingTime,
-
 
149
    boolean codAllowed)
141
  {
150
  {
142
    this();
151
    this();
143
    this.warehouseId = warehouseId;
152
    this.warehouseId = warehouseId;
144
    setWarehouseIdIsSet(true);
153
    setWarehouseIdIsSet(true);
145
    this.providerId = providerId;
154
    this.providerId = providerId;
Line 147... Line 156...
147
    this.deliveryTime = deliveryTime;
156
    this.deliveryTime = deliveryTime;
148
    setDeliveryTimeIsSet(true);
157
    setDeliveryTimeIsSet(true);
149
    this.airway_billno = airway_billno;
158
    this.airway_billno = airway_billno;
150
    this.shippingTime = shippingTime;
159
    this.shippingTime = shippingTime;
151
    setShippingTimeIsSet(true);
160
    setShippingTimeIsSet(true);
-
 
161
    this.codAllowed = codAllowed;
-
 
162
    setCodAllowedIsSet(true);
152
  }
163
  }
153
 
164
 
154
  /**
165
  /**
155
   * Performs a deep copy on <i>other</i>.
166
   * Performs a deep copy on <i>other</i>.
156
   */
167
   */
Line 162... Line 173...
162
    this.deliveryTime = other.deliveryTime;
173
    this.deliveryTime = other.deliveryTime;
163
    if (other.isSetAirway_billno()) {
174
    if (other.isSetAirway_billno()) {
164
      this.airway_billno = other.airway_billno;
175
      this.airway_billno = other.airway_billno;
165
    }
176
    }
166
    this.shippingTime = other.shippingTime;
177
    this.shippingTime = other.shippingTime;
-
 
178
    this.codAllowed = other.codAllowed;
167
  }
179
  }
168
 
180
 
169
  public LogisticsInfo deepCopy() {
181
  public LogisticsInfo deepCopy() {
170
    return new LogisticsInfo(this);
182
    return new LogisticsInfo(this);
171
  }
183
  }
Line 179... Line 191...
179
    setDeliveryTimeIsSet(false);
191
    setDeliveryTimeIsSet(false);
180
    this.deliveryTime = 0;
192
    this.deliveryTime = 0;
181
    this.airway_billno = null;
193
    this.airway_billno = null;
182
    setShippingTimeIsSet(false);
194
    setShippingTimeIsSet(false);
183
    this.shippingTime = 0;
195
    this.shippingTime = 0;
-
 
196
    setCodAllowedIsSet(false);
-
 
197
    this.codAllowed = false;
184
  }
198
  }
185
 
199
 
186
  public long getWarehouseId() {
200
  public long getWarehouseId() {
187
    return this.warehouseId;
201
    return this.warehouseId;
188
  }
202
  }
Line 292... Line 306...
292
 
306
 
293
  public void setShippingTimeIsSet(boolean value) {
307
  public void setShippingTimeIsSet(boolean value) {
294
    __isset_bit_vector.set(__SHIPPINGTIME_ISSET_ID, value);
308
    __isset_bit_vector.set(__SHIPPINGTIME_ISSET_ID, value);
295
  }
309
  }
296
 
310
 
-
 
311
  public boolean isCodAllowed() {
-
 
312
    return this.codAllowed;
-
 
313
  }
-
 
314
 
-
 
315
  public void setCodAllowed(boolean codAllowed) {
-
 
316
    this.codAllowed = codAllowed;
-
 
317
    setCodAllowedIsSet(true);
-
 
318
  }
-
 
319
 
-
 
320
  public void unsetCodAllowed() {
-
 
321
    __isset_bit_vector.clear(__CODALLOWED_ISSET_ID);
-
 
322
  }
-
 
323
 
-
 
324
  /** Returns true if field codAllowed is set (has been assigned a value) and false otherwise */
-
 
325
  public boolean isSetCodAllowed() {
-
 
326
    return __isset_bit_vector.get(__CODALLOWED_ISSET_ID);
-
 
327
  }
-
 
328
 
-
 
329
  public void setCodAllowedIsSet(boolean value) {
-
 
330
    __isset_bit_vector.set(__CODALLOWED_ISSET_ID, value);
-
 
331
  }
-
 
332
 
297
  public void setFieldValue(_Fields field, Object value) {
333
  public void setFieldValue(_Fields field, Object value) {
298
    switch (field) {
334
    switch (field) {
299
    case WAREHOUSE_ID:
335
    case WAREHOUSE_ID:
300
      if (value == null) {
336
      if (value == null) {
301
        unsetWarehouseId();
337
        unsetWarehouseId();
Line 334... Line 370...
334
      } else {
370
      } else {
335
        setShippingTime((Long)value);
371
        setShippingTime((Long)value);
336
      }
372
      }
337
      break;
373
      break;
338
 
374
 
-
 
375
    case COD_ALLOWED:
-
 
376
      if (value == null) {
-
 
377
        unsetCodAllowed();
-
 
378
      } else {
-
 
379
        setCodAllowed((Boolean)value);
-
 
380
      }
-
 
381
      break;
-
 
382
 
339
    }
383
    }
340
  }
384
  }
341
 
385
 
342
  public Object getFieldValue(_Fields field) {
386
  public Object getFieldValue(_Fields field) {
343
    switch (field) {
387
    switch (field) {
Line 354... Line 398...
354
      return getAirway_billno();
398
      return getAirway_billno();
355
 
399
 
356
    case SHIPPING_TIME:
400
    case SHIPPING_TIME:
357
      return Long.valueOf(getShippingTime());
401
      return Long.valueOf(getShippingTime());
358
 
402
 
-
 
403
    case COD_ALLOWED:
-
 
404
      return Boolean.valueOf(isCodAllowed());
-
 
405
 
359
    }
406
    }
360
    throw new IllegalStateException();
407
    throw new IllegalStateException();
361
  }
408
  }
362
 
409
 
363
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
410
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 375... Line 422...
375
      return isSetDeliveryTime();
422
      return isSetDeliveryTime();
376
    case AIRWAY_BILLNO:
423
    case AIRWAY_BILLNO:
377
      return isSetAirway_billno();
424
      return isSetAirway_billno();
378
    case SHIPPING_TIME:
425
    case SHIPPING_TIME:
379
      return isSetShippingTime();
426
      return isSetShippingTime();
-
 
427
    case COD_ALLOWED:
-
 
428
      return isSetCodAllowed();
380
    }
429
    }
381
    throw new IllegalStateException();
430
    throw new IllegalStateException();
382
  }
431
  }
383
 
432
 
384
  @Override
433
  @Override
Line 437... Line 486...
437
        return false;
486
        return false;
438
      if (this.shippingTime != that.shippingTime)
487
      if (this.shippingTime != that.shippingTime)
439
        return false;
488
        return false;
440
    }
489
    }
441
 
490
 
-
 
491
    boolean this_present_codAllowed = true;
-
 
492
    boolean that_present_codAllowed = true;
-
 
493
    if (this_present_codAllowed || that_present_codAllowed) {
-
 
494
      if (!(this_present_codAllowed && that_present_codAllowed))
-
 
495
        return false;
-
 
496
      if (this.codAllowed != that.codAllowed)
-
 
497
        return false;
-
 
498
    }
-
 
499
 
442
    return true;
500
    return true;
443
  }
501
  }
444
 
502
 
445
  @Override
503
  @Override
446
  public int hashCode() {
504
  public int hashCode() {
Line 503... Line 561...
503
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shippingTime, typedOther.shippingTime);
561
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shippingTime, typedOther.shippingTime);
504
      if (lastComparison != 0) {
562
      if (lastComparison != 0) {
505
        return lastComparison;
563
        return lastComparison;
506
      }
564
      }
507
    }
565
    }
-
 
566
    lastComparison = Boolean.valueOf(isSetCodAllowed()).compareTo(typedOther.isSetCodAllowed());
-
 
567
    if (lastComparison != 0) {
-
 
568
      return lastComparison;
-
 
569
    }
-
 
570
    if (isSetCodAllowed()) {
-
 
571
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.codAllowed, typedOther.codAllowed);
-
 
572
      if (lastComparison != 0) {
-
 
573
        return lastComparison;
-
 
574
      }
-
 
575
    }
508
    return 0;
576
    return 0;
509
  }
577
  }
510
 
578
 
511
  public _Fields fieldForId(int fieldId) {
579
  public _Fields fieldForId(int fieldId) {
512
    return _Fields.findByThriftId(fieldId);
580
    return _Fields.findByThriftId(fieldId);
Line 559... Line 627...
559
            setShippingTimeIsSet(true);
627
            setShippingTimeIsSet(true);
560
          } else { 
628
          } else { 
561
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
629
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
562
          }
630
          }
563
          break;
631
          break;
-
 
632
        case 6: // COD_ALLOWED
-
 
633
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-
 
634
            this.codAllowed = iprot.readBool();
-
 
635
            setCodAllowedIsSet(true);
-
 
636
          } else { 
-
 
637
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
638
          }
-
 
639
          break;
564
        default:
640
        default:
565
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
641
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
566
      }
642
      }
567
      iprot.readFieldEnd();
643
      iprot.readFieldEnd();
568
    }
644
    }
Line 589... Line 665...
589
      oprot.writeFieldEnd();
665
      oprot.writeFieldEnd();
590
    }
666
    }
591
    oprot.writeFieldBegin(SHIPPING_TIME_FIELD_DESC);
667
    oprot.writeFieldBegin(SHIPPING_TIME_FIELD_DESC);
592
    oprot.writeI64(this.shippingTime);
668
    oprot.writeI64(this.shippingTime);
593
    oprot.writeFieldEnd();
669
    oprot.writeFieldEnd();
-
 
670
    oprot.writeFieldBegin(COD_ALLOWED_FIELD_DESC);
-
 
671
    oprot.writeBool(this.codAllowed);
-
 
672
    oprot.writeFieldEnd();
594
    oprot.writeFieldStop();
673
    oprot.writeFieldStop();
595
    oprot.writeStructEnd();
674
    oprot.writeStructEnd();
596
  }
675
  }
597
 
676
 
598
  @Override
677
  @Override
Line 621... Line 700...
621
    first = false;
700
    first = false;
622
    if (!first) sb.append(", ");
701
    if (!first) sb.append(", ");
623
    sb.append("shippingTime:");
702
    sb.append("shippingTime:");
624
    sb.append(this.shippingTime);
703
    sb.append(this.shippingTime);
625
    first = false;
704
    first = false;
-
 
705
    if (!first) sb.append(", ");
-
 
706
    sb.append("codAllowed:");
-
 
707
    sb.append(this.codAllowed);
-
 
708
    first = false;
626
    sb.append(")");
709
    sb.append(")");
627
    return sb.toString();
710
    return sb.toString();
628
  }
711
  }
629
 
712
 
630
  public void validate() throws org.apache.thrift.TException {
713
  public void validate() throws org.apache.thrift.TException {