Subversion Repositories SmartDukaan

Rev

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

Rev 21838 Rev 23144
Line 70... Line 70...
70
  private static final org.apache.thrift.protocol.TField QUANTITY_STEP_FIELD_DESC = new org.apache.thrift.protocol.TField("quantityStep", org.apache.thrift.protocol.TType.I64, (short)47);
70
  private static final org.apache.thrift.protocol.TField QUANTITY_STEP_FIELD_DESC = new org.apache.thrift.protocol.TField("quantityStep", org.apache.thrift.protocol.TType.I64, (short)47);
71
  private static final org.apache.thrift.protocol.TField MINIMUM_BUY_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("minimumBuyQuantity", org.apache.thrift.protocol.TType.I64, (short)48);
71
  private static final org.apache.thrift.protocol.TField MINIMUM_BUY_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("minimumBuyQuantity", org.apache.thrift.protocol.TType.I64, (short)48);
72
  private static final org.apache.thrift.protocol.TField MAXIMUM_BUY_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("maximumBuyQuantity", org.apache.thrift.protocol.TType.I64, (short)49);
72
  private static final org.apache.thrift.protocol.TField MAXIMUM_BUY_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("maximumBuyQuantity", org.apache.thrift.protocol.TType.I64, (short)49);
73
  private static final org.apache.thrift.protocol.TField DEAL_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("dealPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)50);
73
  private static final org.apache.thrift.protocol.TField DEAL_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("dealPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)50);
74
  private static final org.apache.thrift.protocol.TField HSN_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("hsnCode", org.apache.thrift.protocol.TType.STRING, (short)51);
74
  private static final org.apache.thrift.protocol.TField HSN_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("hsnCode", org.apache.thrift.protocol.TType.STRING, (short)51);
-
 
75
  private static final org.apache.thrift.protocol.TField TAX_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("taxRate", org.apache.thrift.protocol.TType.DOUBLE, (short)52);
75
 
76
 
76
  private long id; // required
77
  private long id; // required
77
  private String productGroup; // required
78
  private String productGroup; // required
78
  private String brand; // required
79
  private String brand; // required
79
  private String modelNumber; // required
80
  private String modelNumber; // required
Line 120... Line 121...
120
  private long quantityStep; // required
121
  private long quantityStep; // required
121
  private long minimumBuyQuantity; // required
122
  private long minimumBuyQuantity; // required
122
  private long maximumBuyQuantity; // required
123
  private long maximumBuyQuantity; // required
123
  private double dealPrice; // required
124
  private double dealPrice; // required
124
  private String hsnCode; // required
125
  private String hsnCode; // required
-
 
126
  private double taxRate; // required
125
 
127
 
126
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
128
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
127
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
129
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
128
    ID((short)1, "id"),
130
    ID((short)1, "id"),
129
    PRODUCT_GROUP((short)2, "productGroup"),
131
    PRODUCT_GROUP((short)2, "productGroup"),
Line 179... Line 181...
179
    PACK_QUANTITY((short)46, "packQuantity"),
181
    PACK_QUANTITY((short)46, "packQuantity"),
180
    QUANTITY_STEP((short)47, "quantityStep"),
182
    QUANTITY_STEP((short)47, "quantityStep"),
181
    MINIMUM_BUY_QUANTITY((short)48, "minimumBuyQuantity"),
183
    MINIMUM_BUY_QUANTITY((short)48, "minimumBuyQuantity"),
182
    MAXIMUM_BUY_QUANTITY((short)49, "maximumBuyQuantity"),
184
    MAXIMUM_BUY_QUANTITY((short)49, "maximumBuyQuantity"),
183
    DEAL_PRICE((short)50, "dealPrice"),
185
    DEAL_PRICE((short)50, "dealPrice"),
184
    HSN_CODE((short)51, "hsnCode");
186
    HSN_CODE((short)51, "hsnCode"),
-
 
187
    TAX_RATE((short)52, "taxRate");
185
 
188
 
186
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
189
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
187
 
190
 
188
    static {
191
    static {
189
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
192
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 292... Line 295...
292
          return MAXIMUM_BUY_QUANTITY;
295
          return MAXIMUM_BUY_QUANTITY;
293
        case 50: // DEAL_PRICE
296
        case 50: // DEAL_PRICE
294
          return DEAL_PRICE;
297
          return DEAL_PRICE;
295
        case 51: // HSN_CODE
298
        case 51: // HSN_CODE
296
          return HSN_CODE;
299
          return HSN_CODE;
-
 
300
        case 52: // TAX_RATE
-
 
301
          return TAX_RATE;
297
        default:
302
        default:
298
          return null;
303
          return null;
299
      }
304
      }
300
    }
305
    }
