Subversion Repositories SmartDukaan

Rev

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

Rev 9299 Rev 9416
Line 96... Line 96...
96
  private static final org.apache.thrift.protocol.TField ADVANCE_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("advanceAmount", org.apache.thrift.protocol.TType.DOUBLE, (short)71);
96
  private static final org.apache.thrift.protocol.TField ADVANCE_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("advanceAmount", org.apache.thrift.protocol.TType.DOUBLE, (short)71);
97
  private static final org.apache.thrift.protocol.TField STORE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("storeId", org.apache.thrift.protocol.TType.I64, (short)72);
97
  private static final org.apache.thrift.protocol.TField STORE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("storeId", org.apache.thrift.protocol.TType.I64, (short)72);
98
  private static final org.apache.thrift.protocol.TField PRODUCT_CONDITION_FIELD_DESC = new org.apache.thrift.protocol.TField("productCondition", org.apache.thrift.protocol.TType.I32, (short)73);
98
  private static final org.apache.thrift.protocol.TField PRODUCT_CONDITION_FIELD_DESC = new org.apache.thrift.protocol.TField("productCondition", org.apache.thrift.protocol.TType.I32, (short)73);
99
  private static final org.apache.thrift.protocol.TField DATA_PROTECTION_INSURER_FIELD_DESC = new org.apache.thrift.protocol.TField("dataProtectionInsurer", org.apache.thrift.protocol.TType.I64, (short)74);
99
  private static final org.apache.thrift.protocol.TField DATA_PROTECTION_INSURER_FIELD_DESC = new org.apache.thrift.protocol.TField("dataProtectionInsurer", org.apache.thrift.protocol.TType.I64, (short)74);
100
  private static final org.apache.thrift.protocol.TField DATA_PROTECTION_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("dataProtectionAmount", org.apache.thrift.protocol.TType.DOUBLE, (short)75);
100
  private static final org.apache.thrift.protocol.TField DATA_PROTECTION_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("dataProtectionAmount", org.apache.thrift.protocol.TType.DOUBLE, (short)75);
-
 
101
  private static final org.apache.thrift.protocol.TField TAX_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("taxType", org.apache.thrift.protocol.TType.I32, (short)76);
101
 
102
 
102
  private long id; // required
103
  private long id; // required
103
  private long warehouse_id; // required
104
  private long warehouse_id; // required
104
  private List<LineItem> lineitems; // required
105
  private List<LineItem> lineitems; // required
105
  private long logistics_provider_id; // required
106
  private long logistics_provider_id; // required
Line 172... Line 173...
172
  private double advanceAmount; // required
173
  private double advanceAmount; // required
173
  private long storeId; // required
174
  private long storeId; // required
174
  private ProductCondition productCondition; // required
175
  private ProductCondition productCondition; // required
175
  private long dataProtectionInsurer; // required
176
  private long dataProtectionInsurer; // required
176
  private double dataProtectionAmount; // required
177
  private double dataProtectionAmount; // required
-
 
178
  private TaxType taxType; // required
177
 
179
 
178
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
180
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
179
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
181
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
180
    ID((short)1, "id"),
182
    ID((short)1, "id"),
181
    WAREHOUSE_ID((short)2, "warehouse_id"),
183
    WAREHOUSE_ID((short)2, "warehouse_id"),
Line 291... Line 293...
291
     * 
293
     * 
292
     * @see ProductCondition
294
     * @see ProductCondition
293
     */
295
     */
294
    PRODUCT_CONDITION((short)73, "productCondition"),
296
    PRODUCT_CONDITION((short)73, "productCondition"),
295
    DATA_PROTECTION_INSURER((short)74, "dataProtectionInsurer"),
297
    DATA_PROTECTION_INSURER((short)74, "dataProtectionInsurer"),
296
    DATA_PROTECTION_AMOUNT((short)75, "dataProtectionAmount");
298
    DATA_PROTECTION_AMOUNT((short)75, "dataProtectionAmount"),
-
 
299
    /**
-
 
300
     * 
-
 
301
     * @see TaxType
-
 
302
     */
-
 
303
    TAX_TYPE((short)76, "taxType");
297
 
304
 
298
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
305
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
299
 
306
 
300
    static {
307
    static {
301
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
308
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 456... Line 463...
456
          return PRODUCT_CONDITION;
463
          return PRODUCT_CONDITION;
457
        case 74: // DATA_PROTECTION_INSURER
464
        case 74: // DATA_PROTECTION_INSURER
458
          return DATA_PROTECTION_INSURER;
465
          return DATA_PROTECTION_INSURER;
459
        case 75: // DATA_PROTECTION_AMOUNT
466
        case 75: // DATA_PROTECTION_AMOUNT
460
          return DATA_PROTECTION_AMOUNT;
467
          return DATA_PROTECTION_AMOUNT;
-
 
468
        case 76: // TAX_TYPE
-
 
469
          return TAX_TYPE;
461
        default:
470
        default:
462
          return null;
471
          return null;
463
      }
472
      }
