Subversion Repositories SmartDukaan

Rev

Rev 6524 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6524 Rev 6725
Line 29... Line 29...
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
  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);
32
  private static final org.apache.thrift.protocol.TField FULFILMENT_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("fulfilmentWarehouseId", org.apache.thrift.protocol.TType.I64, (short)7);
32
  private static final org.apache.thrift.protocol.TField FULFILMENT_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("fulfilmentWarehouseId", org.apache.thrift.protocol.TType.I64, (short)7);
33
  private static final org.apache.thrift.protocol.TField OTG_AVAILABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("otgAvailable", org.apache.thrift.protocol.TType.BOOL, (short)8);
33
  private static final org.apache.thrift.protocol.TField OTG_AVAILABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("otgAvailable", org.apache.thrift.protocol.TType.BOOL, (short)8);
-
 
34
  private static final org.apache.thrift.protocol.TField DELIVERY_DELAY_FIELD_DESC = new org.apache.thrift.protocol.TField("deliveryDelay", org.apache.thrift.protocol.TType.I64, (short)9);
34
 
35
 
35
  private long warehouseId; // required
36
  private long warehouseId; // required
36
  private long providerId; // required
37
  private long providerId; // required
37
  private long deliveryTime; // required
38
  private long deliveryTime; // required
38
  private String airway_billno; // required
39
  private String airway_billno; // required
39
  private long shippingTime; // required
40
  private long shippingTime; // required
40
  private boolean codAllowed; // required
41
  private boolean codAllowed; // required
41
  private long fulfilmentWarehouseId; // required
42
  private long fulfilmentWarehouseId; // required
42
  private boolean otgAvailable; // required
43
  private boolean otgAvailable; // required
-
 
44
  private long deliveryDelay; // required
43
 
45
 
44
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
46
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
45
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
47
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
46
    WAREHOUSE_ID((short)1, "warehouseId"),
48
    WAREHOUSE_ID((short)1, "warehouseId"),
47
    PROVIDER_ID((short)2, "providerId"),
49
    PROVIDER_ID((short)2, "providerId"),
48
    DELIVERY_TIME((short)3, "deliveryTime"),
50
    DELIVERY_TIME((short)3, "deliveryTime"),
49
    AIRWAY_BILLNO((short)4, "airway_billno"),
51
    AIRWAY_BILLNO((short)4, "airway_billno"),
50
    SHIPPING_TIME((short)5, "shippingTime"),
52
    SHIPPING_TIME((short)5, "shippingTime"),
51
    COD_ALLOWED((short)6, "codAllowed"),
53
    COD_ALLOWED((short)6, "codAllowed"),
52
    FULFILMENT_WAREHOUSE_ID((short)7, "fulfilmentWarehouseId"),
54
    FULFILMENT_WAREHOUSE_ID((short)7, "fulfilmentWarehouseId"),
53
    OTG_AVAILABLE((short)8, "otgAvailable");
55
    OTG_AVAILABLE((short)8, "otgAvailable"),
-
 
56
    DELIVERY_DELAY((short)9, "deliveryDelay");
54
 
57
 
55
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
58
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
56
 
59
 
57
    static {
60
    static {
58
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
61
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 79... Line 82...
79
          return COD_ALLOWED;
82
          return COD_ALLOWED;
80
        case 7: // FULFILMENT_WAREHOUSE_ID
83
        case 7: // FULFILMENT_WAREHOUSE_ID
81
          return FULFILMENT_WAREHOUSE_ID;
84
          return FULFILMENT_WAREHOUSE_ID;
82
        case 8: // OTG_AVAILABLE
85
        case 8: // OTG_AVAILABLE
83
          return OTG_AVAILABLE;
86
          return OTG_AVAILABLE;
-
 
87
        case 9: // DELIVERY_DELAY
-
 
88
          return DELIVERY_DELAY;
84
        default:
89
        default:
85
          return null;
90
          return null;
86
      }
91
      }
87
    }
92
    }
88
 
93
 
Line 126... Line 131...
126
  private static final int __DELIVERYTIME_ISSET_ID = 2;
131
  private static final int __DELIVERYTIME_ISSET_ID = 2;
127
  private static final int __SHIPPINGTIME_ISSET_ID = 3;
132
  private static final int __SHIPPINGTIME_ISSET_ID = 3;
128
  private static final int __CODALLOWED_ISSET_ID = 4;
133
  private static final int __CODALLOWED_ISSET_ID = 4;
129
  private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 5;
134
  private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 5;
130
  private static final int __OTGAVAILABLE_ISSET_ID = 6;
