Subversion Repositories SmartDukaan

Rev

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

Rev 5354 Rev 5527
Line 79... Line 79...
79
  private static final org.apache.thrift.protocol.TField ORIGINAL_ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("originalOrderId", org.apache.thrift.protocol.TType.I64, (short)54);
79
  private static final org.apache.thrift.protocol.TField ORIGINAL_ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("originalOrderId", org.apache.thrift.protocol.TType.I64, (short)54);
80
  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)55);
80
  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)55);
81
  private static final org.apache.thrift.protocol.TField VENDOR_PAID_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorPaid", org.apache.thrift.protocol.TType.BOOL, (short)56);
81
  private static final org.apache.thrift.protocol.TField VENDOR_PAID_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorPaid", org.apache.thrift.protocol.TType.BOOL, (short)56);
82
  private static final org.apache.thrift.protocol.TField RECEIVED_RETURN_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("received_return_timestamp", org.apache.thrift.protocol.TType.I64, (short)57);
82
  private static final org.apache.thrift.protocol.TField RECEIVED_RETURN_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("received_return_timestamp", org.apache.thrift.protocol.TType.I64, (short)57);
83
  private static final org.apache.thrift.protocol.TField FIRST_ATTEMPT_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("first_attempt_timestamp", org.apache.thrift.protocol.TType.I64, (short)58);
83
  private static final org.apache.thrift.protocol.TField FIRST_ATTEMPT_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("first_attempt_timestamp", org.apache.thrift.protocol.TType.I64, (short)58);
-
 
84
  private static final org.apache.thrift.protocol.TField ORDER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("orderType", org.apache.thrift.protocol.TType.I32, (short)59);
84
 
85
 
85
  private long id; // required
86
  private long id; // required
86
  private long warehouse_id; // required
87
  private long warehouse_id; // required
87
  private List<LineItem> lineitems; // required
88
  private List<LineItem> lineitems; // required
88
  private long logistics_provider_id; // required
89
  private long logistics_provider_id; // required
Line 138... Line 139...
138
  private long originalOrderId; // required
139
  private long originalOrderId; // required
139
  private long fulfilmentWarehouseId; // required
140
  private long fulfilmentWarehouseId; // required
140
  private boolean vendorPaid; // required
141
  private boolean vendorPaid; // required
141
  private long received_return_timestamp; // required
142
  private long received_return_timestamp; // required
142
  private long first_attempt_timestamp; // required
143
  private long first_attempt_timestamp; // required
-
 
144
  private OrderType orderType; // required
143
 
145
 
144
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
146
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
145
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
147
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
146
    ID((short)1, "id"),
148
    ID((short)1, "id"),
147
    WAREHOUSE_ID((short)2, "warehouse_id"),
149
    WAREHOUSE_ID((short)2, "warehouse_id"),
Line 232... Line 234...
232
    DOA_LOGISTICS_PROVIDER_ID((short)53, "doa_logistics_provider_id"),
234
    DOA_LOGISTICS_PROVIDER_ID((short)53, "doa_logistics_provider_id"),
233
    ORIGINAL_ORDER_ID((short)54, "originalOrderId"),
235
    ORIGINAL_ORDER_ID((short)54, "originalOrderId"),
234
    FULFILMENT_WAREHOUSE_ID((short)55, "fulfilmentWarehouseId"),
236
    FULFILMENT_WAREHOUSE_ID((short)55, "fulfilmentWarehouseId"),
235
    VENDOR_PAID((short)56, "vendorPaid"),
237
    VENDOR_PAID((short)56, "vendorPaid"),
236
    RECEIVED_RETURN_TIMESTAMP((short)57, "received_return_timestamp"),
238
    RECEIVED_RETURN_TIMESTAMP((short)57, "received_return_timestamp"),
237
    FIRST_ATTEMPT_TIMESTAMP((short)58, "first_attempt_timestamp");
239
    FIRST_ATTEMPT_TIMESTAMP((short)58, "first_attempt_timestamp"),
-
 
240
    /**
-
 
241
     * 
-
 
242
     * @see OrderType
-
 
243
     */
-
 
244
    ORDER_TYPE((short)59, "orderType");
238
 
245
 
239
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
246
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
240
 
247
 
241
    static {
248
    static {
242
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
249
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 363... Line 370...
363
          return VENDOR_PAID;
370
          return VENDOR_PAID;
364
        case 57: // RECEIVED_RETURN_TIMESTAMP
371
        case 57: // RECEIVED_RETURN_TIMESTAMP
365
          return RECEIVED_RETURN_TIMESTAMP;
372
          return RECEIVED_RETURN_TIMESTAMP;
366
        case 58: // FIRST_ATTEMPT_TIMESTAMP
373
        case 58: // FIRST_ATTEMPT_TIMESTAMP
367
          return FIRST_ATTEMPT_TIMESTAMP;
374
          return FIRST_ATTEMPT_TIMESTAMP;
-
 
375
        case 59: // ORDER_TYPE
-
 
376
          return ORDER_TYPE;
368
        default:
377
        default:
369
          return null;
378
          return null;
370
      }
379
      }
