Subversion Repositories SmartDukaan

Rev

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

Rev 19756 Rev 21838
Line 69... Line 69...
69
  private static final org.apache.thrift.protocol.TField PACK_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("packQuantity", org.apache.thrift.protocol.TType.I64, (short)46);
69
  private static final org.apache.thrift.protocol.TField PACK_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("packQuantity", org.apache.thrift.protocol.TType.I64, (short)46);
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
 
75
 
75
  private long id; // required
76
  private long id; // required
76
  private String productGroup; // required
77
  private String productGroup; // required
77
  private String brand; // required
78
  private String brand; // required
78
  private String modelNumber; // required
79
  private String modelNumber; // required
Line 118... Line 119...
118
  private long packQuantity; // required
119
  private long packQuantity; // required
119
  private long quantityStep; // required
120
  private long quantityStep; // required
120
  private long minimumBuyQuantity; // required
121
  private long minimumBuyQuantity; // required
121
  private long maximumBuyQuantity; // required
122
  private long maximumBuyQuantity; // required
122
  private double dealPrice; // required
123
  private double dealPrice; // required
-
 
124
  private String hsnCode; // required
123
 
125
 
124
  /** 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. */
125
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
127
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
126
    ID((short)1, "id"),
128
    ID((short)1, "id"),
127
    PRODUCT_GROUP((short)2, "productGroup"),
129
    PRODUCT_GROUP((short)2, "productGroup"),
Line 176... Line 178...
176
    HOLD_OVERRIDE((short)45, "holdOverride"),
178
    HOLD_OVERRIDE((short)45, "holdOverride"),
177
    PACK_QUANTITY((short)46, "packQuantity"),
179
    PACK_QUANTITY((short)46, "packQuantity"),
178
    QUANTITY_STEP((short)47, "quantityStep"),
180
    QUANTITY_STEP((short)47, "quantityStep"),
179
    MINIMUM_BUY_QUANTITY((short)48, "minimumBuyQuantity"),
181
    MINIMUM_BUY_QUANTITY((short)48, "minimumBuyQuantity"),
180
    MAXIMUM_BUY_QUANTITY((short)49, "maximumBuyQuantity"),
182
    MAXIMUM_BUY_QUANTITY((short)49, "maximumBuyQuantity"),
181
    DEAL_PRICE((short)50, "dealPrice");
183
    DEAL_PRICE((short)50, "dealPrice"),
-
 
184
    HSN_CODE((short)51, "hsnCode");
182
 
185
 
183
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
186
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
184
 
187
 
185
    static {
188
    static {
186
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
189
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 287... Line 290...
287
          return MINIMUM_BUY_QUANTITY;
290
          return MINIMUM_BUY_QUANTITY;
288
        case 49: // MAXIMUM_BUY_QUANTITY
291
        case 49: // MAXIMUM_BUY_QUANTITY
289
          return MAXIMUM_BUY_QUANTITY;
292
          return MAXIMUM_BUY_QUANTITY;
290
        case 50: // DEAL_PRICE
293
        case 50: // DEAL_PRICE
291
          return DEAL_PRICE;
294
          return DEAL_PRICE;
-
 
295
        case 51: // HSN_CODE
-
 
296
          return HSN_CODE;
292
        default:
297
        default:
293
          return null;
298
          return null;
294
      }
299
      }
295
    }
300
    }
296
 
301
 
Line 463... Line 468...
463
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
468
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
464
    tmpMap.put(_Fields.MAXIMUM_BUY_QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("maximumBuyQuantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
469
    tmpMap.put(_Fields.MAXIMUM_BUY_QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("maximumBuyQuantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
465
        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)));
466
    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, 
467
        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)));
-
 
473
    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)));
468
    metaDataMap = Collections.unmodifiableMap(tmpMap);
475
    metaDataMap = Collections.unmodifiableMap(tmpMap);
469
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
476
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
470
  }
477
  }
471
 
478
 