135
  private static final int __OTGAVAILABLE_ISSET_ID = 6;
-
 
136
  private static final int __DELIVERYDELAY_ISSET_ID = 7;
131
  private BitSet __isset_bit_vector = new BitSet(7);
137
  private BitSet __isset_bit_vector = new BitSet(8);
132
 
138
 
133
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
139
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
134
  static {
140
  static {
135
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
141
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
136
    tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
142
    tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 147... Line 153...
147
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
153
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
148
    tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
154
    tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
149
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
155
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
150
    tmpMap.put(_Fields.OTG_AVAILABLE, new org.apache.thrift.meta_data.FieldMetaData("otgAvailable", org.apache.thrift.TFieldRequirementType.DEFAULT, 
156
    tmpMap.put(_Fields.OTG_AVAILABLE, new org.apache.thrift.meta_data.FieldMetaData("otgAvailable", org.apache.thrift.TFieldRequirementType.DEFAULT, 
151
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
157
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-
 
158
    tmpMap.put(_Fields.DELIVERY_DELAY, new org.apache.thrift.meta_data.FieldMetaData("deliveryDelay", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
159
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
152
    metaDataMap = Collections.unmodifiableMap(tmpMap);
160
    metaDataMap = Collections.unmodifiableMap(tmpMap);
153
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LogisticsInfo.class, metaDataMap);
161
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LogisticsInfo.class, metaDataMap);
154
  }
162
  }
155
 
163
 
156
  public LogisticsInfo() {
164
  public LogisticsInfo() {
Line 162... Line 170...
162
    long deliveryTime,
170
    long deliveryTime,
163
    String airway_billno,
171
    String airway_billno,
164
    long shippingTime,
172
    long shippingTime,
165
    boolean codAllowed,
173
    boolean codAllowed,
166
    long fulfilmentWarehouseId,
174
    long fulfilmentWarehouseId,
167
    boolean otgAvailable)
175
    boolean otgAvailable,
-
 
176
    long deliveryDelay)
168
  {
177
  {
169
    this();
178
    this();
170
    this.warehouseId = warehouseId;
179
    this.warehouseId = warehouseId;
171
    setWarehouseIdIsSet(true);
180
    setWarehouseIdIsSet(true);
172
    this.providerId = providerId;
181
    this.providerId = providerId;
Line 180... Line 189...
180
    setCodAllowedIsSet(true);
189
    setCodAllowedIsSet(true);
181
    this.fulfilmentWarehouseId = fulfilmentWarehouseId;
190
    this.fulfilmentWarehouseId = fulfilmentWarehouseId;
182
    setFulfilmentWarehouseIdIsSet(true);
191
    setFulfilmentWarehouseIdIsSet(true);
183
    this.otgAvailable = otgAvailable;
192
    this.otgAvailable = otgAvailable;
184
    setOtgAvailableIsSet(true);
193
    setOtgAvailableIsSet(true);
-
 
194
    this.deliveryDelay = deliveryDelay;
-
 
195
    setDeliveryDelayIsSet(true);
185
  }
196
  }
186
 
197
 
187
  /**
198
  /**
188
   * Performs a deep copy on <i>other</i>.
199
   * Performs a deep copy on <i>other</i>.
189
   */
200
   */
Line 198... Line 209...
198
    }
209
    }
199
    this.shippingTime = other.shippingTime;
210
    this.shippingTime = other.shippingTime;
200
    this.codAllowed = other.codAllowed;
211
    this.codAllowed = other.codAllowed;
201
    this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
212
    this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
202
    this.otgAvailable = other.otgAvailable;
213
    this.otgAvailable = other.otgAvailable;
-
 
214
    this.deliveryDelay = other.deliveryDelay;
203
  }
215
  }
204
 
216
 
205
  public LogisticsInfo deepCopy() {
217
  public LogisticsInfo deepCopy() {
206
    return new LogisticsInfo(this);
218
    return new LogisticsInfo(this);
207
  }
219
  }
Line 221... Line 233...
221
    this.codAllowed = false;
233
    this.codAllowed = false;
222
    setFulfilmentWarehouseIdIsSet(false);
234
    setFulfilmentWarehouseIdIsSet(false);
223
    this.fulfilmentWarehouseId = 0;
235
    this.fulfilmentWarehouseId = 0;
224
    setOtgAvailableIsSet(false);
236
    setOtgAvailableIsSet(false);
225
    this.otgAvailable = false;
237
    this.otgAvailable = false;
-
 
238
    setDeliveryDelayIsSet(false);
-
 
239
    this.deliveryDelay = 0;
