Subversion Repositories SmartDukaan

Rev

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

Rev 4192 Rev 4246
Line 67... Line 67...
67
  private static final org.apache.thrift.protocol.TField VERIFICATION_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("verification_timestamp", org.apache.thrift.protocol.TType.I64, (short)42);
67
  private static final org.apache.thrift.protocol.TField VERIFICATION_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("verification_timestamp", org.apache.thrift.protocol.TType.I64, (short)42);
68
  private static final org.apache.thrift.protocol.TField PROMISED_SHIPPING_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("promised_shipping_time", org.apache.thrift.protocol.TType.I64, (short)43);
68
  private static final org.apache.thrift.protocol.TField PROMISED_SHIPPING_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("promised_shipping_time", org.apache.thrift.protocol.TType.I64, (short)43);
69
  private static final org.apache.thrift.protocol.TField RESHIP_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("reship_timestamp", org.apache.thrift.protocol.TType.I64, (short)44);
69
  private static final org.apache.thrift.protocol.TField RESHIP_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("reship_timestamp", org.apache.thrift.protocol.TType.I64, (short)44);
70
  private static final org.apache.thrift.protocol.TField REFUND_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("refund_timestamp", org.apache.thrift.protocol.TType.I64, (short)45);
70
  private static final org.apache.thrift.protocol.TField REFUND_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("refund_timestamp", org.apache.thrift.protocol.TType.I64, (short)45);
71
  private static final org.apache.thrift.protocol.TField NEW_ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("new_order_id", org.apache.thrift.protocol.TType.I64, (short)46);
71
  private static final org.apache.thrift.protocol.TField NEW_ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("new_order_id", org.apache.thrift.protocol.TType.I64, (short)46);
-
 
72
  private static final org.apache.thrift.protocol.TField PREVIOUS_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("previousStatus", org.apache.thrift.protocol.TType.I32, (short)47);
72
 
73
 
73
  private long id; // required
74
  private long id; // required
74
  private long warehouse_id; // required
75
  private long warehouse_id; // required
75
  private List<LineItem> lineitems; // required
76
  private List<LineItem> lineitems; // required
76
  private long logistics_provider_id; // required
77
  private long logistics_provider_id; // required
Line 114... Line 115...
114
  private long verification_timestamp; // required
115
  private long verification_timestamp; // required
115
  private long promised_shipping_time; // required
116
  private long promised_shipping_time; // required
116
  private long reship_timestamp; // required
117
  private long reship_timestamp; // required
117
  private long refund_timestamp; // required
118
  private long refund_timestamp; // required
118
  private long new_order_id; // required
119
  private long new_order_id; // required
-
 
120
  private OrderStatus previousStatus; // required
119
 
121
 
120
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
122
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
121
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
123
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
122
    ID((short)1, "id"),
124
    ID((short)1, "id"),
123
    WAREHOUSE_ID((short)2, "warehouse_id"),
125
    WAREHOUSE_ID((short)2, "warehouse_id"),
Line 192... Line 194...
192
    EXPECTED_SHIPPING_TIME((short)41, "expected_shipping_time"),
194
    EXPECTED_SHIPPING_TIME((short)41, "expected_shipping_time"),
193
    VERIFICATION_TIMESTAMP((short)42, "verification_timestamp"),
195
    VERIFICATION_TIMESTAMP((short)42, "verification_timestamp"),
194
    PROMISED_SHIPPING_TIME((short)43, "promised_shipping_time"),
196
    PROMISED_SHIPPING_TIME((short)43, "promised_shipping_time"),
195
    RESHIP_TIMESTAMP((short)44, "reship_timestamp"),
197
    RESHIP_TIMESTAMP((short)44, "reship_timestamp"),
196
    REFUND_TIMESTAMP((short)45, "refund_timestamp"),
198
    REFUND_TIMESTAMP((short)45, "refund_timestamp"),
197
    NEW_ORDER_ID((short)46, "new_order_id");
199
    NEW_ORDER_ID((short)46, "new_order_id"),
-
 
200
    /**
-
 
201
     * 
-
 
202
     * @see OrderStatus
-
 
203
     */
-
 
204
    PREVIOUS_STATUS((short)47, "previousStatus");
198
 
205
 
199
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
206
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
200
 
207
 
201
    static {
208
    static {
202
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
209
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 299... Line 306...
299
          return RESHIP_TIMESTAMP;
306
          return RESHIP_TIMESTAMP;
300
        case 45: // REFUND_TIMESTAMP
307
        case 45: // REFUND_TIMESTAMP
301
          return REFUND_TIMESTAMP;
308
          return REFUND_TIMESTAMP;
302
        case 46: // NEW_ORDER_ID
309
        case 46: // NEW_ORDER_ID
303
          return NEW_ORDER_ID;
310
          return NEW_ORDER_ID;
-
 
311
        case 47: // PREVIOUS_STATUS
-
 
312
          return PREVIOUS_STATUS;
304
        default:
313
        default:
305
          return null;
314
          return null;
306
      }
315
      }