301
 
306
 
Line 365... Line 370...
365
  private static final int __PACKQUANTITY_ISSET_ID = 28;
370
  private static final int __PACKQUANTITY_ISSET_ID = 28;
366
  private static final int __QUANTITYSTEP_ISSET_ID = 29;
371
  private static final int __QUANTITYSTEP_ISSET_ID = 29;
367
  private static final int __MINIMUMBUYQUANTITY_ISSET_ID = 30;
372
  private static final int __MINIMUMBUYQUANTITY_ISSET_ID = 30;
368
  private static final int __MAXIMUMBUYQUANTITY_ISSET_ID = 31;
373
  private static final int __MAXIMUMBUYQUANTITY_ISSET_ID = 31;
369
  private static final int __DEALPRICE_ISSET_ID = 32;
374
  private static final int __DEALPRICE_ISSET_ID = 32;
-
 
375
  private static final int __TAXRATE_ISSET_ID = 33;
370
  private BitSet __isset_bit_vector = new BitSet(33);
376
  private BitSet __isset_bit_vector = new BitSet(34);
371
 
377
 
372
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
378
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
373
  static {
379
  static {
374
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
380
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
375
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
381
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 470... Line 476...
470
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
476
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
471
    tmpMap.put(_Fields.DEAL_PRICE, new org.apache.thrift.meta_data.FieldMetaData("dealPrice", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
477
    tmpMap.put(_Fields.DEAL_PRICE, new org.apache.thrift.meta_data.FieldMetaData("dealPrice", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
472
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
478
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
473
    tmpMap.put(_Fields.HSN_CODE, new org.apache.thrift.meta_data.FieldMetaData("hsnCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
479
    tmpMap.put(_Fields.HSN_CODE, new org.apache.thrift.meta_data.FieldMetaData("hsnCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
474
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
480
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
481
    tmpMap.put(_Fields.TAX_RATE, new org.apache.thrift.meta_data.FieldMetaData("taxRate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
482
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
475
    metaDataMap = Collections.unmodifiableMap(tmpMap);
483
    metaDataMap = Collections.unmodifiableMap(tmpMap);
476
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
484
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
477
  }
485
  }
478
 
486
 
479
  public Item() {
487
  public Item() {
Line 513... Line 521...
513
    boolean holdOverride,
521
    boolean holdOverride,
514
    long packQuantity,
522
    long packQuantity,
515
    long quantityStep,
523
    long quantityStep,
516
    long minimumBuyQuantity,
524
    long minimumBuyQuantity,
517
    long maximumBuyQuantity,
525
    long maximumBuyQuantity,
518
    String hsnCode)
526
    String hsnCode,
-
 
527
    double taxRate)
519
  {
528
  {
520
    this();
529
    this();
521
    this.id = id;
530
    this.id = id;
522
    setIdIsSet(true);
531
    setIdIsSet(true);
523
    this.productGroup = productGroup;
532
    this.productGroup = productGroup;
Line 572... Line 581...
572
    this.minimumBuyQuantity = minimumBuyQuantity;
581
    this.minimumBuyQuantity = minimumBuyQuantity;
573
    setMinimumBuyQuantityIsSet(true);
582
    setMinimumBuyQuantityIsSet(true);
574
    this.maximumBuyQuantity = maximumBuyQuantity;
583
    this.maximumBuyQuantity = maximumBuyQuantity;
575
    setMaximumBuyQuantityIsSet(true);
584
    setMaximumBuyQuantityIsSet(true);
576
    this.hsnCode = hsnCode;
585
    this.hsnCode = hsnCode;
-
 
586
    this.taxRate = taxRate;
-
 
587
    setTaxRateIsSet(true);
577
  }
588
  }
578
 
589
 
579
  /**
590
  /**
580
   * Performs a deep copy on <i>other</i>.
591
   * Performs a deep copy on <i>other</i>.
581
   */
592
   */
Line 673... Line 684...
673
    this.maximumBuyQuantity = other.maximumBuyQuantity;
684
    this.maximumBuyQuantity = other.maximumBuyQuantity;
674
    this.dealPrice = other.dealPrice;
685
    this.dealPrice = other.dealPrice;
675
    if (other.isSetHsnCode()) {
686
    if (other.isSetHsnCode()) {
676
      this.hsnCode = other.hsnCode;
687
      this.hsnCode = other.hsnCode;
677
    }
688
    }
-
 
689
    this.taxRate = other.taxRate;
678
  }
690
  }
679
 
691
 
680
  public Item deepCopy() {
692
  public Item deepCopy() {
681
    return new Item(this);
693
    return new Item(this);
682
  }
694
  }
Line 763... Line 775...
763
    setMaximumBuyQuantityIsSet(false);
775
    setMaximumBuyQuantityIsSet(false);
764
    this.maximumBuyQuantity = 0;
776
    this.maximumBuyQuantity = 0;
765
    setDealPriceIsSet(false);
777
    setDealPriceIsSet(false);
766
    this.dealPrice = 0.0;
778
    this.dealPrice = 0.0;
767
    this.hsnCode = null;
779
    this.hsnCode = null;
-
 
780
    setTaxRateIsSet(false);
-
 
781
    this.taxRate = 0.0;
768
  }
782
  }
769
 
783
 
770
  public long getId() {
784
  public long getId() {
771
    return this.id;
785
    return this.id;
772
  }
786
  }
Line 1886... Line 1900...
1886
    if (!value) {
1900
    if (!value) {
1887
      this.hsnCode = null;
1901
      this.hsnCode = null;
1888
    }
1902
    }
1889
  }
1903
  }
1890
 
1904
 
-
 
1905
  public double getTaxRate() {
-
 
1906
    return this.taxRate;
-
 
1907
  }
-
 
1908
 
-
 
1909
  public void setTaxRate(double taxRate) {
-
 
1910
    this.taxRate = taxRate;
-
 
1911
    setTaxRateIsSet(true);
-
 
1912
  }
-
 
1913
 
-
 
1914
  public void unsetTaxRate() {
-
 
1915
    __isset_bit_vector.clear(__TAXRATE_ISSET_ID);
-
 
1916
  }
-
 
1917
 
-
 
1918
  /** Returns true if field taxRate is set (has been assigned a value) and false otherwise */
-
 
1919
  public boolean isSetTaxRate() {
-
 
1920
    return __isset_bit_vector.get(__TAXRATE_ISSET_ID);
-
 
1921
  }
-
 
1922
 
-
 
1923
  public void setTaxRateIsSet(boolean value) {
-
 
1924
    __isset_bit_vector.set(__TAXRATE_ISSET_ID, value);
-
 
1925
  }
-
 
1926
 
1891
  public void setFieldValue(_Fields field, Object value) {
1927
  public void setFieldValue(_Fields field, Object value) {
1892
    switch (field) {
1928
    switch (field) {
1893
    case ID:
1929
    case ID:
1894
      if (value == null) {
1930
      if (value == null) {
1895
        unsetId();
1931
        unsetId();
Line 2280... Line 2316...
2280
      } else {
2316
      } else {
2281
        setHsnCode((String)value);
2317
        setHsnCode((String)value);
2282
      }
2318
      }
2283
      break;
2319
      break;
2284
 
2320
 
-
 
2321
    case TAX_RATE:
-
 
2322
      if (value == null) {
-
 
2323
        unsetTaxRate();
-
 
2324
      } else {
-
 
2325
        setTaxRate((Double)value);
-
 
2326
      }
-
 
2327
      break;
-
 
2328
 
2285
    }
2329
    }
2286
  }
2330
  }
2287
 
2331
 
2288
  public Object getFieldValue(_Fields field) {
2332
  public Object getFieldValue(_Fields field) {
2289
    switch (field) {
2333
    switch (field) {
Line 2432... Line 2476...
2432
      return Double.valueOf(getDealPrice());
2476
      return Double.valueOf(getDealPrice());
2433
 
2477
 
2434
    case HSN_CODE:
2478
    case HSN_CODE:
2435
      return getHsnCode();
2479
      return getHsnCode();
2436
 
2480
 
-
 
2481
    case TAX_RATE:
-
 
2482
      return Double.valueOf(getTaxRate());
-
 
2483
 
2437
    }
2484
    }
2438
    throw new IllegalStateException();
2485
    throw new IllegalStateException();
2439
  }
2486
  }
2440
 
2487
 
2441
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2488
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 2541... Line 2588...
2541
      return isSetMaximumBuyQuantity();
2588
      return isSetMaximumBuyQuantity();
2542
    case DEAL_PRICE:
2589
    case DEAL_PRICE:
2543
      return isSetDealPrice();
2590
      return isSetDealPrice();
2544
    case HSN_CODE:
2591
    case HSN_CODE:
2545
      return isSetHsnCode();
2592
      return isSetHsnCode();
-
 
2593
    case TAX_RATE:
-
 
2594
      return isSetTaxRate();
2546
    }
2595
    }
2547
    throw new IllegalStateException();
2596
    throw new IllegalStateException();
2548
  }
2597
  }
