Subversion Repositories SmartDukaan

Rev

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

Rev 6777 Rev 6805
Line 60... Line 60...
60
  private static final org.apache.thrift.protocol.TField CLEARANCE_FIELD_DESC = new org.apache.thrift.protocol.TField("clearance", org.apache.thrift.protocol.TType.BOOL, (short)36);
60
  private static final org.apache.thrift.protocol.TField CLEARANCE_FIELD_DESC = new org.apache.thrift.protocol.TField("clearance", org.apache.thrift.protocol.TType.BOOL, (short)36);
61
  private static final org.apache.thrift.protocol.TField VAT_PERCENTAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("vatPercentage", org.apache.thrift.protocol.TType.DOUBLE, (short)37);
61
  private static final org.apache.thrift.protocol.TField VAT_PERCENTAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("vatPercentage", org.apache.thrift.protocol.TType.DOUBLE, (short)37);
62
  private static final org.apache.thrift.protocol.TField SHOW_SELLING_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("showSellingPrice", org.apache.thrift.protocol.TType.BOOL, (short)38);
62
  private static final org.apache.thrift.protocol.TField SHOW_SELLING_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("showSellingPrice", org.apache.thrift.protocol.TType.BOOL, (short)38);
63
  private static final org.apache.thrift.protocol.TField BEST_DEALS_DETAILS_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("bestDealsDetailsText", org.apache.thrift.protocol.TType.STRING, (short)39);
63
  private static final org.apache.thrift.protocol.TField BEST_DEALS_DETAILS_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("bestDealsDetailsText", org.apache.thrift.protocol.TType.STRING, (short)39);
64
  private static final org.apache.thrift.protocol.TField BEST_DEALS_DETAILS_LINK_FIELD_DESC = new org.apache.thrift.protocol.TField("bestDealsDetailsLink", org.apache.thrift.protocol.TType.STRING, (short)40);
64
  private static final org.apache.thrift.protocol.TField BEST_DEALS_DETAILS_LINK_FIELD_DESC = new org.apache.thrift.protocol.TField("bestDealsDetailsLink", org.apache.thrift.protocol.TType.STRING, (short)40);
-
 
65
  private static final org.apache.thrift.protocol.TField PREFERRED_INSURER_FIELD_DESC = new org.apache.thrift.protocol.TField("preferredInsurer", org.apache.thrift.protocol.TType.I64, (short)41);
65
 
66
 
66
  private long id; // required
67
  private long id; // required
67
  private String productGroup; // required
68
  private String productGroup; // required
68
  private String brand; // required
69
  private String brand; // required
69
  private String modelNumber; // required
70
  private String modelNumber; // required
Line 100... Line 101...
100
  private boolean clearance; // required
101
  private boolean clearance; // required
101
  private double vatPercentage; // required
102
  private double vatPercentage; // required
102
  private boolean showSellingPrice; // required
103
  private boolean showSellingPrice; // required
103
  private String bestDealsDetailsText; // required
104
  private String bestDealsDetailsText; // required
104
  private String bestDealsDetailsLink; // required
105
  private String bestDealsDetailsLink; // required
-
 
106
  private long preferredInsurer; // required
105
 
107
 
106
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
108
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
107
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
109
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
108
    ID((short)1, "id"),
110
    ID((short)1, "id"),
109
    PRODUCT_GROUP((short)2, "productGroup"),
111
    PRODUCT_GROUP((short)2, "productGroup"),
Line 149... Line 151...
149
    HAS_ITEM_NO((short)35, "hasItemNo"),
151
    HAS_ITEM_NO((short)35, "hasItemNo"),
150
    CLEARANCE((short)36, "clearance"),
152
    CLEARANCE((short)36, "clearance"),
151
    VAT_PERCENTAGE((short)37, "vatPercentage"),
153
    VAT_PERCENTAGE((short)37, "vatPercentage"),
152
    SHOW_SELLING_PRICE((short)38, "showSellingPrice"),
154
    SHOW_SELLING_PRICE((short)38, "showSellingPrice"),
153
    BEST_DEALS_DETAILS_TEXT((short)39, "bestDealsDetailsText"),