307
    }
316
    }
308
 
317
 
Line 464... Line 473...
464
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
473
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
465
    tmpMap.put(_Fields.REFUND_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("refund_timestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
474
    tmpMap.put(_Fields.REFUND_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("refund_timestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
466
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
475
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
467
    tmpMap.put(_Fields.NEW_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("new_order_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
476
    tmpMap.put(_Fields.NEW_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("new_order_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
468
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
477
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
478
    tmpMap.put(_Fields.PREVIOUS_STATUS, new org.apache.thrift.meta_data.FieldMetaData("previousStatus", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
479
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, OrderStatus.class)));
469
    metaDataMap = Collections.unmodifiableMap(tmpMap);
480
    metaDataMap = Collections.unmodifiableMap(tmpMap);
470
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
481
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
471
  }
482
  }
472
 
483
 
473
  public Order() {
484
  public Order() {
Line 514... Line 525...
514
    boolean cod,
525
    boolean cod,
515
    DelayReason delayReason,
526
    DelayReason delayReason,
516
    long promised_delivery_time,
527
    long promised_delivery_time,
517
    long expected_shipping_time,
528
    long expected_shipping_time,
518
    long verification_timestamp,
529
    long verification_timestamp,
519
    long promised_shipping_time)
530
    long promised_shipping_time,
-
 
531
    OrderStatus previousStatus)
520
  {
532
  {
521
    this();
533
    this();
522
    this.id = id;
534
    this.id = id;
523
    setIdIsSet(true);
535
    setIdIsSet(true);
524
    this.warehouse_id = warehouse_id;
536
    this.warehouse_id = warehouse_id;
Line 584... Line 596...
584
    setExpected_shipping_timeIsSet(true);
596
    setExpected_shipping_timeIsSet(true);
585
    this.verification_timestamp = verification_timestamp;
597
    this.verification_timestamp = verification_timestamp;
586
    setVerification_timestampIsSet(true);
598
    setVerification_timestampIsSet(true);
587
    this.promised_shipping_time = promised_shipping_time;
599
    this.promised_shipping_time = promised_shipping_time;
588
    setPromised_shipping_timeIsSet(true);
600
    setPromised_shipping_timeIsSet(true);
-
 
601
    this.previousStatus = previousStatus;
589
  }
602
  }
590
 
603
 
591
  /**
604
  /**
592
   * Performs a deep copy on <i>other</i>.
605
   * Performs a deep copy on <i>other</i>.
593
   */
606
   */
Line 680... Line 693...
680
    this.verification_timestamp = other.verification_timestamp;
693
    this.verification_timestamp = other.verification_timestamp;
681
    this.promised_shipping_time = other.promised_shipping_time;
694
    this.promised_shipping_time = other.promised_shipping_time;
682
    this.reship_timestamp = other.reship_timestamp;
695
    this.reship_timestamp = other.reship_timestamp;
683
    this.refund_timestamp = other.refund_timestamp;
696
    this.refund_timestamp = other.refund_timestamp;
684
    this.new_order_id = other.new_order_id;
697
    this.new_order_id = other.new_order_id;
-
 
698
    if (other.isSetPreviousStatus()) {
-
 
699
      this.previousStatus = other.previousStatus;
-
 
700
    }
685
  }
701
  }
686
 
702
 
687
  public Order deepCopy() {
703
  public Order deepCopy() {
688
    return new Order(this);
704
    return new Order(this);
689
  }
705
  }
Line 761... Line 777...
761
    this.reship_timestamp = 0;
777
    this.reship_timestamp = 0;
762
    setRefund_timestampIsSet(false);
778
    setRefund_timestampIsSet(false);
763
    this.refund_timestamp = 0;
779
    this.refund_timestamp = 0;
764
    setNew_order_idIsSet(false);
780
    setNew_order_idIsSet(false);
765
    this.new_order_id = 0;
781
    this.new_order_id = 0;
-
 
782
    this.previousStatus = null;
766
  }
783
  }
767
 
784
 
768
  public long getId() {
785
  public long getId() {
769
    return this.id;
786
    return this.id;
770
  }
787
  }
Line 1869... Line 1886...
1869
 
1886
 
1870
  public void setNew_order_idIsSet(boolean value) {
1887
  public void setNew_order_idIsSet(boolean value) {
1871
    __isset_bit_vector.set(__NEW_ORDER_ID_ISSET_ID, value);
1888
    __isset_bit_vector.set(__NEW_ORDER_ID_ISSET_ID, value);
1872
  }
1889
  }
1873
 
1890
 
-
 
1891
  /**
-
 
1892
   * 
-
 
1893
   * @see OrderStatus
-
 
1894
   */
-
 
1895
  public OrderStatus getPreviousStatus() {
-
 
1896
    return this.previousStatus;
-
 
1897
  }
-
 
1898
 
-
 
1899
  /**
-
 
1900
   * 
-
 
1901
   * @see OrderStatus
-
 
1902
   */
-
 
1903
  public void setPreviousStatus(OrderStatus previousStatus) {
-
 
1904
    this.previousStatus = previousStatus;
-
 
1905
  }
-
 
1906
 
-
 
1907
  public void unsetPreviousStatus() {
-
 
1908
    this.previousStatus = null;
-
 
1909
  }
-
 
1910
 
-
 
1911
  /** Returns true if field previousStatus is set (has been assigned a value) and false otherwise */
-
 
1912
  public boolean isSetPreviousStatus() {
-
 
1913
    return this.previousStatus != null;
-
 
1914
  }
-
 
1915
 
-
 
1916
  public void setPreviousStatusIsSet(boolean value) {
-
 
1917
    if (!value) {
-
 
1918
      this.previousStatus = null;
-
 
1919
    }
-
 
1920
  }
-
 
1921
 
1874
  public void setFieldValue(_Fields field, Object value) {
1922
  public void setFieldValue(_Fields field, Object value) {
1875
    switch (field) {
1923
    switch (field) {
1876
    case ID:
1924
    case ID:
1877
      if (value == null) {
1925
      if (value == null) {
1878
        unsetId();
1926
        unsetId();
Line 2239... Line 2287...
2239
      } else {
2287
      } else {
2240
        setNew_order_id((Long)value);
2288
        setNew_order_id((Long)value);
2241
      }
2289
      }
2242
      break;
2290
      break;
2243
 
2291
 
-
 
2292
    case PREVIOUS_STATUS:
-
 
2293
      if (value == null) {
-
 
2294
        unsetPreviousStatus();
-
 
2295
      } else {
-
 
2296
        setPreviousStatus((OrderStatus)value);
-
 
2297
      }
-
 
2298
      break;
-
 
2299
 
2244
    }
2300
    }
2245
  }
2301
  }
2246
 
2302
 
2247
  public Object getFieldValue(_Fields field) {
2303
  public Object getFieldValue(_Fields field) {
2248
    switch (field) {
2304
    switch (field) {
Line 2382... Line 2438...
2382
      return Long.valueOf(getRefund_timestamp());
2438
      return Long.valueOf(getRefund_timestamp());
2383
 
2439
 
2384
    case NEW_ORDER_ID:
2440
    case NEW_ORDER_ID:
2385
      return Long.valueOf(getNew_order_id());
2441
      return Long.valueOf(getNew_order_id());
2386
 
2442
 
-
 
2443
    case PREVIOUS_STATUS:
-
 
2444
      return getPreviousStatus();
-
 
2445
 
2387
    }
2446
    }
2388
    throw new IllegalStateException();
2447
    throw new IllegalStateException();
2389
  }
2448
  }
2390
 
2449
 
2391
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2450
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 2485... Line 2544...
2485
      return isSetReship_timestamp();
2544
      return isSetReship_timestamp();
2486
    case REFUND_TIMESTAMP:
2545
    case REFUND_TIMESTAMP:
2487
      return isSetRefund_timestamp();
2546
      return isSetRefund_timestamp();
2488
    case NEW_ORDER_ID:
2547
    case NEW_ORDER_ID:
2489
      return isSetNew_order_id();
2548
      return isSetNew_order_id();
-
 
2549
    case PREVIOUS_STATUS:
-
 
2550
      return isSetPreviousStatus();
2490
    }