464
    }
473
    }
465
 
474
 
Line 701... Line 710...
701
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ProductCondition.class)));
710
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ProductCondition.class)));
702
    tmpMap.put(_Fields.DATA_PROTECTION_INSURER, new org.apache.thrift.meta_data.FieldMetaData("dataProtectionInsurer", org.apache.thrift.TFieldRequirementType.DEFAULT, 
711
    tmpMap.put(_Fields.DATA_PROTECTION_INSURER, new org.apache.thrift.meta_data.FieldMetaData("dataProtectionInsurer", org.apache.thrift.TFieldRequirementType.DEFAULT, 
703
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
712
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
704
    tmpMap.put(_Fields.DATA_PROTECTION_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("dataProtectionAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
713
    tmpMap.put(_Fields.DATA_PROTECTION_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("dataProtectionAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
705
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
714
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-
 
715
    tmpMap.put(_Fields.TAX_TYPE, new org.apache.thrift.meta_data.FieldMetaData("taxType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
716
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TaxType.class)));
706
    metaDataMap = Collections.unmodifiableMap(tmpMap);
717
    metaDataMap = Collections.unmodifiableMap(tmpMap);
707
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
718
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
708
  }
719
  }
709
 
720
 
710
  public Order() {
721
  public Order() {
Line 776... Line 787...
776
    long source,
787
    long source,
777
    double advanceAmount,
788
    double advanceAmount,
778
    long storeId,
789
    long storeId,
779
    ProductCondition productCondition,
790
    ProductCondition productCondition,
780
    long dataProtectionInsurer,
791
    long dataProtectionInsurer,
781
    double dataProtectionAmount)
792
    double dataProtectionAmount,
-
 
793
    TaxType taxType)
782
  {
794
  {
783
    this();
795
    this();
784
    this.id = id;
796
    this.id = id;
785
    setIdIsSet(true);
797
    setIdIsSet(true);
786
    this.warehouse_id = warehouse_id;
798
    this.warehouse_id = warehouse_id;
Line 889... Line 901...
889
    this.productCondition = productCondition;
901
    this.productCondition = productCondition;
890
    this.dataProtectionInsurer = dataProtectionInsurer;
902
    this.dataProtectionInsurer = dataProtectionInsurer;
891
    setDataProtectionInsurerIsSet(true);
903
    setDataProtectionInsurerIsSet(true);
892
    this.dataProtectionAmount = dataProtectionAmount;
904
    this.dataProtectionAmount = dataProtectionAmount;
893
    setDataProtectionAmountIsSet(true);
905
    setDataProtectionAmountIsSet(true);
-
 
906
    this.taxType = taxType;
894
  }
907
  }
895
 
908
 
896
  /**
909
  /**
897
   * Performs a deep copy on <i>other</i>.
910
   * Performs a deep copy on <i>other</i>.
898
   */
911
   */
Line 1028... Line 1041...
1028
    if (other.isSetProductCondition()) {
1041
    if (other.isSetProductCondition()) {
1029
      this.productCondition = other.productCondition;
1042
      this.productCondition = other.productCondition;
1030
    }
1043
    }
1031
    this.dataProtectionInsurer = other.dataProtectionInsurer;
1044
    this.dataProtectionInsurer = other.dataProtectionInsurer;
1032
    this.dataProtectionAmount = other.dataProtectionAmount;
1045
    this.dataProtectionAmount = other.dataProtectionAmount;
-
 
1046
    if (other.isSetTaxType()) {
-
 
1047
      this.taxType = other.taxType;
-
 
1048
    }
1033
  }
1049
  }
1034
 
1050
 
1035
  public Order deepCopy() {
1051
  public Order deepCopy() {
1036
    return new Order(this);
1052
    return new Order(this);
1037
  }
1053
  }
Line 1160... Line 1176...
1160
    this.productCondition = null;
1176
    this.productCondition = null;
1161
    setDataProtectionInsurerIsSet(false);
1177
    setDataProtectionInsurerIsSet(false);
1162
    this.dataProtectionInsurer = 0;
1178
    this.dataProtectionInsurer = 0;
1163
    setDataProtectionAmountIsSet(false);
1179
    setDataProtectionAmountIsSet(false);
1164
    this.dataProtectionAmount = 0.0;
1180
    this.dataProtectionAmount = 0.0;
-
 
1181
    this.taxType = null;
1165
  }
1182
  }
1166
 
1183
 
1167
  public long getId() {
1184
  public long getId() {
1168
    return this.id;
1185
    return this.id;
1169
  }
1186
  }
Line 2937... Line 2954...
2937
 
2954
 
2938
  public void setDataProtectionAmountIsSet(boolean value) {
2955
  public void setDataProtectionAmountIsSet(boolean value) {
2939
    __isset_bit_vector.set(__DATAPROTECTIONAMOUNT_ISSET_ID, value);
2956
    __isset_bit_vector.set(__DATAPROTECTIONAMOUNT_ISSET_ID, value);
2940
  }
2957
  }
2941
 
2958
 
-
 
2959
  /**
-
 
2960
   * 
-
 
2961
   * @see TaxType
-
 
2962
   */
-
 
2963
  public TaxType getTaxType() {
-
 
2964
    return this.taxType;
-
 
2965
  }
-
 
2966
 
-
 
2967
  /**
-
 
2968
   * 
-
 
2969
   * @see TaxType
-
 
2970
   */
-
 
2971
  public void setTaxType(TaxType taxType) {
-
 
2972
    this.taxType = taxType;
-
 
2973
  }
-
 
2974
 
-
 
2975
  public void unsetTaxType() {
-
 
2976
    this.taxType = null;
-
 
2977
  }
-
 
2978
 
-
 
2979
  /** Returns true if field taxType is set (has been assigned a value) and false otherwise */
-
 
2980
  public boolean isSetTaxType() {
-
 
2981
    return this.taxType != null;
-
 
2982
  }
-
 
2983
 
-
 
2984
  public void setTaxTypeIsSet(boolean value) {
-
 
2985
    if (!value) {
-
 
2986
      this.taxType = null;
-
 
2987
    }
-
 
2988
  }
-
 
2989
 
2942
  public void setFieldValue(_Fields field, Object value) {
2990
  public void setFieldValue(_Fields field, Object value) {
2943
    switch (field) {
2991
    switch (field) {
2944
    case ID:
2992
    case ID:
2945
      if (value == null) {
2993
      if (value == null) {
2946
        unsetId();
2994
        unsetId();
Line 3539... Line 3587...
3539
      } else {
3587
      } else {
3540
        setDataProtectionAmount((Double)value);
3588
        setDataProtectionAmount((Double)value);
3541
      }
3589
      }
3542
      break;
3590
      break;
3543
 
3591
 
-
 
3592
    case TAX_TYPE:
-
 
3593
      if (value == null) {
-
 
3594
        unsetTaxType();
-
 
3595
      } else {
-
 
3596
        setTaxType((TaxType)value);
-
 
3597
      }
-
 
3598
      break;
-
 
3599
 
3544
    }
3600
    }
3545
  }
3601
  }
3546
 
3602
 
3547
  public Object getFieldValue(_Fields field) {
3603
  public Object getFieldValue(_Fields field) {
3548
    switch (field) {
3604
    switch (field) {
Line 3769... Line 3825...
3769
      return Long.valueOf(getDataProtectionInsurer());
3825
      return Long.valueOf(getDataProtectionInsurer());
3770
 
3826
 
3771
    case DATA_PROTECTION_AMOUNT:
3827
    case DATA_PROTECTION_AMOUNT:
3772
      return Double.valueOf(getDataProtectionAmount());
3828
      return Double.valueOf(getDataProtectionAmount());
3773
 
3829
 
-
 
3830
    case TAX_TYPE:
-
 
3831
      return getTaxType();
-
 
3832
 
3774
    }
3833
    }
3775
    throw new IllegalStateException();
3834
    throw new IllegalStateException();
3776
  }
3835
  }
3777
 
3836
 
3778
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3837
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 3930... Line 3989...
3930
      return isSetProductCondition();
3989
      return isSetProductCondition();
3931
    case DATA_PROTECTION_INSURER:
3990
    case DATA_PROTECTION_INSURER:
3932
      return isSetDataProtectionInsurer();
3991
      return isSetDataProtectionInsurer();
3933
    case DATA_PROTECTION_AMOUNT:
3992
    case DATA_PROTECTION_AMOUNT:
3934
      return isSetDataProtectionAmount();
3993
      return isSetDataProtectionAmount();
-
 
3994
    case TAX_TYPE:
-
 
3995
      return isSetTaxType();
3935
    }