371
    }
380
    }
372
 
381
 
Line 561... Line 570...
561
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
570
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
562
    tmpMap.put(_Fields.RECEIVED_RETURN_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("received_return_timestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
571
    tmpMap.put(_Fields.RECEIVED_RETURN_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("received_return_timestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
563
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
572
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
564
    tmpMap.put(_Fields.FIRST_ATTEMPT_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("first_attempt_timestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
573
    tmpMap.put(_Fields.FIRST_ATTEMPT_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("first_attempt_timestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
565
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
574
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
575
    tmpMap.put(_Fields.ORDER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("orderType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
576
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, OrderType.class)));
566
    metaDataMap = Collections.unmodifiableMap(tmpMap);
577
    metaDataMap = Collections.unmodifiableMap(tmpMap);
567
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
578
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
568
  }
579
  }
569
 
580
 
570
  public Order() {
581
  public Order() {
Line 619... Line 630...
619
    String delayReasonText,
630
    String delayReasonText,
620
    String refundReason,
631
    String refundReason,
621
    long purchaseOrderId,
632
    long purchaseOrderId,
622
    long originalOrderId,
633
    long originalOrderId,
623
    long fulfilmentWarehouseId,
634
    long fulfilmentWarehouseId,
624
    boolean vendorPaid)
635
    boolean vendorPaid,
-
 
636
    OrderType orderType)
625
  {
637
  {
626
    this();
638
    this();
627
    this.id = id;
639
    this.id = id;
628
    setIdIsSet(true);
640
    setIdIsSet(true);
629
    this.warehouse_id = warehouse_id;
641
    this.warehouse_id = warehouse_id;
Line 702... Line 714...
702
    setOriginalOrderIdIsSet(true);
714
    setOriginalOrderIdIsSet(true);
703
    this.fulfilmentWarehouseId = fulfilmentWarehouseId;
715
    this.fulfilmentWarehouseId = fulfilmentWarehouseId;
704
    setFulfilmentWarehouseIdIsSet(true);
716
    setFulfilmentWarehouseIdIsSet(true);
705
    this.vendorPaid = vendorPaid;
717
    this.vendorPaid = vendorPaid;
706
    setVendorPaidIsSet(true);
718
    setVendorPaidIsSet(true);
-
 
719
    this.orderType = orderType;
707
  }
720
  }
708
 
721
 
709
  /**
722
  /**
710
   * Performs a deep copy on <i>other</i>.
723
   * Performs a deep copy on <i>other</i>.
711
   */
724
   */
Line 816... Line 829...
816
    this.originalOrderId = other.originalOrderId;
829
    this.originalOrderId = other.originalOrderId;
817
    this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
830
    this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
818
    this.vendorPaid = other.vendorPaid;
831
    this.vendorPaid = other.vendorPaid;
819
    this.received_return_timestamp = other.received_return_timestamp;
832
    this.received_return_timestamp = other.received_return_timestamp;
820
    this.first_attempt_timestamp = other.first_attempt_timestamp;
833
    this.first_attempt_timestamp = other.first_attempt_timestamp;
-
 
834
    if (other.isSetOrderType()) {
-
 
835
      this.orderType = other.orderType;
-
 
836
    }
821
  }
837
  }
822
 
838
 
823
  public Order deepCopy() {
839
  public Order deepCopy() {
824
    return new Order(this);
840
    return new Order(this);
825
  }
841
  }
Line 918... Line 934...
918
    this.vendorPaid = false;
934
    this.vendorPaid = false;
919
    setReceived_return_timestampIsSet(false);
935
    setReceived_return_timestampIsSet(false);
920
    this.received_return_timestamp = 0;
936
    this.received_return_timestamp = 0;
921
    setFirst_attempt_timestampIsSet(false);
937
    setFirst_attempt_timestampIsSet(false);
922
    this.first_attempt_timestamp = 0;
938
    this.first_attempt_timestamp = 0;
-
 
939
    this.orderType = null;
923
  }
940
  }
924
 
941
 
925
  public long getId() {
942
  public long getId() {
926
    return this.id;
943
    return this.id;
927
  }
944
  }
Line 2301... Line 2318...
2301
 
2318
 
2302
  public void setFirst_attempt_timestampIsSet(boolean value) {
2319
  public void setFirst_attempt_timestampIsSet(boolean value) {
2303
    __isset_bit_vector.set(__FIRST_ATTEMPT_TIMESTAMP_ISSET_ID, value);
2320
    __isset_bit_vector.set(__FIRST_ATTEMPT_TIMESTAMP_ISSET_ID, value);
2304
  }
2321
  }
2305
 
2322
 
-
 
2323
  /**
-
 
2324
   * 
-
 
2325
   * @see OrderType
-
 
2326
   */
-
 
2327
  public OrderType getOrderType() {
-
 
2328
    return this.orderType;
-
 
2329
  }
-
 
2330
 
-
 
2331
  /**
-
 
2332
   * 
-
 
2333
   * @see OrderType
-
 
2334
   */
-
 
2335
  public void setOrderType(OrderType orderType) {
-
 
2336
    this.orderType = orderType;
-
 
2337
  }
-
 
2338
 
-
 
2339
  public void unsetOrderType() {
-
 
2340
    this.orderType = null;
-
 
2341
  }
-
 
2342
 
-
 
2343
  /** Returns true if field orderType is set (has been assigned a value) and false otherwise */
-
 
2344
  public boolean isSetOrderType() {
-
 
2345
    return this.orderType != null;
-
 
2346
  }
-
 
2347
 
-
 
2348
  public void setOrderTypeIsSet(boolean value) {
-
 
2349
    if (!value) {
-
 
2350
      this.orderType = null;
-
 
2351
    }
-
 
2352
  }
-
 
2353
 
2306
  public void setFieldValue(_Fields field, Object value) {
2354
  public void setFieldValue(_Fields field, Object value) {
2307
    switch (field) {
2355
    switch (field) {
2308
    case ID:
2356
    case ID:
2309
      if (value == null) {
2357
      if (value == null) {
2310
        unsetId();
2358
        unsetId();
Line 2767... Line 2815...
2767
      } else {
2815
      } else {
2768
        setFirst_attempt_timestamp((Long)value);
2816
        setFirst_attempt_timestamp((Long)value);
2769
      }
2817
      }
2770
      break;
2818
      break;
2771
 
2819
 
-
 
2820
    case ORDER_TYPE:
-
 
2821
      if (value == null) {
-
 
2822
        unsetOrderType();
-
 
2823
      } else {
-
 
2824
        setOrderType((OrderType)value);
-
 
2825
      }
-
 
2826
      break;
-
 
2827
 
2772
    }
2828
    }
2773
  }
2829
  }
2774
 
2830
 
2775
  public Object getFieldValue(_Fields field) {
2831
  public Object getFieldValue(_Fields field) {
2776
    switch (field) {
2832
    switch (field) {
Line 2946... Line 3002...
2946
      return Long.valueOf(getReceived_return_timestamp());
3002
      return Long.valueOf(getReceived_return_timestamp());
2947
 
3003
 
2948
    case FIRST_ATTEMPT_TIMESTAMP:
3004
    case FIRST_ATTEMPT_TIMESTAMP:
2949
      return Long.valueOf(getFirst_attempt_timestamp());
3005
      return Long.valueOf(getFirst_attempt_timestamp());
2950
 
3006
 
-
 
3007
    case ORDER_TYPE:
-
 
3008
      return getOrderType();
-
 
3009
 
2951
    }
3010
    }
2952
    throw new IllegalStateException();
3011
    throw new IllegalStateException();
2953
  }
3012
  }
2954
 
3013
 
2955
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3014
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 3073... Line 3132...
3073
      return isSetVendorPaid();
3132
      return isSetVendorPaid();
3074
    case RECEIVED_RETURN_TIMESTAMP:
3133
    case RECEIVED_RETURN_TIMESTAMP:
3075
      return isSetReceived_return_timestamp();
3134
      return isSetReceived_return_timestamp();
3076
    case FIRST_ATTEMPT_TIMESTAMP:
3135
    case FIRST_ATTEMPT_TIMESTAMP:
3077
      return isSetFirst_attempt_timestamp();
3136
      return isSetFirst_attempt_timestamp();
-
 
3137
    case ORDER_TYPE:
-
 
3138
      return isSetOrderType();
3078
    }