2551
    }
2491
    throw new IllegalStateException();
2552
    throw new IllegalStateException();
2492
  }
2553
  }
2493
 
2554
 
2494
  @Override
2555
  @Override
Line 2916... Line 2977...
2916
        return false;
2977
        return false;
2917
      if (this.new_order_id != that.new_order_id)
2978
      if (this.new_order_id != that.new_order_id)
2918
        return false;
2979
        return false;
2919
    }
2980
    }
2920
 
2981
 
-
 
2982
    boolean this_present_previousStatus = true && this.isSetPreviousStatus();
-
 
2983
    boolean that_present_previousStatus = true && that.isSetPreviousStatus();
-
 
2984
    if (this_present_previousStatus || that_present_previousStatus) {
-
 
2985
      if (!(this_present_previousStatus && that_present_previousStatus))
-
 
2986
        return false;
-
 
2987
      if (!this.previousStatus.equals(that.previousStatus))
-
 
2988
        return false;
-
 
2989
    }
-
 
2990
 
2921
    return true;
2991
    return true;
2922
  }
2992
  }
2923
 
2993
 
2924
  @Override
2994
  @Override
2925
  public int hashCode() {
2995
  public int hashCode() {
Line 3392... Line 3462...
3392
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_order_id, typedOther.new_order_id);
3462
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_order_id, typedOther.new_order_id);
3393
      if (lastComparison != 0) {
3463
      if (lastComparison != 0) {
3394
        return lastComparison;
3464
        return lastComparison;
3395
      }
3465
      }