3996
    }
3936
    throw new IllegalStateException();
3997
    throw new IllegalStateException();
3937
  }
3998
  }
3938
 
3999
 
3939
  @Override
4000
  @Override
Line 4622... Line 4683...
4622
        return false;
4683
        return false;
4623
      if (this.dataProtectionAmount != that.dataProtectionAmount)
4684
      if (this.dataProtectionAmount != that.dataProtectionAmount)
4624
        return false;
4685
        return false;
4625
    }
4686
    }
4626
 
4687
 
-
 
4688
    boolean this_present_taxType = true && this.isSetTaxType();
-
 
4689
    boolean that_present_taxType = true && that.isSetTaxType();
-
 
4690
    if (this_present_taxType || that_present_taxType) {
-
 
4691
      if (!(this_present_taxType && that_present_taxType))
-
 
4692
        return false;
-
 
4693
      if (!this.taxType.equals(that.taxType))
-
 
4694
        return false;
-
 
4695
    }
-
 
4696
 
4627
    return true;
4697
    return true;
4628
  }
4698
  }
4629
 
4699
 
4630
  @Override
4700
  @Override
4631
  public int hashCode() {
4701
  public int hashCode() {
Line 5388... Line 5458...
5388
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataProtectionAmount, typedOther.dataProtectionAmount);
5458
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataProtectionAmount, typedOther.dataProtectionAmount);
5389
      if (lastComparison != 0) {
5459
      if (lastComparison != 0) {
5390
        return lastComparison;
5460
        return lastComparison;
5391
      }
5461
      }