2549
 
2598
 
2550
  @Override
2599
  @Override
Line 2999... Line 3048...
2999
        return false;
3048
        return false;
3000
      if (!this.hsnCode.equals(that.hsnCode))
3049
      if (!this.hsnCode.equals(that.hsnCode))
3001
        return false;
3050
        return false;
3002
    }
3051
    }
3003
 
3052
 
-
 
3053
    boolean this_present_taxRate = true;
-
 
3054
    boolean that_present_taxRate = true;
-
 
3055
    if (this_present_taxRate || that_present_taxRate) {
-
 
3056
      if (!(this_present_taxRate && that_present_taxRate))
-
 
3057
        return false;
-
 
3058
      if (this.taxRate != that.taxRate)
-
 
3059
        return false;
-
 
3060
    }
-
 
3061
 
3004
    return true;
3062
    return true;
3005
  }
3063
  }
3006
 
3064
 
3007
  @Override
3065
  @Override
3008
  public int hashCode() {
3066
  public int hashCode() {
Line 3505... Line 3563...
3505
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hsnCode, typedOther.hsnCode);
3563
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hsnCode, typedOther.hsnCode);
3506
      if (lastComparison != 0) {
3564
      if (lastComparison != 0) {
3507
        return lastComparison;
3565
        return lastComparison;
3508
      }
3566
      }
