Subversion Repositories SmartDukaan

Rev

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

Rev 2064 Rev 2114
Line 53... Line 53...
53
  private static final TField BEST_DEAL_VALUE_FIELD_DESC = new TField("bestDealValue", TType.DOUBLE, (short)25);
53
  private static final TField BEST_DEAL_VALUE_FIELD_DESC = new TField("bestDealValue", TType.DOUBLE, (short)25);
54
  private static final TField DEALER_PRICE_FIELD_DESC = new TField("dealerPrice", TType.DOUBLE, (short)26);
54
  private static final TField DEALER_PRICE_FIELD_DESC = new TField("dealerPrice", TType.DOUBLE, (short)26);
55
  private static final TField DEFAULT_FOR_ENTITY_FIELD_DESC = new TField("defaultForEntity", TType.BOOL, (short)27);
55
  private static final TField DEFAULT_FOR_ENTITY_FIELD_DESC = new TField("defaultForEntity", TType.BOOL, (short)27);
56
  private static final TField UPDATED_ON_FIELD_DESC = new TField("updatedOn", TType.I64, (short)28);
56
  private static final TField UPDATED_ON_FIELD_DESC = new TField("updatedOn", TType.I64, (short)28);
57
  private static final TField BEST_SELLING_RANK_FIELD_DESC = new TField("bestSellingRank", TType.I64, (short)29);
57
  private static final TField BEST_SELLING_RANK_FIELD_DESC = new TField("bestSellingRank", TType.I64, (short)29);
-
 
58
  private static final TField HOTSPOT_CATEGORY_FIELD_DESC = new TField("hotspotCategory", TType.STRING, (short)30);
58
 
59
 
59
  private long id;
60
  private long id;
60
  private String productGroup;
61
  private String productGroup;
61
  private String brand;
62
  private String brand;
62
  private String modelNumber;
63
  private String modelNumber;
Line 83... Line 84...
83
  private double bestDealValue;
84
  private double bestDealValue;
84
  private double dealerPrice;
85
  private double dealerPrice;
85
  private boolean defaultForEntity;
86
  private boolean defaultForEntity;
86
  private long updatedOn;
87
  private long updatedOn;
87
  private long bestSellingRank;
88
  private long bestSellingRank;
-
 
89
  private String hotspotCategory;
88
 
90
 
89
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
91
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
90
  public enum _Fields implements TFieldIdEnum {
92
  public enum _Fields implements TFieldIdEnum {
91
    ID((short)1, "id"),
93
    ID((short)1, "id"),
92
    PRODUCT_GROUP((short)2, "productGroup"),
94
    PRODUCT_GROUP((short)2, "productGroup"),
Line 118... Line 120...
118
    BEST_DEAL_TEXT((short)24, "bestDealText"),
120
    BEST_DEAL_TEXT((short)24, "bestDealText"),
119
    BEST_DEAL_VALUE((short)25, "bestDealValue"),
121
    BEST_DEAL_VALUE((short)25, "bestDealValue"),
120
    DEALER_PRICE((short)26, "dealerPrice"),
122
    DEALER_PRICE((short)26, "dealerPrice"),
121
    DEFAULT_FOR_ENTITY((short)27, "defaultForEntity"),
123
    DEFAULT_FOR_ENTITY((short)27, "defaultForEntity"),
122
    UPDATED_ON((short)28, "updatedOn"),
124
    UPDATED_ON((short)28, "updatedOn"),
123
    BEST_SELLING_RANK((short)29, "bestSellingRank");
125
    BEST_SELLING_RANK((short)29, "bestSellingRank"),
-
 
126
    HOTSPOT_CATEGORY((short)30, "hotspotCategory");
124
 
127
 
125
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
128
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
126
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
129
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
127
 
130
 
128
    static {
131
    static {
Line 252... Line 255...
252
        new FieldValueMetaData(TType.BOOL)));
255
        new FieldValueMetaData(TType.BOOL)));
