Subversion Repositories SmartDukaan

Rev

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

Rev 18414 Rev 19756
Line 68... Line 68...
68
  private static final org.apache.thrift.protocol.TField HOLD_OVERRIDE_FIELD_DESC = new org.apache.thrift.protocol.TField("holdOverride", org.apache.thrift.protocol.TType.BOOL, (short)45);
68
  private static final org.apache.thrift.protocol.TField HOLD_OVERRIDE_FIELD_DESC = new org.apache.thrift.protocol.TField("holdOverride", org.apache.thrift.protocol.TType.BOOL, (short)45);
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
 
74
 
74
  private long id; // required
75
  private long id; // required
75
  private String productGroup; // required
76
  private String productGroup; // required
76
  private String brand; // required
77
  private String brand; // required
77
  private String modelNumber; // required
78
  private String modelNumber; // required
Line 116... Line 117...
116
  private boolean holdOverride; // required
117
  private boolean holdOverride; // required
117
  private long packQuantity; // required
118
  private long packQuantity; // required
118
  private long quantityStep; // required
119
  private long quantityStep; // required
119
  private long minimumBuyQuantity; // required
120
  private long minimumBuyQuantity; // required
120
  private long maximumBuyQuantity; // required
121
  private long maximumBuyQuantity; // required
-
 
122
  private double dealPrice; // required
121
 
123
 
122
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
124
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
123
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
125
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
124
    ID((short)1, "id"),
126
    ID((short)1, "id"),
125
    PRODUCT_GROUP((short)2, "productGroup"),
127
    PRODUCT_GROUP((short)2, "productGroup"),
Line 173... Line 175...
173
    HOLD_INVENTORY((short)44, "holdInventory"),
175
    HOLD_INVENTORY((short)44, "holdInventory"),
174
    HOLD_OVERRIDE((short)45, "holdOverride"),
176
    HOLD_OVERRIDE((short)45, "holdOverride"),
175
    PACK_QUANTITY((short)46, "packQuantity"),
177
    PACK_QUANTITY((short)46, "packQuantity"),
176
    QUANTITY_STEP((short)47, "quantityStep"),
178
    QUANTITY_STEP((short)47, "quantityStep"),
177
    MINIMUM_BUY_QUANTITY((short)48, "minimumBuyQuantity"),
179
    MINIMUM_BUY_QUANTITY((short)48, "minimumBuyQuantity"),
178
    MAXIMUM_BUY_QUANTITY((short)49, "maximumBuyQuantity");
180
    MAXIMUM_BUY_QUANTITY((short)49, "maximumBuyQuantity"),
-
 
181
    DEAL_PRICE((short)50, "dealPrice");
179
 
182
 
180
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
183
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
181
 
184
 
182
    static {
185
    static {
183
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
186
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 282... Line 285...
282
          return QUANTITY_STEP;
285
          return QUANTITY_STEP;
283
        case 48: // MINIMUM_BUY_QUANTITY
286
        case 48: // MINIMUM_BUY_QUANTITY
284
          return MINIMUM_BUY_QUANTITY;
287
          return MINIMUM_BUY_QUANTITY;
285
        case 49: // MAXIMUM_BUY_QUANTITY
288
        case 49: // MAXIMUM_BUY_QUANTITY
286
          return MAXIMUM_BUY_QUANTITY;
289
          return MAXIMUM_BUY_QUANTITY;
-
 
290
        case 50: // DEAL_PRICE
-
 
291
          return DEAL_PRICE;
287
        default:
292
        default:
288
          return null;
293
          return null;
289
      }
294
      }
290
    }
295
    }
291
 
296
 
Line 354... Line 359...
354
  private static final int __HOLDOVERRIDE_ISSET_ID = 27;
359
  private static final int __HOLDOVERRIDE_ISSET_ID = 27;
355
  private static final int __PACKQUANTITY_ISSET_ID = 28;
360
  private static final int __PACKQUANTITY_ISSET_ID = 28;
356
  private static final int __QUANTITYSTEP_ISSET_ID = 29;
361
  private static final int __QUANTITYSTEP_ISSET_ID = 29;
357
  private static final int __MINIMUMBUYQUANTITY_ISSET_ID = 30;
362
  private static final int __MINIMUMBUYQUANTITY_ISSET_ID = 30;