3509
    }
3567
    }
-
 
3568
    lastComparison = Boolean.valueOf(isSetTaxRate()).compareTo(typedOther.isSetTaxRate());
-
 
3569
    if (lastComparison != 0) {
-
 
3570
      return lastComparison;
-
 
3571
    }
-
 
3572
    if (isSetTaxRate()) {
-
 
3573
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taxRate, typedOther.taxRate);
-
 
3574
      if (lastComparison != 0) {
-
 
3575
        return lastComparison;
-
 
3576
      }
-
 
3577
    }
3510
    return 0;
3578
    return 0;
3511
  }
3579
  }
3512
 
3580
 
3513
  public _Fields fieldForId(int fieldId) {
3581
  public _Fields fieldForId(int fieldId) {
3514
    return _Fields.findByThriftId(fieldId);
3582
    return _Fields.findByThriftId(fieldId);
Line 3910... Line 3978...
3910
            this.hsnCode = iprot.readString();
3978
            this.hsnCode = iprot.readString();
3911
          } else { 
3979
          } else { 
3912
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3980
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3913
          }
3981
          }
3914
          break;
3982
          break;
-
 
3983
        case 52: // TAX_RATE
-
 
3984
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-
 
3985
            this.taxRate = iprot.readDouble();
-
 
3986
            setTaxRateIsSet(true);
-
 
3987
          } else { 
-
 
3988
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
3989
          }
-
 
3990
          break;
3915
        default:
3991
        default:
3916
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3992
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3917
      }
3993
      }
3918
      iprot.readFieldEnd();
3994
      iprot.readFieldEnd();
3919
    }
3995
    }
Line 4136... Line 4212...
4136
    if (this.hsnCode != null) {
4212
    if (this.hsnCode != null) {
4137
      oprot.writeFieldBegin(HSN_CODE_FIELD_DESC);
4213
      oprot.writeFieldBegin(HSN_CODE_FIELD_DESC);
4138
      oprot.writeString(this.hsnCode);
4214
      oprot.writeString(this.hsnCode);
4139
      oprot.writeFieldEnd();
4215
      oprot.writeFieldEnd();
4140
    }
4216
    }
-
 
4217
    oprot.writeFieldBegin(TAX_RATE_FIELD_DESC);
-
 
4218
    oprot.writeDouble(this.taxRate);
-
 
4219
    oprot.writeFieldEnd();
4141
    oprot.writeFieldStop();
4220
    oprot.writeFieldStop();
4142
    oprot.writeStructEnd();
4221
    oprot.writeStructEnd();
4143
  }
4222
  }
4144
 
4223
 
4145
  @Override
4224
  @Override
Line 4430... Line 4509...
4430
      sb.append("null");
4509
      sb.append("null");
4431
    } else {
4510
    } else {
4432
      sb.append(this.hsnCode);
4511
      sb.append(this.hsnCode);
4433
    }
4512
    }
4434
    first = false;
4513
    first = false;
-
 
4514
    if (!first) sb.append(", ");
-
 
4515
    sb.append("taxRate:");
-
 
4516
    sb.append(this.taxRate);
-
 
4517
    first = false;
4435
    sb.append(")");
4518
    sb.append(")");
4436
    return sb.toString();
4519
    return sb.toString();
4437
  }
4520
  }
4438
 
4521
 
4439
  public void validate() throws org.apache.thrift.TException {
4522
  public void validate() throws org.apache.thrift.TException {