155
    BEST_DEALS_DETAILS_TEXT((short)39, "bestDealsDetailsText"),
154
    BEST_DEALS_DETAILS_LINK((short)40, "bestDealsDetailsLink");
156
    BEST_DEALS_DETAILS_LINK((short)40, "bestDealsDetailsLink"),
-
 
157
    PREFERRED_INSURER((short)41, "preferredInsurer");
155
 
158
 
156
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
159
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
157
 
160
 
158
    static {
161
    static {
159
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
162
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 242... Line 245...
242
          return SHOW_SELLING_PRICE;
245
          return SHOW_SELLING_PRICE;
243
        case 39: // BEST_DEALS_DETAILS_TEXT
246
        case 39: // BEST_DEALS_DETAILS_TEXT
244
          return BEST_DEALS_DETAILS_TEXT;
247
          return BEST_DEALS_DETAILS_TEXT;
245
        case 40: // BEST_DEALS_DETAILS_LINK
248
        case 40: // BEST_DEALS_DETAILS_LINK
246
          return BEST_DEALS_DETAILS_LINK;
249
          return BEST_DEALS_DETAILS_LINK;
-
 
250
        case 41: // PREFERRED_INSURER
-
 
251
          return PREFERRED_INSURER;
247
        default:
252
        default:
248
          return null;
253
          return null;
249
      }
254
      }
250
    }
255
    }
251
 
256
 
Line 307... Line 312...
307
  private static final int __EXPECTEDARRIVALDATE_ISSET_ID = 20;
312
  private static final int __EXPECTEDARRIVALDATE_ISSET_ID = 20;
308
  private static final int __HASITEMNO_ISSET_ID = 21;
313
  private static final int __HASITEMNO_ISSET_ID = 21;
309
  private static final int __CLEARANCE_ISSET_ID = 22;
314
  private static final int __CLEARANCE_ISSET_ID = 22;
310
  private static final int __VATPERCENTAGE_ISSET_ID = 23;
315
  private static final int __VATPERCENTAGE_ISSET_ID = 23;
311
  private static final int __SHOWSELLINGPRICE_ISSET_ID = 24;
316
  private static final int __SHOWSELLINGPRICE_ISSET_ID = 24;
-
 
317
  private static final int __PREFERREDINSURER_ISSET_ID = 25;
312
  private BitSet __isset_bit_vector = new BitSet(25);
318
  private BitSet __isset_bit_vector = new BitSet(26);
313
 
319
 