358
  private static final int __MAXIMUMBUYQUANTITY_ISSET_ID = 31;
363
  private static final int __MAXIMUMBUYQUANTITY_ISSET_ID = 31;
-
 
364
  private static final int __DEALPRICE_ISSET_ID = 32;
359
  private BitSet __isset_bit_vector = new BitSet(32);
365
  private BitSet __isset_bit_vector = new BitSet(33);
360
 
366
 
361
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
367
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
362
  static {
368
  static {
363
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
369
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
364
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
370
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 455... Line 461...
455
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
461
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
456
    tmpMap.put(_Fields.MINIMUM_BUY_QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("minimumBuyQuantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
462
    tmpMap.put(_Fields.MINIMUM_BUY_QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("minimumBuyQuantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
457
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
463
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
458
    tmpMap.put(_Fields.MAXIMUM_BUY_QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("maximumBuyQuantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
464
    tmpMap.put(_Fields.MAXIMUM_BUY_QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("maximumBuyQuantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
459
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
465
        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, 
-
 
467
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
460
    metaDataMap = Collections.unmodifiableMap(tmpMap);
468
    metaDataMap = Collections.unmodifiableMap(tmpMap);
461
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
469
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
462
  }
470
  }
463
 
471
 
464
  public Item() {
472
  public Item() {
Line 652... Line 660...
652
    this.holdOverride = other.holdOverride;
660
    this.holdOverride = other.holdOverride;
653
    this.packQuantity = other.packQuantity;
661
    this.packQuantity = other.packQuantity;
654
    this.quantityStep = other.quantityStep;
662
    this.quantityStep = other.quantityStep;
655
    this.minimumBuyQuantity = other.minimumBuyQuantity;
663
    this.minimumBuyQuantity = other.minimumBuyQuantity;
656
    this.maximumBuyQuantity = other.maximumBuyQuantity;
664
    this.maximumBuyQuantity = other.maximumBuyQuantity;
-
 
665
    this.dealPrice = other.dealPrice;
657
  }
666
  }
658
 
667
 
659
  public Item deepCopy() {
668
  public Item deepCopy() {
660
    return new Item(this);
669
    return new Item(this);
661
  }
670
  }
Line 739... Line 748...
739
    this.quantityStep = 0;
748
    this.quantityStep = 0;
740
    setMinimumBuyQuantityIsSet(false);
749
    setMinimumBuyQuantityIsSet(false);
741
    this.minimumBuyQuantity = 0;
750
    this.minimumBuyQuantity = 0;
742
    setMaximumBuyQuantityIsSet(false);
751
    setMaximumBuyQuantityIsSet(false);
743
    this.maximumBuyQuantity = 0;
752
    this.maximumBuyQuantity = 0;
-
 
753
    setDealPriceIsSet(false);
-
 
754
    this.dealPrice = 0.0;
744
  }
755
  }
745
 
756
 
746
  public long getId() {
757
  public long getId() {
747
    return this.id;
758
    return this.id;
748
  }
759
  }
Line 1817... Line 1828...
1817
 
1828
 
1818
  public void setMaximumBuyQuantityIsSet(boolean value) {
1829
  public void setMaximumBuyQuantityIsSet(boolean value) {
1819
    __isset_bit_vector.set(__MAXIMUMBUYQUANTITY_ISSET_ID, value);
1830
    __isset_bit_vector.set(__MAXIMUMBUYQUANTITY_ISSET_ID, value);
1820
  }
1831
  }
1821
 
1832
 
-
 
1833
  public double getDealPrice() {
-
 
1834
    return this.dealPrice;
-
 
1835
  }
-
 
1836
 
-
 
1837
  public void setDealPrice(double dealPrice) {
-
 
1838
    this.dealPrice = dealPrice;
-
 
1839
    setDealPriceIsSet(true);
-
 
1840
  }
-
 
1841
 
-
 
1842
  public void unsetDealPrice() {
-
 
1843
    __isset_bit_vector.clear(__DEALPRICE_ISSET_ID);
-
 
1844
  }
-
 
1845
 
-
 
1846
  /** Returns true if field dealPrice is set (has been assigned a value) and false otherwise */
-
 
1847
  public boolean isSetDealPrice() {
-
 
1848
    return __isset_bit_vector.get(__DEALPRICE_ISSET_ID);
-
 
1849
  }
-
 
1850
 
-
 
1851
  public void setDealPriceIsSet(boolean value) {
-
 
1852
    __isset_bit_vector.set(__DEALPRICE_ISSET_ID, value);
-
 
1853
  }
-
 
1854
 
1822
  public void setFieldValue(_Fields field, Object value) {
1855
  public void setFieldValue(_Fields field, Object value) {
1823
    switch (field) {
1856
    switch (field) {
1824
    case ID:
1857
    case ID:
1825
      if (value == null) {
1858
      if (value == null) {
1826
        unsetId();
1859
        unsetId();
Line 2195... Line 2228...
2195
      } else {
2228
      } else {
2196
        setMaximumBuyQuantity((Long)value);
2229
        setMaximumBuyQuantity((Long)value);
2197
      }
2230
      }
2198
      break;
2231
      break;
2199
 
2232
 
-
 
2233
    case DEAL_PRICE:
-
 
2234
      if (value == null) {
-
 
2235
        unsetDealPrice();
-
 
2236
      } else {
-
 
2237
        setDealPrice((Double)value);
-
 
2238
      }
-
 
2239
      break;
-
 
2240
 
2200
    }
2241
    }
2201
  }
2242
  }
2202
 
2243
 
2203
  public Object getFieldValue(_Fields field) {
2244
  public Object getFieldValue(_Fields field) {
2204
    switch (field) {
2245
    switch (field) {
Line 2341... Line 2382...
2341
      return Long.valueOf(getMinimumBuyQuantity());
2382
      return Long.valueOf(getMinimumBuyQuantity());
2342
 
2383
 
2343
    case MAXIMUM_BUY_QUANTITY:
2384
    case MAXIMUM_BUY_QUANTITY:
2344
      return Long.valueOf(getMaximumBuyQuantity());
2385
      return Long.valueOf(getMaximumBuyQuantity());
2345
 
2386
 
-
 
2387
    case DEAL_PRICE:
-
 
2388
      return Double.valueOf(getDealPrice());
-
 
2389
 
2346
    }
2390
    }
2347
    throw new IllegalStateException();
2391
    throw new IllegalStateException();
2348
  }
2392
  }
2349
 
2393
 
2350
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2394
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 2446... Line 2490...
2446
      return isSetQuantityStep();
2490
      return isSetQuantityStep();
2447
    case MINIMUM_BUY_QUANTITY:
2491
    case MINIMUM_BUY_QUANTITY:
2448
      return isSetMinimumBuyQuantity();
2492
      return isSetMinimumBuyQuantity();
2449
    case MAXIMUM_BUY_QUANTITY:
2493
    case MAXIMUM_BUY_QUANTITY:
2450
      return isSetMaximumBuyQuantity();
2494
      return isSetMaximumBuyQuantity();
-
 
2495
    case DEAL_PRICE:
-
 
2496
      return isSetDealPrice();
2451
    }
2497
    }
2452
    throw new IllegalStateException();
2498
    throw new IllegalStateException();
2453
  }
2499
  }
2454
 
2500
 
2455
  @Override
2501
  @Override
Line 2886... Line 2932...
2886
        return false;
2932
        return false;
2887
      if (this.maximumBuyQuantity != that.maximumBuyQuantity)
2933
      if (this.maximumBuyQuantity != that.maximumBuyQuantity)
2888
        return false;
2934
        return false;
2889
    }
2935
    }