226
  }
240
  }
227
 
241
 
228
  public long getWarehouseId() {
242
  public long getWarehouseId() {
229
    return this.warehouseId;
243
    return this.warehouseId;
230
  }
244
  }
Line 400... Line 414...
400
 
414
 
401
  public void setOtgAvailableIsSet(boolean value) {
415
  public void setOtgAvailableIsSet(boolean value) {
402
    __isset_bit_vector.set(__OTGAVAILABLE_ISSET_ID, value);
416
    __isset_bit_vector.set(__OTGAVAILABLE_ISSET_ID, value);
403
  }
417
  }
404
 
418
 
-
 
419
  public long getDeliveryDelay() {
-
 
420
    return this.deliveryDelay;
-
 
421
  }
-
 
422
 
-
 
423
  public void setDeliveryDelay(long deliveryDelay) {
-
 
424
    this.deliveryDelay = deliveryDelay;
-
 
425
    setDeliveryDelayIsSet(true);
-
 
426
  }
-
 
427
 
-
 
428
  public void unsetDeliveryDelay() {
-
 
429
    __isset_bit_vector.clear(__DELIVERYDELAY_ISSET_ID);
-
 
430
  }
-
 
431
 
-
 
432
  /** Returns true if field deliveryDelay is set (has been assigned a value) and false otherwise */
-
 
433
  public boolean isSetDeliveryDelay() {
-
 
434
    return __isset_bit_vector.get(__DELIVERYDELAY_ISSET_ID);
-
 
435
  }
-
 
436
 
-
 
437
  public void setDeliveryDelayIsSet(boolean value) {
-
 
438
    __isset_bit_vector.set(__DELIVERYDELAY_ISSET_ID, value);
-
 
439
  }
-
 
440
 
405
  public void setFieldValue(_Fields field, Object value) {
441
  public void setFieldValue(_Fields field, Object value) {
406
    switch (field) {
442
    switch (field) {
407
    case WAREHOUSE_ID:
443
    case WAREHOUSE_ID:
408
      if (value == null) {
444
      if (value == null) {
409
        unsetWarehouseId();
445
        unsetWarehouseId();
Line 466... Line 502...
466
      } else {
502
      } else {
467
        setOtgAvailable((Boolean)value);
503
        setOtgAvailable((Boolean)value);
468
      }
504
      }
469
      break;
505
      break;
470
 
506
 
-
 
507
    case DELIVERY_DELAY:
-
 
508
      if (value == null) {
-
 
509
        unsetDeliveryDelay();
-
 
510
      } else {
-
 
511
        setDeliveryDelay((Long)value);
-
 
512
      }
-
 
513
      break;
-
 
514
 
471
    }
515
    }
472
  }
516
  }
473
 
517
 
474
  public Object getFieldValue(_Fields field) {
518
  public Object getFieldValue(_Fields field) {
475
    switch (field) {
519
    switch (field) {
Line 495... Line 539...
495
      return Long.valueOf(getFulfilmentWarehouseId());
539
      return Long.valueOf(getFulfilmentWarehouseId());
496
 
540
 
497
    case OTG_AVAILABLE:
541
    case OTG_AVAILABLE:
498
      return Boolean.valueOf(isOtgAvailable());
542
      return Boolean.valueOf(isOtgAvailable());
499
 
543
 
-
 
544
    case DELIVERY_DELAY:
-
 
545
      return Long.valueOf(getDeliveryDelay());
-
 
546
 
500
    }
547
    }
501
    throw new IllegalStateException();
548
    throw new IllegalStateException();
502
  }
549
  }
503
 
550
 
504
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
551
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 522... Line 569...
522
      return isSetCodAllowed();
569
      return isSetCodAllowed();
523
    case FULFILMENT_WAREHOUSE_ID:
570
    case FULFILMENT_WAREHOUSE_ID:
524
      return isSetFulfilmentWarehouseId();
571
      return isSetFulfilmentWarehouseId();
525
    case OTG_AVAILABLE:
572
    case OTG_AVAILABLE:
526
      return isSetOtgAvailable();
573
      return isSetOtgAvailable();
-
 
574
    case DELIVERY_DELAY:
-
 
575
      return isSetDeliveryDelay();
527
    }
576
    }
528
    throw new IllegalStateException();
577
    throw new IllegalStateException();
529
  }
578
  }
530
 
579
 
531
  @Override
580
  @Override
Line 611... Line 660...
611
        return false;
660
        return false;
612
      if (this.otgAvailable != that.otgAvailable)
661
      if (this.otgAvailable != that.otgAvailable)