314
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
320
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
315
  static {
321
  static {
316
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
322
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
317
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
323
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 392... Line 398...
392
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
398
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
393
    tmpMap.put(_Fields.BEST_DEALS_DETAILS_TEXT, new org.apache.thrift.meta_data.FieldMetaData("bestDealsDetailsText", org.apache.thrift.TFieldRequirementType.DEFAULT, 
399
    tmpMap.put(_Fields.BEST_DEALS_DETAILS_TEXT, new org.apache.thrift.meta_data.FieldMetaData("bestDealsDetailsText", org.apache.thrift.TFieldRequirementType.DEFAULT, 
394
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
400
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
395
    tmpMap.put(_Fields.BEST_DEALS_DETAILS_LINK, new org.apache.thrift.meta_data.FieldMetaData("bestDealsDetailsLink", org.apache.thrift.TFieldRequirementType.DEFAULT, 
401
    tmpMap.put(_Fields.BEST_DEALS_DETAILS_LINK, new org.apache.thrift.meta_data.FieldMetaData("bestDealsDetailsLink", org.apache.thrift.TFieldRequirementType.DEFAULT, 
396
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
402
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
403
    tmpMap.put(_Fields.PREFERRED_INSURER, new org.apache.thrift.meta_data.FieldMetaData("preferredInsurer", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
404
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
397
    metaDataMap = Collections.unmodifiableMap(tmpMap);
405
    metaDataMap = Collections.unmodifiableMap(tmpMap);
398
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
406
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
399
  }
407
  }
400
 
408
 
401
  public Item() {
409
  public Item() {
Line 426... Line 434...
426
    boolean hasItemNo,
434
    boolean hasItemNo,
427
    boolean clearance,
435
    boolean clearance,
428
    double vatPercentage,
436
    double vatPercentage,
429
    boolean showSellingPrice,
437
    boolean showSellingPrice,
430
    String bestDealsDetailsText,
438
    String bestDealsDetailsText,
431
    String bestDealsDetailsLink)
439
    String bestDealsDetailsLink,
-
 
440
    long preferredInsurer)
432
  {
441
  {
433
    this();
442
    this();
434
    this.id = id;
443
    this.id = id;
435
    setIdIsSet(true);
444
    setIdIsSet(true);
436
    this.productGroup = productGroup;
445
    this.productGroup = productGroup;
Line 469... Line 478...
469
    setVatPercentageIsSet(true);
478
    setVatPercentageIsSet(true);
470
    this.showSellingPrice = showSellingPrice;
479
    this.showSellingPrice = showSellingPrice;
471
    setShowSellingPriceIsSet(true);
480
    setShowSellingPriceIsSet(true);
472
    this.bestDealsDetailsText = bestDealsDetailsText;
481
    this.bestDealsDetailsText = bestDealsDetailsText;
473
    this.bestDealsDetailsLink = bestDealsDetailsLink;
482
    this.bestDealsDetailsLink = bestDealsDetailsLink;
-
 
483
    this.preferredInsurer = preferredInsurer;
-
 
484
    setPreferredInsurerIsSet(true);
474
  }
485
  }
475
 
486
 
476
  /**
487
  /**
477
   * Performs a deep copy on <i>other</i>.
488
   * Performs a deep copy on <i>other</i>.
478
   */
489
   */
Line 556... Line 567...
556
      this.bestDealsDetailsText = other.bestDealsDetailsText;
567
      this.bestDealsDetailsText = other.bestDealsDetailsText;
557
    }
568
    }
558
    if (other.isSetBestDealsDetailsLink()) {
569
    if (other.isSetBestDealsDetailsLink()) {
559
      this.bestDealsDetailsLink = other.bestDealsDetailsLink;
570
      this.bestDealsDetailsLink = other.bestDealsDetailsLink;
560
    }
571
    }
-
 
572
    this.preferredInsurer = other.preferredInsurer;
561
  }
573
  }
562
 
574
 
563
  public Item deepCopy() {
575
  public Item deepCopy() {
564
    return new Item(this);
576
    return new Item(this);
565
  }
577
  }
Line 628... Line 640...
628
    this.vatPercentage = 0.0;
640
    this.vatPercentage = 0.0;
629
    setShowSellingPriceIsSet(false);
641
    setShowSellingPriceIsSet(false);
630
    this.showSellingPrice = false;
642
    this.showSellingPrice = false;
631
    this.bestDealsDetailsText = null;
643
    this.bestDealsDetailsText = null;
632
    this.bestDealsDetailsLink = null;
644
    this.bestDealsDetailsLink = null;
-
 
645
    setPreferredInsurerIsSet(false);
-
 
646
    this.preferredInsurer = 0;
633
  }
647
  }
634
 
648
 
635
  public long getId() {
649
  public long getId() {
636
    return this.id;
650
    return this.id;
637
  }
651
  }
Line 1529... Line 1543...
1529
    if (!value) {
1543
    if (!value) {
1530
      this.bestDealsDetailsLink = null;
1544
      this.bestDealsDetailsLink = null;
1531
    }
1545
    }
1532
  }
1546
  }
1533
 
1547
 
-
 
1548
  public long getPreferredInsurer() {
-
 
1549
    return this.preferredInsurer;
-
 
1550
  }
-
 
1551
 
-
 
1552
  public void setPreferredInsurer(long preferredInsurer) {
-
 
1553
    this.preferredInsurer = preferredInsurer;
-
 
1554
    setPreferredInsurerIsSet(true);
-
 
1555
  }
-
 
1556
 
-
 
1557
  public void unsetPreferredInsurer() {
-
 
1558
    __isset_bit_vector.clear(__PREFERREDINSURER_ISSET_ID);
-
 
1559
  }
-
 
1560
 
-
 
1561
  /** Returns true if field preferredInsurer is set (has been assigned a value) and false otherwise */
-
 
1562
  public boolean isSetPreferredInsurer() {
-
 
1563
    return __isset_bit_vector.get(__PREFERREDINSURER_ISSET_ID);
-
 
1564
  }
-
 
1565
 
-
 
1566
  public void setPreferredInsurerIsSet(boolean value) {
-
 
1567
    __isset_bit_vector.set(__PREFERREDINSURER_ISSET_ID, value);
-
 
1568
  }
-
 
1569
 
1534
  public void setFieldValue(_Fields field, Object value) {
1570
  public void setFieldValue(_Fields field, Object value) {
1535
    switch (field) {
1571
    switch (field) {
1536
    case ID:
1572
    case ID:
1537
      if (value == null) {
1573
      if (value == null) {
1538
        unsetId();
1574
        unsetId();
Line 1843... Line 1879...
1843
      } else {
1879
      } else {
1844
        setBestDealsDetailsLink((String)value);
1880
        setBestDealsDetailsLink((String)value);
1845
      }
1881
      }
1846
      break;
1882
      break;
1847
 
1883
 
-
 
1884
    case PREFERRED_INSURER:
-
 
1885
      if (value == null) {
-
 
1886
        unsetPreferredInsurer();
-
 
1887
      } else {
-
 
1888
        setPreferredInsurer((Long)value);
-
 
1889
      }
-
 
1890
      break;
-
 
1891
 
1848
    }
1892
    }
1849
  }
1893
  }
1850
 
1894
 
1851
  public Object getFieldValue(_Fields field) {
1895
  public Object getFieldValue(_Fields field) {
1852
    switch (field) {
1896
    switch (field) {
Line 1965... Line 2009...
1965
      return getBestDealsDetailsText();
2009
      return getBestDealsDetailsText();
1966
 
2010
 
1967
    case BEST_DEALS_DETAILS_LINK:
2011
    case BEST_DEALS_DETAILS_LINK:
1968
      return getBestDealsDetailsLink();
2012
      return getBestDealsDetailsLink();
1969
 
2013
 
-
 
2014
    case PREFERRED_INSURER:
-
 
2015
      return Long.valueOf(getPreferredInsurer());
-
 
2016
 
1970
    }
2017
    }
1971
    throw new IllegalStateException();
2018
    throw new IllegalStateException();
1972
  }
2019
  }
1973
 
2020
 
1974
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2021
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 2054... Line 2101...
2054
      return isSetShowSellingPrice();
2101
      return isSetShowSellingPrice();
2055
    case BEST_DEALS_DETAILS_TEXT:
2102
    case BEST_DEALS_DETAILS_TEXT:
2056
      return isSetBestDealsDetailsText();
2103
      return isSetBestDealsDetailsText();
2057
    case BEST_DEALS_DETAILS_LINK:
2104
    case BEST_DEALS_DETAILS_LINK:
2058
      return isSetBestDealsDetailsLink();
2105
      return isSetBestDealsDetailsLink();
-
 
2106
    case PREFERRED_INSURER:
-
 
2107
      return isSetPreferredInsurer();
2059
    }
2108
    }