472
  public Item() {
479
  public Item() {
Line 505... Line 512...
505
    long holdInventory,
512
    long holdInventory,
506
    boolean holdOverride,
513
    boolean holdOverride,
507
    long packQuantity,
514
    long packQuantity,
508
    long quantityStep,
515
    long quantityStep,
509
    long minimumBuyQuantity,
516
    long minimumBuyQuantity,
510
    long maximumBuyQuantity)
517
    long maximumBuyQuantity,
-
 
518
    String hsnCode)
511
  {
519
  {
512
    this();
520
    this();
513
    this.id = id;
521
    this.id = id;
514
    setIdIsSet(true);
522
    setIdIsSet(true);
515
    this.productGroup = productGroup;
523
    this.productGroup = productGroup;
Line 563... Line 571...
563
    setQuantityStepIsSet(true);
571
    setQuantityStepIsSet(true);
564
    this.minimumBuyQuantity = minimumBuyQuantity;
572
    this.minimumBuyQuantity = minimumBuyQuantity;
565
    setMinimumBuyQuantityIsSet(true);
573
    setMinimumBuyQuantityIsSet(true);
566
    this.maximumBuyQuantity = maximumBuyQuantity;
574
    this.maximumBuyQuantity = maximumBuyQuantity;
567
    setMaximumBuyQuantityIsSet(true);
575
    setMaximumBuyQuantityIsSet(true);
-
 
576
    this.hsnCode = hsnCode;
568
  }
577
  }
569
 
578
 
570
  /**
579
  /**
571
   * Performs a deep copy on <i>other</i>.
580
   * Performs a deep copy on <i>other</i>.
572
   */
581
   */
Line 661... Line 670...
661
    this.packQuantity = other.packQuantity;
670
    this.packQuantity = other.packQuantity;
662
    this.quantityStep = other.quantityStep;
671
    this.quantityStep = other.quantityStep;
663
    this.minimumBuyQuantity = other.minimumBuyQuantity;
672
    this.minimumBuyQuantity = other.minimumBuyQuantity;
664
    this.maximumBuyQuantity = other.maximumBuyQuantity;
673
    this.maximumBuyQuantity = other.maximumBuyQuantity;
665
    this.dealPrice = other.dealPrice;
674
    this.dealPrice = other.dealPrice;
-
 
675
    if (other.isSetHsnCode()) {
-
 
676
      this.hsnCode = other.hsnCode;
-
 
677
    }
666
  }
678
  }
667
 
679
 
668
  public Item deepCopy() {
680
  public Item deepCopy() {
669
    return new Item(this);
681
    return new Item(this);
670
  }
682
  }
Line 750... Line 762...
750
    this.minimumBuyQuantity = 0;
762
    this.minimumBuyQuantity = 0;
751
    setMaximumBuyQuantityIsSet(false);
763
    setMaximumBuyQuantityIsSet(false);
752
    this.maximumBuyQuantity = 0;
764
    this.maximumBuyQuantity = 0;
753
    setDealPriceIsSet(false);
765
    setDealPriceIsSet(false);
754
    this.dealPrice = 0.0;
766
    this.dealPrice = 0.0;
-
 
767
    this.hsnCode = null;
755
  }
768
  }
756
 
769
 
757
  public long getId() {
770
  public long getId() {
758
    return this.id;
771
    return this.id;
759
  }
772
  }
Line 1850... Line 1863...
1850
 
1863
 
1851
  public void setDealPriceIsSet(boolean value) {
1864
  public void setDealPriceIsSet(boolean value) {
1852
    __isset_bit_vector.set(__DEALPRICE_ISSET_ID, value);
1865
    __isset_bit_vector.set(__DEALPRICE_ISSET_ID, value);
1853
  }
1866
  }
1854
 
1867
 
-
 
1868
  public String getHsnCode() {
-
 
1869
    return this.hsnCode;
-
 
1870
  }
-
 
1871
 
-
 
1872
  public void setHsnCode(String hsnCode) {
-
 
1873
    this.hsnCode = hsnCode;
-
 
1874
  }
-
 
1875
 
-
 
1876
  public void unsetHsnCode() {
-
 
1877
    this.hsnCode = null;
-
 
1878
  }
-
 
1879
 