5392
    }
5462
    }
-
 
5463
    lastComparison = Boolean.valueOf(isSetTaxType()).compareTo(typedOther.isSetTaxType());
-
 
5464
    if (lastComparison != 0) {
-
 
5465
      return lastComparison;
-
 
5466
    }
-
 
5467
    if (isSetTaxType()) {
-
 
5468
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taxType, typedOther.taxType);
-
 
5469
      if (lastComparison != 0) {
-
 
5470
        return lastComparison;
-
 
5471
      }
-
 
5472
    }
5393
    return 0;
5473
    return 0;
5394
  }
5474
  }
5395
 
5475
 
5396
  public _Fields fieldForId(int fieldId) {
5476
  public _Fields fieldForId(int fieldId) {
5397
    return _Fields.findByThriftId(fieldId);
5477
    return _Fields.findByThriftId(fieldId);
Line 5990... Line 6070...
5990
            setDataProtectionAmountIsSet(true);
6070
            setDataProtectionAmountIsSet(true);
5991
          } else { 
6071
          } else { 
5992
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6072
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5993
          }
6073
          }
5994
          break;
6074
          break;
-
 
6075
        case 76: // TAX_TYPE
-
 
6076
          if (field.type == org.apache.thrift.protocol.TType.I32) {
-
 
6077
            this.taxType = TaxType.findByValue(iprot.readI32());
-
 
6078
          } else { 
-
 
6079
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
6080
          }
-
 
6081
          break;
5995
        default:
6082
        default:
5996
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6083
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5997
      }
6084
      }
5998
      iprot.readFieldEnd();
6085
      iprot.readFieldEnd();
5999
    }
6086
    }
Line 6301... Line 6388...
6301
    oprot.writeI64(this.dataProtectionInsurer);
6388
    oprot.writeI64(this.dataProtectionInsurer);
6302
    oprot.writeFieldEnd();
6389
    oprot.writeFieldEnd();
6303
    oprot.writeFieldBegin(DATA_PROTECTION_AMOUNT_FIELD_DESC);
6390
    oprot.writeFieldBegin(DATA_PROTECTION_AMOUNT_FIELD_DESC);
6304
    oprot.writeDouble(this.dataProtectionAmount);
6391
    oprot.writeDouble(this.dataProtectionAmount);
6305
    oprot.writeFieldEnd();
6392
    oprot.writeFieldEnd();
-
 
6393
    if (this.taxType != null) {
-
 
6394
      oprot.writeFieldBegin(TAX_TYPE_FIELD_DESC);
-
 
6395
      oprot.writeI32(this.taxType.getValue());
-
 
6396
      oprot.writeFieldEnd();
-
 
6397
    }
6306
    oprot.writeFieldStop();
6398
    oprot.writeFieldStop();
6307
    oprot.writeStructEnd();
6399
    oprot.writeStructEnd();
6308
  }
6400
  }
6309
 
6401
 
6310
  @Override
6402
  @Override
Line 6727... Line 6819...
6727
    first = false;
6819
    first = false;
6728
    if (!first) sb.append(", ");
6820
    if (!first) sb.append(", ");
6729
    sb.append("dataProtectionAmount:");
6821
    sb.append("dataProtectionAmount:");
6730
    sb.append(this.dataProtectionAmount);
6822
    sb.append(this.dataProtectionAmount);
6731
    first = false;
6823
    first = false;
-
 
6824
    if (!first) sb.append(", ");
-
 
6825
    sb.append("taxType:");
-
 
6826
    if (this.taxType == null) {
-
 
6827
      sb.append("null");
-
 
6828
    } else {
-
 
6829
      sb.append(this.taxType);
-
 
6830
    }
-
 
6831
    first = false;
6732
    sb.append(")");
6832
    sb.append(")");
6733
    return sb.toString();
6833
    return sb.toString();
6734
  }
6834
  }
6735
 
6835
 
6736
  public void validate() throws org.apache.thrift.TException {
6836
  public void validate() throws org.apache.thrift.TException {