2060
    throw new IllegalStateException();
2109
    throw new IllegalStateException();
2061
  }
2110
  }
2062
 
2111
 
2063
  @Override
2112
  @Override
Line 2422... Line 2471...
2422
        return false;
2471
        return false;
2423
      if (!this.bestDealsDetailsLink.equals(that.bestDealsDetailsLink))
2472
      if (!this.bestDealsDetailsLink.equals(that.bestDealsDetailsLink))
2424
        return false;
2473
        return false;
2425
    }
2474
    }
2426
 
2475
 
-
 
2476
    boolean this_present_preferredInsurer = true;
-
 
2477
    boolean that_present_preferredInsurer = true;
-
 
2478
    if (this_present_preferredInsurer || that_present_preferredInsurer) {
-
 
2479
      if (!(this_present_preferredInsurer && that_present_preferredInsurer))
-
 
2480
        return false;
-
 
2481
      if (this.preferredInsurer != that.preferredInsurer)
-
 
2482
        return false;
-
 
2483
    }
-
 
2484
 
2427
    return true;
2485
    return true;
2428
  }
2486
  }
2429
 
2487
 
2430
  @Override
2488
  @Override
2431
  public int hashCode() {
2489
  public int hashCode() {
Line 2828... Line 2886...
2828
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bestDealsDetailsLink, typedOther.bestDealsDetailsLink);
2886
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bestDealsDetailsLink, typedOther.bestDealsDetailsLink);
2829
      if (lastComparison != 0) {
2887
      if (lastComparison != 0) {
2830
        return lastComparison;
2888
        return lastComparison;
2831
      }
2889
      }