-
 
1880
  /** Returns true if field hsnCode is set (has been assigned a value) and false otherwise */
-
 
1881
  public boolean isSetHsnCode() {
-
 
1882
    return this.hsnCode != null;
-
 
1883
  }
-
 
1884
 
-
 
1885
  public void setHsnCodeIsSet(boolean value) {
-
 
1886
    if (!value) {
-
 
1887
      this.hsnCode = null;
-
 
1888
    }
-
 
1889
  }
-
 
1890
 
1855
  public void setFieldValue(_Fields field, Object value) {
1891
  public void setFieldValue(_Fields field, Object value) {
1856
    switch (field) {
1892
    switch (field) {
1857
    case ID:
1893
    case ID:
1858
      if (value == null) {
1894
      if (value == null) {
1859
        unsetId();
1895
        unsetId();
Line 2236... Line 2272...
2236
      } else {
2272
      } else {
2237
        setDealPrice((Double)value);
2273
        setDealPrice((Double)value);
2238
      }
2274
      }
2239
      break;
2275
      break;
2240
 
2276
 
-
 
2277
    case HSN_CODE:
-
 
2278
      if (value == null) {
-
 
2279
        unsetHsnCode();
-
 
2280
      } else {
-
 
2281
        setHsnCode((String)value);
-
 
2282
      }
-
 
2283
      break;
-
 
2284
 
2241
    }
2285
    }
2242
  }
2286
  }
2243
 
2287
 
2244
  public Object getFieldValue(_Fields field) {
2288
  public Object getFieldValue(_Fields field) {
2245
    switch (field) {
2289
    switch (field) {
Line 2385... Line 2429...
2385
      return Long.valueOf(getMaximumBuyQuantity());
2429
      return Long.valueOf(getMaximumBuyQuantity());
2386
 
2430
 
2387
    case DEAL_PRICE:
2431
    case DEAL_PRICE:
2388
      return Double.valueOf(getDealPrice());
2432
      return Double.valueOf(getDealPrice());
2389
 
2433
 
-
 
2434
    case HSN_CODE:
-
 
2435
      return getHsnCode();
-
 
2436
 
2390
    }
2437
    }
2391
    throw new IllegalStateException();
2438
    throw new IllegalStateException();
2392
  }
2439
  }
2393
 
2440
 
