Subversion Repositories SmartDukaan

Rev

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

Rev 12776 Rev 13146
Line 97... Line 97...
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
  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);
-
 
102
  private static final org.apache.thrift.protocol.TField LOGISTICS_TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("logisticsTransactionId", org.apache.thrift.protocol.TType.STRING, (short)77);
102
 
103
 
103
  private long id; // required
104
  private long id; // required
104
  private long warehouse_id; // required
105
  private long warehouse_id; // required
105
  private List<LineItem> lineitems; // required
106
  private List<LineItem> lineitems; // required
106
  private long logistics_provider_id; // required
107
  private long logistics_provider_id; // required
Line 174... Line 175...
174
  private long storeId; // required
175
  private long storeId; // required
175
  private ProductCondition productCondition; // required
176
  private ProductCondition productCondition; // required
176
  private long dataProtectionInsurer; // required
177
  private long dataProtectionInsurer; // required
177
  private double dataProtectionAmount; // required
178
  private double dataProtectionAmount; // required
178
  private TaxType taxType; // required
179
  private TaxType taxType; // required
-
 
180
  private String logisticsTransactionId; // required
179
 
181
 
180
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
182
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
181
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
183
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
182
    ID((short)1, "id"),
184
    ID((short)1, "id"),
183
    WAREHOUSE_ID((short)2, "warehouse_id"),
185
    WAREHOUSE_ID((short)2, "warehouse_id"),
Line 298... Line 300...
298
    DATA_PROTECTION_AMOUNT((short)75, "dataProtectionAmount"),
300
    DATA_PROTECTION_AMOUNT((short)75, "dataProtectionAmount"),
299
    /**
301
    /**
300
     * 
302
     * 
301
     * @see TaxType
303
     * @see TaxType
302
     */
304
     */
303
    TAX_TYPE((short)76, "taxType");
305
    TAX_TYPE((short)76, "taxType"),
-
 
306
    LOGISTICS_TRANSACTION_ID((short)77, "logisticsTransactionId");
304
 
307
 
305
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
308
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
306
 
309
 
307
    static {
310
    static {
308
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
311
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 465... Line 468...
465
          return DATA_PROTECTION_INSURER;
468
          return DATA_PROTECTION_INSURER;
466
        case 75: // DATA_PROTECTION_AMOUNT
469
        case 75: // DATA_PROTECTION_AMOUNT
467
          return DATA_PROTECTION_AMOUNT;
470
          return DATA_PROTECTION_AMOUNT;
468
        case 76: // TAX_TYPE
471
        case 76: // TAX_TYPE
469
          return TAX_TYPE;
472
          return TAX_TYPE;
-
 
473
        case 77: // LOGISTICS_TRANSACTION_ID
-
 
474
          return LOGISTICS_TRANSACTION_ID;
470
        default:
475
        default:
471
          return null;
476
          return null;
472
      }
477
      }
473
    }
478
    }
474
 
479
 
Line 712... Line 717...
712
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
717
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
713
    tmpMap.put(_Fields.DATA_PROTECTION_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("dataProtectionAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
718
    tmpMap.put(_Fields.DATA_PROTECTION_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("dataProtectionAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
714
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
719
        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, 
720
    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)));
721
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TaxType.class)));
-
 
722
    tmpMap.put(_Fields.LOGISTICS_TRANSACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("logisticsTransactionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
723
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
717
    metaDataMap = Collections.unmodifiableMap(tmpMap);
724
    metaDataMap = Collections.unmodifiableMap(tmpMap);
718
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
725
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
719
  }
726
  }
720
 
727
 
721
  public Order() {
728
  public Order() {
Line 788... Line 795...
788
    double advanceAmount,
795
    double advanceAmount,
789
    long storeId,
796
    long storeId,
790
    ProductCondition productCondition,
797
    ProductCondition productCondition,
791
    long dataProtectionInsurer,
798
    long dataProtectionInsurer,
792
    double dataProtectionAmount,
799
    double dataProtectionAmount,
793
    TaxType taxType)
800
    TaxType taxType,
-
 
801
    String logisticsTransactionId)