253
    put(_Fields.UPDATED_ON, new FieldMetaData("updatedOn", TFieldRequirementType.DEFAULT, 
256
    put(_Fields.UPDATED_ON, new FieldMetaData("updatedOn", TFieldRequirementType.DEFAULT, 
254
        new FieldValueMetaData(TType.I64)));
257
        new FieldValueMetaData(TType.I64)));
255
    put(_Fields.BEST_SELLING_RANK, new FieldMetaData("bestSellingRank", TFieldRequirementType.DEFAULT, 
258
    put(_Fields.BEST_SELLING_RANK, new FieldMetaData("bestSellingRank", TFieldRequirementType.DEFAULT, 
256
        new FieldValueMetaData(TType.I64)));
259
        new FieldValueMetaData(TType.I64)));
-
 
260
    put(_Fields.HOTSPOT_CATEGORY, new FieldMetaData("hotspotCategory", TFieldRequirementType.DEFAULT, 
-
 
261
        new FieldValueMetaData(TType.STRING)));
257
  }});
262
  }});
258
 
263
 
259
  static {
264
  static {
260
    FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
265
    FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
261
  }
266
  }
Line 290... Line 295...
290
    String bestDealText,
295
    String bestDealText,
291
    double bestDealValue,
296
    double bestDealValue,
292
    double dealerPrice,
297
    double dealerPrice,
293
    boolean defaultForEntity,
298
    boolean defaultForEntity,
294
    long updatedOn,
299
    long updatedOn,
295
    long bestSellingRank)
300
    long bestSellingRank,
-
 
301
    String hotspotCategory)
296
  {
302
  {
297
    this();
303
    this();
298
    this.id = id;
304
    this.id = id;
299
    setIdIsSet(true);
305
    setIdIsSet(true);
300
    this.productGroup = productGroup;
306
    this.productGroup = productGroup;
Line 339... Line 345...
339
    setDefaultForEntityIsSet(true);
345
    setDefaultForEntityIsSet(true);
340
    this.updatedOn = updatedOn;
346
    this.updatedOn = updatedOn;
341
    setUpdatedOnIsSet(true);
347
    setUpdatedOnIsSet(true);
342
    this.bestSellingRank = bestSellingRank;
348
    this.bestSellingRank = bestSellingRank;
343
    setBestSellingRankIsSet(true);
349
    setBestSellingRankIsSet(true);
-
 
350
    this.hotspotCategory = hotspotCategory;
344
  }
351
  }
345
 
352
 
346
  /**
353
  /**
347
   * Performs a deep copy on <i>other</i>.
354
   * Performs a deep copy on <i>other</i>.
348
   */
355
   */
Line 412... Line 419...
412
    this.bestDealValue = other.bestDealValue;
419
    this.bestDealValue = other.bestDealValue;
413
    this.dealerPrice = other.dealerPrice;
420
    this.dealerPrice = other.dealerPrice;
414
    this.defaultForEntity = other.defaultForEntity;
421
    this.defaultForEntity = other.defaultForEntity;
415
    this.updatedOn = other.updatedOn;
422
    this.updatedOn = other.updatedOn;
416
    this.bestSellingRank = other.bestSellingRank;
423
    this.bestSellingRank = other.bestSellingRank;
-
 
424
    if (other.isSetHotspotCategory()) {
-
 
425
      this.hotspotCategory = other.hotspotCategory;
-
 
426
    }
417
  }
427
  }
418
 
428
 
419
  public Item deepCopy() {
429
  public Item deepCopy() {
420
    return new Item(this);
430
    return new Item(this);
421
  }
431
  }
Line 1121... Line 1131...
1121
 
1131
 
1122
  public void setBestSellingRankIsSet(boolean value) {
1132
  public void setBestSellingRankIsSet(boolean value) {
1123
    __isset_bit_vector.set(__BESTSELLINGRANK_ISSET_ID, value);
1133
    __isset_bit_vector.set(__BESTSELLINGRANK_ISSET_ID, value);
1124
  }
1134
  }
1125
 
1135
 
-
 
1136
  public String getHotspotCategory() {
-
 
1137
    return this.hotspotCategory;
-
 
1138
  }