613
        return false;
662
        return false;
614
    }
663
    }
615
 
664
 
-
 
665
    boolean this_present_deliveryDelay = true;
-
 
666
    boolean that_present_deliveryDelay = true;
-
 
667
    if (this_present_deliveryDelay || that_present_deliveryDelay) {
-
 
668
      if (!(this_present_deliveryDelay && that_present_deliveryDelay))
-
 
669
        return false;
-
 
670
      if (this.deliveryDelay != that.deliveryDelay)
-
 
671
        return false;
-
 
672
    }
-
 
673
 
616
    return true;
674
    return true;
617
  }
675
  }
618
 
676
 
619
  @Override
677
  @Override
620
  public int hashCode() {
678
  public int hashCode() {
Line 707... Line 765...
707
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.otgAvailable, typedOther.otgAvailable);
765
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.otgAvailable, typedOther.otgAvailable);
708
      if (lastComparison != 0) {
766
      if (lastComparison != 0) {
709
        return lastComparison;
767
        return lastComparison;
710
      }
768
      }
711
    }
769
    }
-
 
770
    lastComparison = Boolean.valueOf(isSetDeliveryDelay()).compareTo(typedOther.isSetDeliveryDelay());
-
 
771
    if (lastComparison != 0) {
-
 
772
      return lastComparison;
-
 
773
    }
-
 
774
    if (isSetDeliveryDelay()) {
-
 
775
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deliveryDelay, typedOther.deliveryDelay);
-
 
776
      if (lastComparison != 0) {
-
 
777
        return lastComparison;
-
 
778
      }
-
 
779
    }
712
    return 0;
780
    return 0;
713
  }
781
  }
714
 
782
 
715
  public _Fields fieldForId(int fieldId) {
783
  public _Fields fieldForId(int fieldId) {
716
    return _Fields.findByThriftId(fieldId);
784
    return _Fields.findByThriftId(fieldId);
Line 787... Line 855...
787
            setOtgAvailableIsSet(true);
855
            setOtgAvailableIsSet(true);
788
          } else { 
856
          } else { 
789
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
857
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
790
          }
858
          }
791
          break;
859
          break;
-
 
860
        case 9: // DELIVERY_DELAY
-
 
861
          if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
862
            this.deliveryDelay = iprot.readI64();
-
 
863
            setDeliveryDelayIsSet(true);
-
 
864
          } else { 
-
 
865
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
866
          }
-
 
867
          break;
792
        default:
868
        default:
793
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
869
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
794
      }
870
      }
795
      iprot.readFieldEnd();
871
      iprot.readFieldEnd();
796
    }
872
    }
Line 826... Line 902...
826
    oprot.writeI64(this.fulfilmentWarehouseId);
902
    oprot.writeI64(this.fulfilmentWarehouseId);
827
    oprot.writeFieldEnd();
903
    oprot.writeFieldEnd();
828
    oprot.writeFieldBegin(OTG_AVAILABLE_FIELD_DESC);
904
    oprot.writeFieldBegin(OTG_AVAILABLE_FIELD_DESC);
829
    oprot.writeBool(this.otgAvailable);
905
    oprot.writeBool(this.otgAvailable);
830
    oprot.writeFieldEnd();
906
    oprot.writeFieldEnd();
-
 
907
    oprot.writeFieldBegin(DELIVERY_DELAY_FIELD_DESC);
-
 
908
    oprot.writeI64(this.deliveryDelay);
-
 
909
    oprot.writeFieldEnd();
831
    oprot.writeFieldStop();
910
    oprot.writeFieldStop();
832
    oprot.writeStructEnd();
911
    oprot.writeStructEnd();
833
  }
912
  }
834
 
913
 
835
  @Override
914
  @Override
Line 870... Line 949...
870
    first = false;
949
    first = false;
871
    if (!first) sb.append(", ");
950
    if (!first) sb.append(", ");
872
    sb.append("otgAvailable:");
951
    sb.append("otgAvailable:");
873
    sb.append(this.otgAvailable);
952
    sb.append(this.otgAvailable);
874
    first = false;
953
    first = false;
-
 
954
    if (!first) sb.append(", ");
-
 
955
    sb.append("deliveryDelay:");
-
 
956
    sb.append(this.deliveryDelay);
-
 
957
    first = false;
875
    sb.append(")");
958
    sb.append(")");
876
    return sb.toString();
959
    return sb.toString();
877
  }
960
  }
878
 
961
 
879
  public void validate() throws org.apache.thrift.TException {
962
  public void validate() throws org.apache.thrift.TException {