794
  {
802
  {
795
    this();
803
    this();
796
    this.id = id;
804
    this.id = id;
797
    setIdIsSet(true);
805
    setIdIsSet(true);
798
    this.warehouse_id = warehouse_id;
806
    this.warehouse_id = warehouse_id;
Line 902... Line 910...
902
    this.dataProtectionInsurer = dataProtectionInsurer;
910
    this.dataProtectionInsurer = dataProtectionInsurer;
903
    setDataProtectionInsurerIsSet(true);
911
    setDataProtectionInsurerIsSet(true);
904
    this.dataProtectionAmount = dataProtectionAmount;
912
    this.dataProtectionAmount = dataProtectionAmount;
905
    setDataProtectionAmountIsSet(true);
913
    setDataProtectionAmountIsSet(true);
906
    this.taxType = taxType;
914
    this.taxType = taxType;
-
 
915
    this.logisticsTransactionId = logisticsTransactionId;
907
  }
916
  }
908
 
917
 
909
  /**
918
  /**
910
   * Performs a deep copy on <i>other</i>.
919
   * Performs a deep copy on <i>other</i>.
911
   */
920
   */
Line 1044... Line 1053...
1044
    this.dataProtectionInsurer = other.dataProtectionInsurer;
1053
    this.dataProtectionInsurer = other.dataProtectionInsurer;
1045
    this.dataProtectionAmount = other.dataProtectionAmount;
1054
    this.dataProtectionAmount = other.dataProtectionAmount;
1046
    if (other.isSetTaxType()) {
1055
    if (other.isSetTaxType()) {
1047
      this.taxType = other.taxType;
1056
      this.taxType = other.taxType;
1048
    }
1057
    }
-
 
1058
    if (other.isSetLogisticsTransactionId()) {
-
 
1059
      this.logisticsTransactionId = other.logisticsTransactionId;
-
 
1060
    }
1049
  }
1061
  }
1050
 
1062
 
1051
  public Order deepCopy() {
1063
  public Order deepCopy() {
1052
    return new Order(this);
1064
    return new Order(this);
1053
  }
1065
  }
Line 1177... Line 1189...
1177
    setDataProtectionInsurerIsSet(false);
1189
    setDataProtectionInsurerIsSet(false);
1178
    this.dataProtectionInsurer = 0;
1190
    this.dataProtectionInsurer = 0;
1179
    setDataProtectionAmountIsSet(false);
1191
    setDataProtectionAmountIsSet(false);
1180
    this.dataProtectionAmount = 0.0;
1192
    this.dataProtectionAmount = 0.0;
1181
    this.taxType = null;
1193
    this.taxType = null;
-
 
1194
    this.logisticsTransactionId = null;
1182
  }
1195
  }
1183
 
1196
 
1184
  public long getId() {
1197
  public long getId() {
1185
    return this.id;
1198
    return this.id;
1186
  }
1199
  }
Line 2985... Line 2998...
2985
    if (!value) {
2998
    if (!value) {
2986
      this.taxType = null;
2999
      this.taxType = null;
2987
    }
3000
    }
2988
  }
3001
  }
2989
 
3002
 
-
 
3003
  public String getLogisticsTransactionId() {
-
 
3004
    return this.logisticsTransactionId;
-
 
3005
  }
-
 
3006
 
-
 
3007
  public void setLogisticsTransactionId(String logisticsTransactionId) {
-
 
3008
    this.logisticsTransactionId = logisticsTransactionId;
-
 
3009
  }
-
 
3010
 
-
 
3011
  public void unsetLogisticsTransactionId() {
-
 
3012
    this.logisticsTransactionId = null;
-
 
3013
  }
-
 
3014
 
-
 
3015
  /** Returns true if field logisticsTransactionId is set (has been assigned a value) and false otherwise */
-
 
3016
  public boolean isSetLogisticsTransactionId() {
-
 
3017
    return this.logisticsTransactionId != null;
-
 
3018
  }
-
 
3019
 
-
 