3139
    }
3079
    throw new IllegalStateException();
3140
    throw new IllegalStateException();
3080
  }
3141
  }
3081
 
3142
 
3082
  @Override
3143
  @Override
Line 3612... Line 3673...
3612
        return false;
3673
        return false;
3613
      if (this.first_attempt_timestamp != that.first_attempt_timestamp)
3674
      if (this.first_attempt_timestamp != that.first_attempt_timestamp)
3614
        return false;
3675
        return false;
3615
    }
3676
    }
3616
 
3677
 
-
 
3678
    boolean this_present_orderType = true && this.isSetOrderType();
-
 
3679
    boolean that_present_orderType = true && that.isSetOrderType();
-
 
3680
    if (this_present_orderType || that_present_orderType) {
-
 
3681
      if (!(this_present_orderType && that_present_orderType))
-
 
3682
        return false;
-
 
3683
      if (!this.orderType.equals(that.orderType))
-
 
3684
        return false;
-
 
3685
    }
-
 
3686
 
3617
    return true;
3687
    return true;
3618
  }
3688
  }
3619
 
3689
 
3620
  @Override
3690
  @Override
3621
  public int hashCode() {
3691
  public int hashCode() {
Line 4208... Line 4278...
4208
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.first_attempt_timestamp, typedOther.first_attempt_timestamp);
4278
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.first_attempt_timestamp, typedOther.first_attempt_timestamp);
4209
      if (lastComparison != 0) {
4279
      if (lastComparison != 0) {
4210
        return lastComparison;
4280
        return lastComparison;
4211
      }
4281
      }