2394
  /** 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 2492... Line 2539...
2492
      return isSetMinimumBuyQuantity();
2539
      return isSetMinimumBuyQuantity();
2493
    case MAXIMUM_BUY_QUANTITY:
2540
    case MAXIMUM_BUY_QUANTITY:
2494
      return isSetMaximumBuyQuantity();
2541
      return isSetMaximumBuyQuantity();
2495
    case DEAL_PRICE:
2542
    case DEAL_PRICE:
2496
      return isSetDealPrice();
2543
      return isSetDealPrice();
-
 
2544
    case HSN_CODE:
-
 
2545
      return isSetHsnCode();
2497
    }
2546
    }
2498
    throw new IllegalStateException();
2547
    throw new IllegalStateException();
2499
  }
2548
  }
2500
 
2549
 
2501
  @Override
2550
  @Override
Line 2941... Line 2990...
2941
        return false;
2990
        return false;
2942
      if (this.dealPrice != that.dealPrice)
2991
      if (this.dealPrice != that.dealPrice)
2943
        return false;
2992
        return false;
2944
    }
2993
    }
2945
 
2994
 
-
 
2995
    boolean this_present_hsnCode = true && this.isSetHsnCode();
-
 
2996
    boolean that_present_hsnCode = true && that.isSetHsnCode();
-
 
2997
    if (this_present_hsnCode || that_present_hsnCode) {
-
 
2998
      if (!(this_present_hsnCode && that_present_hsnCode))
-
 
2999
        return false;
-
 
3000
      if (!this.hsnCode.equals(that.hsnCode))
-
 
3001
        return false;
-
 
3002
    }
-
 
3003
 
2946
    return true;
3004
    return true;
2947
  }
3005
  }
2948
 
3006
 
2949
  @Override
3007
  @Override
2950
  public int hashCode() {
3008
  public int hashCode() {
Line 3437... Line 3495...
3437
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dealPrice, typedOther.dealPrice);
3495
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dealPrice, typedOther.dealPrice);
3438
      if (lastComparison != 0) {
3496
      if (lastComparison != 0) {
3439
        return lastComparison;
3497
        return lastComparison;
3440
      }
3498
      }
3441
    }
3499
    }
-
 
3500
    lastComparison = Boolean.valueOf(isSetHsnCode()).compareTo(typedOther.isSetHsnCode());
-
 
3501
    if (lastComparison != 0) {
-
 
3502
      return lastComparison;
-
 
3503
    }
-
 
3504
    if (isSetHsnCode()) {
-
 
3505
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hsnCode, typedOther.hsnCode);
-
 
3506
      if (lastComparison != 0) {
-
 
3507
        return lastComparison;
-
 
3508
      }
-
 
3509
    }
3442
    return 0;
3510
    return 0;
3443
  }
3511
  }
3444
 
3512
 
3445
  public _Fields fieldForId(int fieldId) {
3513
  public _Fields fieldForId(int fieldId) {
3446
    return _Fields.findByThriftId(fieldId);
3514
    return _Fields.findByThriftId(fieldId);
Line 3835... Line 3903...
3835
            setDealPriceIsSet(true);
3903
            setDealPriceIsSet(true);
3836
          } else { 
3904
          } else { 
3837
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3905
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3838
          }
3906
          }
3839
          break;
3907
          break;
-
 
3908
        case 51: // HSN_CODE
-
 
3909
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
3910
            this.hsnCode = iprot.readString();
-
 
3911
          } else { 
-
 
3912
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
3913
          }
-
 
3914
          break;
3840
        default:
3915
        default:
3841
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3916
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3842
      }
3917
      }
3843
      iprot.readFieldEnd();
3918
      iprot.readFieldEnd();
3844
    }
3919
    }
Line 4056... Line 4131...
4056
    if (isSetDealPrice()) {
4131
    if (isSetDealPrice()) {
4057
      oprot.writeFieldBegin(DEAL_PRICE_FIELD_DESC);
4132
      oprot.writeFieldBegin(DEAL_PRICE_FIELD_DESC);
4058
      oprot.writeDouble(this.dealPrice);
4133
      oprot.writeDouble(this.dealPrice);
4059
      oprot.writeFieldEnd();
4134
      oprot.writeFieldEnd();
4060
    }
4135
    }
-
 
4136
    if (this.hsnCode != null) {
-
 
4137
      oprot.writeFieldBegin(HSN_CODE_FIELD_DESC);
-
 
4138
      oprot.writeString(this.hsnCode);
-
 
4139
      oprot.writeFieldEnd();
-
 
4140
    }
4061
    oprot.writeFieldStop();
4141
    oprot.writeFieldStop();
4062
    oprot.writeStructEnd();
4142
    oprot.writeStructEnd();
4063
  }
4143
  }
4064
 
4144
 
4065
  @Override
4145
  @Override
Line 4342... Line 4422...
4342
      if (!first) sb.append(", ");
4422
      if (!first) sb.append(", ");
4343
      sb.append("dealPrice:");
4423
      sb.append("dealPrice:");
4344
      sb.append(this.dealPrice);
4424
      sb.append(this.dealPrice);
4345
      first = false;
4425
      first = false;
4346
    }
4426
    }
-
 
4427
    if (!first) sb.append(", ");
-
 
4428
    sb.append("hsnCode:");
-
 
4429
    if (this.hsnCode == null) {
-
 
4430
      sb.append("null");
-
 
4431
    } else {
-
 
4432
      sb.append(this.hsnCode);
-
 
4433
    }
-
 
4434
    first = false;
4347
    sb.append(")");
4435
    sb.append(")");
4348
    return sb.toString();
4436
    return sb.toString();
4349
  }
4437
  }
4350
 
4438
 
4351
  public void validate() throws org.apache.thrift.TException {
4439
  public void validate() throws org.apache.thrift.TException {