3396
    }
3466
    }
-
 
3467
    lastComparison = Boolean.valueOf(isSetPreviousStatus()).compareTo(typedOther.isSetPreviousStatus());
-
 
3468
    if (lastComparison != 0) {
-
 
3469
      return lastComparison;
-
 
3470
    }
-
 
3471
    if (isSetPreviousStatus()) {
-
 
3472
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.previousStatus, typedOther.previousStatus);
-
 
3473
      if (lastComparison != 0) {
-
 
3474
        return lastComparison;
-
 
3475
      }
-
 
3476
    }
3397
    return 0;
3477
    return 0;
3398
  }
3478
  }
3399
 
3479
 
3400
  public _Fields fieldForId(int fieldId) {
3480
  public _Fields fieldForId(int fieldId) {
3401
    return _Fields.findByThriftId(fieldId);
3481
    return _Fields.findByThriftId(fieldId);
Line 3769... Line 3849...
3769
            setNew_order_idIsSet(true);
3849
            setNew_order_idIsSet(true);
3770
          } else { 
3850
          } else { 
3771
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3851
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3772
          }
3852
          }
3773
          break;
3853
          break;
-
 
3854
        case 47: // PREVIOUS_STATUS
-
 
3855
          if (field.type == org.apache.thrift.protocol.TType.I32) {
-
 
3856
            this.previousStatus = OrderStatus.findByValue(iprot.readI32());
-
 
3857
          } else { 
-
 
3858
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
3859
          }
-
 
3860
          break;
3774
        default:
3861
        default:
3775
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3862
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3776
      }
3863
      }
3777
      iprot.readFieldEnd();
3864
      iprot.readFieldEnd();
3778
    }
3865
    }
Line 3971... Line 4058...
3971
    if (isSetNew_order_id()) {
4058
    if (isSetNew_order_id()) {
3972
      oprot.writeFieldBegin(NEW_ORDER_ID_FIELD_DESC);
4059
      oprot.writeFieldBegin(NEW_ORDER_ID_FIELD_DESC);
3973
      oprot.writeI64(this.new_order_id);
4060
      oprot.writeI64(this.new_order_id);
3974
      oprot.writeFieldEnd();
4061
      oprot.writeFieldEnd();
3975
    }
4062
    }
-
 
4063
    if (this.previousStatus != null) {
-
 
4064
      oprot.writeFieldBegin(PREVIOUS_STATUS_FIELD_DESC);
-
 
4065
      oprot.writeI32(this.previousStatus.getValue());
-
 
4066
      oprot.writeFieldEnd();
-
 
4067
    }
3976
    oprot.writeFieldStop();
4068
    oprot.writeFieldStop();
3977
    oprot.writeStructEnd();
4069
    oprot.writeStructEnd();
3978
  }
4070
  }
3979
 
4071
 
3980
  @Override
4072
  @Override
Line 4245... Line 4337...
4245
      if (!first) sb.append(", ");
4337
      if (!first) sb.append(", ");
4246
      sb.append("new_order_id:");
4338
      sb.append("new_order_id:");
4247
      sb.append(this.new_order_id);
4339
      sb.append(this.new_order_id);
4248
      first = false;
4340
      first = false;
4249
    }
4341
    }
-
 
4342
    if (!first) sb.append(", ");
-
 
4343
    sb.append("previousStatus:");
-
 
4344
    if (this.previousStatus == null) {
-
 
4345
      sb.append("null");
-
 
4346
    } else {
-
 
4347
      sb.append(this.previousStatus);
-
 
4348
    }
-
 
4349
    first = false;
4250
    sb.append(")");
4350
    sb.append(")");
4251
    return sb.toString();
4351
    return sb.toString();
4252
  }
4352
  }
4253
 
4353
 
4254
  public void validate() throws org.apache.thrift.TException {
4354
  public void validate() throws org.apache.thrift.TException {