4212
    }
4282
    }
-
 
4283
    lastComparison = Boolean.valueOf(isSetOrderType()).compareTo(typedOther.isSetOrderType());
-
 
4284
    if (lastComparison != 0) {
-
 
4285
      return lastComparison;
-
 
4286
    }
-
 
4287
    if (isSetOrderType()) {
-
 
4288
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderType, typedOther.orderType);
-
 
4289
      if (lastComparison != 0) {
-
 
4290
        return lastComparison;
-
 
4291
      }
-
 
4292
    }
4213
    return 0;
4293
    return 0;
4214
  }
4294
  }
4215
 
4295
 
4216
  public _Fields fieldForId(int fieldId) {
4296
  public _Fields fieldForId(int fieldId) {
4217
    return _Fields.findByThriftId(fieldId);
4297
    return _Fields.findByThriftId(fieldId);
Line 4678... Line 4758...
4678
            setFirst_attempt_timestampIsSet(true);
4758
            setFirst_attempt_timestampIsSet(true);
4679
          } else { 
4759
          } else { 
4680
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4760
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4681
          }
4761
          }
4682
          break;
4762
          break;
-
 
4763
        case 59: // ORDER_TYPE
-
 
4764
          if (field.type == org.apache.thrift.protocol.TType.I32) {
-
 
4765
            this.orderType = OrderType.findByValue(iprot.readI32());
-
 
4766
          } else { 
-
 
4767
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
4768
          }
-
 
4769
          break;
4683
        default:
4770
        default:
4684
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4771
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4685
      }
4772
      }
4686
      iprot.readFieldEnd();
4773
      iprot.readFieldEnd();
4687
    }
4774
    }
Line 4930... Line 5017...
4930
    if (isSetFirst_attempt_timestamp()) {
5017
    if (isSetFirst_attempt_timestamp()) {
4931
      oprot.writeFieldBegin(FIRST_ATTEMPT_TIMESTAMP_FIELD_DESC);
5018
      oprot.writeFieldBegin(FIRST_ATTEMPT_TIMESTAMP_FIELD_DESC);
4932
      oprot.writeI64(this.first_attempt_timestamp);
5019
      oprot.writeI64(this.first_attempt_timestamp);
4933
      oprot.writeFieldEnd();
5020
      oprot.writeFieldEnd();
4934
    }
5021
    }
-
 
5022
    if (this.orderType != null) {
-
 
5023
      oprot.writeFieldBegin(ORDER_TYPE_FIELD_DESC);
-
 
5024
      oprot.writeI32(this.orderType.getValue());
-
 
5025
      oprot.writeFieldEnd();
-
 
5026
    }
4935
    oprot.writeFieldStop();
5027
    oprot.writeFieldStop();
4936
    oprot.writeStructEnd();
5028
    oprot.writeStructEnd();
4937
  }
5029
  }
4938
 
5030
 
4939
  @Override
5031
  @Override
Line 5272... Line 5364...
5272
      if (!first) sb.append(", ");
5364
      if (!first) sb.append(", ");
5273
      sb.append("first_attempt_timestamp:");
5365
      sb.append("first_attempt_timestamp:");
5274
      sb.append(this.first_attempt_timestamp);
5366
      sb.append(this.first_attempt_timestamp);
5275
      first = false;
5367
      first = false;
5276
    }
5368
    }
-
 
5369
    if (!first) sb.append(", ");
-
 
5370
    sb.append("orderType:");
-
 
5371
    if (this.orderType == null) {
-
 
5372
      sb.append("null");
-
 
5373
    } else {
-
 
5374
      sb.append(this.orderType);
-
 
5375
    }
-
 
5376
    first = false;
5277
    sb.append(")");
5377
    sb.append(")");
5278
    return sb.toString();
5378
    return sb.toString();
5279
  }
5379
  }
5280
 
5380
 
5281
  public void validate() throws org.apache.thrift.TException {
5381
  public void validate() throws org.apache.thrift.TException {