2890
 
2936
 
-
 
2937
    boolean this_present_dealPrice = true && this.isSetDealPrice();
-
 
2938
    boolean that_present_dealPrice = true && that.isSetDealPrice();
-
 
2939
    if (this_present_dealPrice || that_present_dealPrice) {
-
 
2940
      if (!(this_present_dealPrice && that_present_dealPrice))
-
 
2941
        return false;
-
 
2942
      if (this.dealPrice != that.dealPrice)
-
 
2943
        return false;
-
 
2944
    }
-
 
2945
 
2891
    return true;
2946
    return true;
2892
  }
2947
  }
2893
 
2948
 
2894
  @Override
2949
  @Override
2895
  public int hashCode() {
2950
  public int hashCode() {
Line 3372... Line 3427...
3372
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maximumBuyQuantity, typedOther.maximumBuyQuantity);
3427
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maximumBuyQuantity, typedOther.maximumBuyQuantity);
3373
      if (lastComparison != 0) {
3428
      if (lastComparison != 0) {
3374
        return lastComparison;
3429
        return lastComparison;
3375
      }
3430
      }
3376
    }
3431
    }
-
 
3432
    lastComparison = Boolean.valueOf(isSetDealPrice()).compareTo(typedOther.isSetDealPrice());
-
 