2832
    }
2890
    }
-
 
2891
    lastComparison = Boolean.valueOf(isSetPreferredInsurer()).compareTo(typedOther.isSetPreferredInsurer());
-
 
2892
    if (lastComparison != 0) {
-
 
2893
      return lastComparison;
-
 
2894
    }
-
 
2895
    if (isSetPreferredInsurer()) {
-
 
2896
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.preferredInsurer, typedOther.preferredInsurer);
-
 
2897
      if (lastComparison != 0) {
-
 
2898
        return lastComparison;
-
 
2899
      }
-
 
2900
    }
2833
    return 0;
2901
    return 0;
2834
  }
2902
  }
2835
 
2903
 
2836
  public _Fields fieldForId(int fieldId) {
2904
  public _Fields fieldForId(int fieldId) {
2837
    return _Fields.findByThriftId(fieldId);
2905
    return _Fields.findByThriftId(fieldId);
Line 3155... Line 3223...
3155
            this.bestDealsDetailsLink = iprot.readString();
3223
            this.bestDealsDetailsLink = iprot.readString();
3156
          } else { 
3224
          } else { 
3157
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3225
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3158
          }
3226
          }
3159
          break;
3227
          break;
-
 
3228
        case 41: // PREFERRED_INSURER
-
 
3229
          if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
3230
            this.preferredInsurer = iprot.readI64();
-
 
3231
            setPreferredInsurerIsSet(true);
-
 
3232
          } else { 
-
 
3233
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
3234
          }
-
 
3235
          break;
3160
        default:
3236
        default:
3161
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3237
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3162
      }
3238
      }
3163
      iprot.readFieldEnd();
3239
      iprot.readFieldEnd();
3164
    }
3240
    }
Line 3345... Line 3421...
3345
    if (this.bestDealsDetailsLink != null) {
3421
    if (this.bestDealsDetailsLink != null) {
3346
      oprot.writeFieldBegin(BEST_DEALS_DETAILS_LINK_FIELD_DESC);
3422
      oprot.writeFieldBegin(BEST_DEALS_DETAILS_LINK_FIELD_DESC);
3347
      oprot.writeString(this.bestDealsDetailsLink);
3423
      oprot.writeString(this.bestDealsDetailsLink);
3348
      oprot.writeFieldEnd();
3424
      oprot.writeFieldEnd();
3349
    }
3425
    }
-
 
3426
    oprot.writeFieldBegin(PREFERRED_INSURER_FIELD_DESC);
-
 
3427
    oprot.writeI64(this.preferredInsurer);
-
 
3428
    oprot.writeFieldEnd();
3350
    oprot.writeFieldStop();
3429
    oprot.writeFieldStop();
3351
    oprot.writeStructEnd();
3430
    oprot.writeStructEnd();
3352
  }
3431
  }
3353
 
3432
 
3354
  @Override
3433
  @Override
Line 3589... Line 3668...
3589
      sb.append("null");
3668
      sb.append("null");
3590
    } else {
3669
    } else {
3591
      sb.append(this.bestDealsDetailsLink);
3670
      sb.append(this.bestDealsDetailsLink);
3592
    }
3671
    }
3593
    first = false;
3672
    first = false;
-
 
3673
    if (!first) sb.append(", ");
-
 
3674
    sb.append("preferredInsurer:");
-
 
3675
    sb.append(this.preferredInsurer);
-
 
3676
    first = false;
3594
    sb.append(")");
3677
    sb.append(")");
3595
    return sb.toString();
3678
    return sb.toString();
3596
  }
3679
  }
3597
 
3680
 
3598
  public void validate() throws org.apache.thrift.TException {
3681
  public void validate() throws org.apache.thrift.TException {