-
 
1139
 
-
 
1140
  public Item setHotspotCategory(String hotspotCategory) {
-
 
1141
    this.hotspotCategory = hotspotCategory;
-
 
1142
    return this;
-
 
1143
  }
-
 
1144
 
-
 
1145
  public void unsetHotspotCategory() {
-
 
1146
    this.hotspotCategory = null;
-
 
1147
  }
-
 
1148
 
-
 
1149
  /** Returns true if field hotspotCategory is set (has been asigned a value) and false otherwise */
-
 
1150
  public boolean isSetHotspotCategory() {
-
 
1151
    return this.hotspotCategory != null;
-
 
1152
  }
-
 
1153
 
-
 
1154
  public void setHotspotCategoryIsSet(boolean value) {
-
 
1155
    if (!value) {
-
 
1156
      this.hotspotCategory = null;
-
 
1157
    }
-
 
1158
  }
-
 
1159
 
1126
  public void setFieldValue(_Fields field, Object value) {
1160
  public void setFieldValue(_Fields field, Object value) {
1127
    switch (field) {
1161
    switch (field) {
1128
    case ID:
1162
    case ID:
1129
      if (value == null) {
1163
      if (value == null) {
1130
        unsetId();
1164
        unsetId();
Line 1355... Line 1389...
1355
      } else {
1389
      } else {
1356
        setBestSellingRank((Long)value);
1390
        setBestSellingRank((Long)value);
1357
      }
1391
      }
1358
      break;
1392
      break;
1359
 
1393
 
-
 
1394
    case HOTSPOT_CATEGORY:
-
 
1395
      if (value == null) {
-
 
1396
        unsetHotspotCategory();
-
 
1397
      } else {
-
 
1398
        setHotspotCategory((String)value);
-
 
1399
      }
-
 
1400
      break;
-
 
1401
 
1360
    }
1402
    }
1361
  }
1403
  }
1362
 
1404
 
1363
  public void setFieldValue(int fieldID, Object value) {
1405
  public void setFieldValue(int fieldID, Object value) {
1364
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1406
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
Line 1451... Line 1493...
1451
      return new Long(getUpdatedOn());
1493
      return new Long(getUpdatedOn());
1452
 
1494
 
1453
    case BEST_SELLING_RANK:
1495
    case BEST_SELLING_RANK:
1454
      return new Long(getBestSellingRank());
1496
      return new Long(getBestSellingRank());
1455
 
1497
 
-
 
1498
    case HOTSPOT_CATEGORY:
-
 
1499
      return getHotspotCategory();
-
 
1500
 
1456
    }
1501
    }
1457
    throw new IllegalStateException();
1502
    throw new IllegalStateException();
1458
  }
1503
  }
1459
 
1504
 
1460
  public Object getFieldValue(int fieldId) {
1505
  public Object getFieldValue(int fieldId) {
Line 1520... Line 1565...
1520
      return isSetDefaultForEntity();
1565
      return isSetDefaultForEntity();
1521
    case UPDATED_ON:
1566
    case UPDATED_ON:
1522
      return isSetUpdatedOn();
1567
      return isSetUpdatedOn();
1523
    case BEST_SELLING_RANK:
1568
    case BEST_SELLING_RANK:
1524
      return isSetBestSellingRank();
1569
      return isSetBestSellingRank();
-
 
1570
    case HOTSPOT_CATEGORY:
-
 
1571
      return isSetHotspotCategory();
1525
    }
1572
    }
1526
    throw new IllegalStateException();
1573
    throw new IllegalStateException();
1527
  }
1574
  }
1528
 
1575
 
1529
  public boolean isSet(int fieldID) {
1576
  public boolean isSet(int fieldID) {
Line 1802... Line 1849...
1802
        return false;
1849
        return false;
1803
      if (this.bestSellingRank != that.bestSellingRank)
1850
      if (this.bestSellingRank != that.bestSellingRank)
1804
        return false;
1851
        return false;
1805
    }
1852
    }
1806
 