3433
    if (lastComparison != 0) {
-
 
3434
      return lastComparison;
-
 
3435
    }
-
 
3436
    if (isSetDealPrice()) {
-
 
3437
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dealPrice, typedOther.dealPrice);
-
 
3438
      if (lastComparison != 0) {
-
 
3439
        return lastComparison;
-
 
3440
      }
-
 
3441
    }
3377
    return 0;
3442
    return 0;
3378
  }
3443
  }
3379
 
3444
 
3380
  public _Fields fieldForId(int fieldId) {
3445
  public _Fields fieldForId(int fieldId) {
3381
    return _Fields.findByThriftId(fieldId);
3446
    return _Fields.findByThriftId(fieldId);
Line 3762... Line 3827...
3762
            setMaximumBuyQuantityIsSet(true);
3827
            setMaximumBuyQuantityIsSet(true);
3763
          } else { 
3828
          } else { 
3764
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3829
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3765
          }
3830
          }
3766
          break;
3831
          break;
-
 
3832
        case 50: // DEAL_PRICE
-
 
3833
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-
 
3834
            this.dealPrice = iprot.readDouble();
-
 
3835
            setDealPriceIsSet(true);
-
 
3836
          } else { 
-
 
3837
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
3838
          }
-
 
3839
          break;
3767
        default:
3840
        default:
3768
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3841
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3769
      }
3842
      }
3770
      iprot.readFieldEnd();
3843
      iprot.readFieldEnd();
3771
    }
3844
    }
Line 3978... Line 4051...
3978
    oprot.writeI64(this.minimumBuyQuantity);
4051
    oprot.writeI64(this.minimumBuyQuantity);
3979
    oprot.writeFieldEnd();
4052
    oprot.writeFieldEnd();
3980
    oprot.writeFieldBegin(MAXIMUM_BUY_QUANTITY_FIELD_DESC);
4053
    oprot.writeFieldBegin(MAXIMUM_BUY_QUANTITY_FIELD_DESC);
3981
    oprot.writeI64(this.maximumBuyQuantity);
4054
    oprot.writeI64(this.maximumBuyQuantity);
3982
    oprot.writeFieldEnd();
4055
    oprot.writeFieldEnd();
-
 
4056
    if (isSetDealPrice()) {
-
 
4057
      oprot.writeFieldBegin(DEAL_PRICE_FIELD_DESC);
-
 
4058
      oprot.writeDouble(this.dealPrice);
-
 
4059
      oprot.writeFieldEnd();
-
 
4060
    }
3983
    oprot.writeFieldStop();
4061
    oprot.writeFieldStop();
3984
    oprot.writeStructEnd();
4062
    oprot.writeStructEnd();
3985
  }
4063
  }
3986
 
4064
 
3987
  @Override
4065
  @Override
Line 4258... Line 4336...
4258
    first = false;
4336
    first = false;
4259
    if (!first) sb.append(", ");
4337
    if (!first) sb.append(", ");
4260
    sb.append("maximumBuyQuantity:");
4338
    sb.append("maximumBuyQuantity:");
4261
    sb.append(this.maximumBuyQuantity);
4339
    sb.append(this.maximumBuyQuantity);
4262
    first = false;
4340
    first = false;
-
 
4341
    if (isSetDealPrice()) {
-
 
4342
      if (!first) sb.append(", ");
-
 
4343
      sb.append("dealPrice:");
-
 
4344
      sb.append(this.dealPrice);
-
 
4345
      first = false;
-
 
4346
    }
4263
    sb.append(")");
4347
    sb.append(")");
4264
    return sb.toString();
4348
    return sb.toString();
4265
  }
4349
  }
4266
 
4350
 
4267
  public void validate() throws org.apache.thrift.TException {
4351
  public void validate() throws org.apache.thrift.TException {