Subversion Repositories SmartDukaan

Rev

Rev 23144 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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