3020
  public void setLogisticsTransactionIdIsSet(boolean value) {
-
 
3021
    if (!value) {
-
 
3022
      this.logisticsTransactionId = null;
-
 
3023
    }
-
 
3024
  }
-
 
3025
 
2990
  public void setFieldValue(_Fields field, Object value) {
3026
  public void setFieldValue(_Fields field, Object value) {
2991
    switch (field) {
3027
    switch (field) {
2992
    case ID:
3028
    case ID:
2993
      if (value == null) {
3029
      if (value == null) {
2994
        unsetId();
3030
        unsetId();
Line 3595... Line 3631...
3595
      } else {
3631
      } else {
3596
        setTaxType((TaxType)value);
3632
        setTaxType((TaxType)value);
3597
      }
3633
      }
3598
      break;
3634
      break;
3599
 
3635
 
-
 
3636
    case LOGISTICS_TRANSACTION_ID:
-
 
3637
      if (value == null) {
-
 
3638
        unsetLogisticsTransactionId();
-
 
3639
      } else {
-
 
3640
        setLogisticsTransactionId((String)value);
-
 
3641
      }
-
 
3642
      break;
-
 
3643
 
3600
    }
3644
    }
3601
  }
3645
  }
3602
 
3646
 
3603
  public Object getFieldValue(_Fields field) {
3647
  public Object getFieldValue(_Fields field) {
3604
    switch (field) {
3648
    switch (field) {
Line 3828... Line 3872...
3828
      return Double.valueOf(getDataProtectionAmount());
3872
      return Double.valueOf(getDataProtectionAmount());
3829
 
3873
 
3830
    case TAX_TYPE:
3874
    case TAX_TYPE:
3831
      return getTaxType();
3875
      return getTaxType();
3832
 
3876
 
-
 
3877
    case LOGISTICS_TRANSACTION_ID:
-
 
3878
      return getLogisticsTransactionId();
-
 
3879
 
3833
    }
3880
    }
3834
    throw new IllegalStateException();
3881
    throw new IllegalStateException();
3835
  }
3882
  }
3836
 
3883
 
3837
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3884
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 3991... Line 4038...
3991
      return isSetDataProtectionInsurer();
4038
      return isSetDataProtectionInsurer();
3992
    case DATA_PROTECTION_AMOUNT:
4039
    case DATA_PROTECTION_AMOUNT:
3993
      return isSetDataProtectionAmount();
4040
      return isSetDataProtectionAmount();
3994
    case TAX_TYPE:
4041
    case TAX_TYPE:
3995
      return isSetTaxType();
4042
      return isSetTaxType();
-
 
4043
    case LOGISTICS_TRANSACTION_ID:
-
 
4044
      return isSetLogisticsTransactionId();
3996
    }
4045
    }
3997
    throw new IllegalStateException();
4046
    throw new IllegalStateException();
3998
  }
4047
  }
3999
 
4048
 
4000
  @Override
4049
  @Override
Line 4692... Line 4741...
4692
        return false;
4741
        return false;
4693
      if (!this.taxType.equals(that.taxType))
4742
      if (!this.taxType.equals(that.taxType))
4694
        return false;
4743
        return false;
4695
    }
4744
    }
4696
 
4745
 
-
 
4746
    boolean this_present_logisticsTransactionId = true && this.isSetLogisticsTransactionId();
-
 
4747
    boolean that_present_logisticsTransactionId = true && that.isSetLogisticsTransactionId();
-
 
4748
    if (this_present_logisticsTransactionId || that_present_logisticsTransactionId) {
-
 
4749
      if (!(this_present_logisticsTransactionId && that_present_logisticsTransactionId))
-
 
4750
        return false;
-
 
4751
      if (!this.logisticsTransactionId.equals(that.logisticsTransactionId))
-
 
4752
        return false;
-
 
4753
    }
-
 
4754
 
4697
    return true;
4755
    return true;
4698
  }
4756
  }
4699
 
4757
 
4700
  @Override
4758
  @Override
