Subversion Repositories SmartDukaan

Rev

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

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