1853
 
-
 
1854
    boolean this_present_hotspotCategory = true && this.isSetHotspotCategory();
-
 
1855
    boolean that_present_hotspotCategory = true && that.isSetHotspotCategory();
-
 
1856
    if (this_present_hotspotCategory || that_present_hotspotCategory) {
-
 
1857
      if (!(this_present_hotspotCategory && that_present_hotspotCategory))
-
 
1858
        return false;
-
 
1859
      if (!this.hotspotCategory.equals(that.hotspotCategory))
-
 
1860
        return false;
-
 
1861
    }
-
 
1862
 
1807
    return true;
1863
    return true;
1808
  }
1864
  }
1809
 
1865
 
1810
  @Override
1866
  @Override
1811
  public int hashCode() {
1867
  public int hashCode() {
Line 2057... Line 2113...
2057
              setBestSellingRankIsSet(true);
2113
              setBestSellingRankIsSet(true);
2058
            } else { 
2114
            } else { 
2059
              TProtocolUtil.skip(iprot, field.type);
2115
              TProtocolUtil.skip(iprot, field.type);
2060
            }
2116
            }
2061
            break;
2117
            break;
-
 
2118
          case HOTSPOT_CATEGORY:
-
 
2119
            if (field.type == TType.STRING) {
-
 
2120
              this.hotspotCategory = iprot.readString();
-
 
2121
            } else { 
-
 
2122
              TProtocolUtil.skip(iprot, field.type);
-
 
2123
            }
-
 
2124
            break;
2062
        }
2125
        }
2063
        iprot.readFieldEnd();
2126
        iprot.readFieldEnd();
2064
      }
2127
      }
2065
    }
2128
    }
2066
    iprot.readStructEnd();
2129
    iprot.readStructEnd();
Line 2188... Line 2251...
2188
    oprot.writeI64(this.updatedOn);
2251
    oprot.writeI64(this.updatedOn);
2189
    oprot.writeFieldEnd();
2252
    oprot.writeFieldEnd();
2190
    oprot.writeFieldBegin(BEST_SELLING_RANK_FIELD_DESC);
2253
    oprot.writeFieldBegin(BEST_SELLING_RANK_FIELD_DESC);
2191
    oprot.writeI64(this.bestSellingRank);
2254
    oprot.writeI64(this.bestSellingRank);
2192
    oprot.writeFieldEnd();
2255
    oprot.writeFieldEnd();
-
 
2256
    if (this.hotspotCategory != null) {
-
 
2257
      oprot.writeFieldBegin(HOTSPOT_CATEGORY_FIELD_DESC);
-
 
2258
      oprot.writeString(this.hotspotCategory);
-
 
2259
      oprot.writeFieldEnd();
-
 
2260
    }
2193
    oprot.writeFieldStop();
2261
    oprot.writeFieldStop();
2194
    oprot.writeStructEnd();
2262
    oprot.writeStructEnd();
2195
  }
2263
  }
2196
 
2264
 
2197
  @Override
2265
  @Override
Line 2368... Line 2436...
2368
    first = false;
2436
    first = false;
2369
    if (!first) sb.append(", ");
2437
    if (!first) sb.append(", ");
2370
    sb.append("bestSellingRank:");
2438
    sb.append("bestSellingRank:");
2371
    sb.append(this.bestSellingRank);
2439
    sb.append(this.bestSellingRank);
2372
    first = false;
2440
    first = false;
-
 
2441
    if (!first) sb.append(", ");
-
 
2442
    sb.append("hotspotCategory:");
-
 
2443
    if (this.hotspotCategory == null) {
-
 
2444
      sb.append("null");
-
 
2445
    } else {
-
 
2446
      sb.append(this.hotspotCategory);
-
 
2447
    }
-
 
2448
    first = false;
2373
    sb.append(")");
2449
    sb.append(")");
2374
    return sb.toString();
2450
    return sb.toString();
2375
  }
2451
  }
2376
 
2452
 
2377
  public void validate() throws TException {
2453
  public void validate() throws TException {