4701
  public int hashCode() {
4759
  public int hashCode() {
Line 5468... Line 5526...
5468
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taxType, typedOther.taxType);
5526
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taxType, typedOther.taxType);
5469
      if (lastComparison != 0) {
5527
      if (lastComparison != 0) {
5470
        return lastComparison;
5528
        return lastComparison;
5471
      }
5529
      }
5472
    }
5530
    }
-
 
5531
    lastComparison = Boolean.valueOf(isSetLogisticsTransactionId()).compareTo(typedOther.isSetLogisticsTransactionId());
-
 
5532
    if (lastComparison != 0) {
-
 
5533
      return lastComparison;
-
 
5534
    }
-
 
5535
    if (isSetLogisticsTransactionId()) {
-
 
5536
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logisticsTransactionId, typedOther.logisticsTransactionId);
-
 
5537
      if (lastComparison != 0) {
-
 
5538
        return lastComparison;
-
 
5539
      }
-
 
5540
    }
5473
    return 0;
5541
    return 0;
5474
  }
5542
  }
5475
 
5543
 
5476
  public _Fields fieldForId(int fieldId) {
5544
  public _Fields fieldForId(int fieldId) {
5477
    return _Fields.findByThriftId(fieldId);
5545
    return _Fields.findByThriftId(fieldId);
Line 6077... Line 6145...
6077
            this.taxType = TaxType.findByValue(iprot.readI32());
6145
            this.taxType = TaxType.findByValue(iprot.readI32());
6078
          } else { 
6146
          } else { 
6079
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6147
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6080
          }
6148
          }
6081
          break;
6149
          break;
-
 
6150
        case 77: // LOGISTICS_TRANSACTION_ID
-
 
6151
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
6152
            this.logisticsTransactionId = iprot.readString();
-
 
6153
          } else { 
-
 
6154
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
6155
          }
-
 
6156
          break;
6082
        default:
6157
        default:
6083
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6158
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6084
      }
6159
      }
6085
      iprot.readFieldEnd();
6160
      iprot.readFieldEnd();
6086
    }
6161
    }
Line 6393... Line 6468...
6393
    if (this.taxType != null) {
6468
    if (this.taxType != null) {
6394
      oprot.writeFieldBegin(TAX_TYPE_FIELD_DESC);
6469
      oprot.writeFieldBegin(TAX_TYPE_FIELD_DESC);
6395
      oprot.writeI32(this.taxType.getValue());
6470
      oprot.writeI32(this.taxType.getValue());
6396
      oprot.writeFieldEnd();
6471
      oprot.writeFieldEnd();
6397
    }
6472
    }
-
 
6473
    if (this.logisticsTransactionId != null) {
-
 
6474
      oprot.writeFieldBegin(LOGISTICS_TRANSACTION_ID_FIELD_DESC);
-
 
6475
      oprot.writeString(this.logisticsTransactionId);
-
 
6476
      oprot.writeFieldEnd();
-
 
6477
    }
6398
    oprot.writeFieldStop();
6478
    oprot.writeFieldStop();
6399
    oprot.writeStructEnd();
6479
    oprot.writeStructEnd();
6400
  }
6480
  }
6401
 
6481
 
6402
  @Override
6482
  @Override
Line 6827... Line 6907...
6827
      sb.append("null");
6907
      sb.append("null");
6828
    } else {
6908
    } else {
6829
      sb.append(this.taxType);
6909
      sb.append(this.taxType);
6830
    }
6910
    }
6831
    first = false;
6911
    first = false;
-
 
6912
    if (!first) sb.append(", ");
-
 
6913
    sb.append("logisticsTransactionId:");
-
 
6914
    if (this.logisticsTransactionId == null) {
-
 
6915
      sb.append("null");
-
 
6916
    } else {
-
 
6917
      sb.append(this.logisticsTransactionId);
-
 
6918
    }
-
 
6919
    first = false;
6832
    sb.append(")");
6920
    sb.append(")");
6833
    return sb.toString();
6921
    return sb.toString();
6834
  }
6922
  }
6835
 
6923
 
6836
  public void validate() throws org.apache.thrift.TException {
6924
  public void validate() throws org.apache.thrift.TException {