Subversion Repositories SmartDukaan

Rev

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

Rev 2808 Rev 3089
Line 55... Line 55...
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
  private static final TField HOTSPOT_CATEGORY_FIELD_DESC = new TField("hotspotCategory", TType.STRING, (short)30);
59
  private static final TField RISKY_FIELD_DESC = new TField("risky", TType.BOOL, (short)31);
59
  private static final TField RISKY_FIELD_DESC = new TField("risky", TType.BOOL, (short)31);
60
  private static final TField SIMILARITY_INDEX_FIELD_DESC = new TField("similarityIndex", TType.I64, (short)32);
-
 
61
 
60
 
62
  private long id;
61
  private long id;
63
  private String productGroup;
62
  private String productGroup;
64
  private String brand;
63
  private String brand;
65
  private String modelNumber;
64
  private String modelNumber;
Line 88... Line 87...
88
  private boolean defaultForEntity;
87
  private boolean defaultForEntity;
89
  private long updatedOn;
88
  private long updatedOn;
90
  private long bestSellingRank;
89
  private long bestSellingRank;
91
  private String hotspotCategory;
90
  private String hotspotCategory;
92
  private boolean risky;
91
  private boolean risky;
93
  private long similarityIndex;
-
 
94
 
92
 
95
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
93
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
96
  public enum _Fields implements TFieldIdEnum {
94
  public enum _Fields implements TFieldIdEnum {
97
    ID((short)1, "id"),
95
    ID((short)1, "id"),
98
    PRODUCT_GROUP((short)2, "productGroup"),
96
    PRODUCT_GROUP((short)2, "productGroup"),
Line 126... Line 124...
126
    DEALER_PRICE((short)26, "dealerPrice"),
124
    DEALER_PRICE((short)26, "dealerPrice"),
127
    DEFAULT_FOR_ENTITY((short)27, "defaultForEntity"),
125
    DEFAULT_FOR_ENTITY((short)27, "defaultForEntity"),
128
    UPDATED_ON((short)28, "updatedOn"),
126
    UPDATED_ON((short)28, "updatedOn"),
129
    BEST_SELLING_RANK((short)29, "bestSellingRank"),
127
    BEST_SELLING_RANK((short)29, "bestSellingRank"),
130
    HOTSPOT_CATEGORY((short)30, "hotspotCategory"),
128
    HOTSPOT_CATEGORY((short)30, "hotspotCategory"),
131
    RISKY((short)31, "risky"),
129
    RISKY((short)31, "risky");
132
    SIMILARITY_INDEX((short)32, "similarityIndex");
-
 
133
 
130
 
134
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
131
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
135
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
132
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
136
 
133
 
137
    static {
134
    static {
Line 199... Line 196...
199
  private static final int __DEALERPRICE_ISSET_ID = 13;
196
  private static final int __DEALERPRICE_ISSET_ID = 13;
200
  private static final int __DEFAULTFORENTITY_ISSET_ID = 14;
197
  private static final int __DEFAULTFORENTITY_ISSET_ID = 14;
201
  private static final int __UPDATEDON_ISSET_ID = 15;
198
  private static final int __UPDATEDON_ISSET_ID = 15;
202
  private static final int __BESTSELLINGRANK_ISSET_ID = 16;
199
  private static final int __BESTSELLINGRANK_ISSET_ID = 16;
203
  private static final int __RISKY_ISSET_ID = 17;
200
  private static final int __RISKY_ISSET_ID = 17;
204
  private static final int __SIMILARITYINDEX_ISSET_ID = 18;
-
 
205
  private BitSet __isset_bit_vector = new BitSet(19);
201
  private BitSet __isset_bit_vector = new BitSet(18);
206
 
202
 
207
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
203
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
208
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
204
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
209
        new FieldValueMetaData(TType.I64)));
205
        new FieldValueMetaData(TType.I64)));
210
    put(_Fields.PRODUCT_GROUP, new FieldMetaData("productGroup", TFieldRequirementType.DEFAULT, 
206
    put(_Fields.PRODUCT_GROUP, new FieldMetaData("productGroup", TFieldRequirementType.DEFAULT, 
Line 267... Line 263...
267
        new FieldValueMetaData(TType.I64)));
263
        new FieldValueMetaData(TType.I64)));
268
    put(_Fields.HOTSPOT_CATEGORY, new FieldMetaData("hotspotCategory", TFieldRequirementType.DEFAULT, 
264
    put(_Fields.HOTSPOT_CATEGORY, new FieldMetaData("hotspotCategory", TFieldRequirementType.DEFAULT, 
269
        new FieldValueMetaData(TType.STRING)));
265
        new FieldValueMetaData(TType.STRING)));
270
    put(_Fields.RISKY, new FieldMetaData("risky", TFieldRequirementType.DEFAULT, 
266
    put(_Fields.RISKY, new FieldMetaData("risky", TFieldRequirementType.DEFAULT, 
271
        new FieldValueMetaData(TType.BOOL)));
267
        new FieldValueMetaData(TType.BOOL)));
272
    put(_Fields.SIMILARITY_INDEX, new FieldMetaData("similarityIndex", TFieldRequirementType.DEFAULT, 
-
 
273
        new FieldValueMetaData(TType.I64)));
-
 
274
  }});
268
  }});
275
 
269
 
276
  static {
270
  static {
277
    FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
271
    FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
278
  }
272
  }
Line 299... Line 293...
299
    Map<String,String> otherInfo,
293
    Map<String,String> otherInfo,
300
    String bestDealText,
294
    String bestDealText,
301
    boolean defaultForEntity,
295
    boolean defaultForEntity,
302
    long updatedOn,
296
    long updatedOn,
303
    String hotspotCategory,
297
    String hotspotCategory,
304
    boolean risky,
298
    boolean risky)
305
    long similarityIndex)
-
 
306
  {
299
  {
307
    this();
300
    this();
308
    this.id = id;
301
    this.id = id;
309
    setIdIsSet(true);
302
    setIdIsSet(true);
310
    this.productGroup = productGroup;
303
    this.productGroup = productGroup;
Line 332... Line 325...
332
    this.updatedOn = updatedOn;
325
    this.updatedOn = updatedOn;
333
    setUpdatedOnIsSet(true);
326
    setUpdatedOnIsSet(true);
334
    this.hotspotCategory = hotspotCategory;
327
    this.hotspotCategory = hotspotCategory;
335
    this.risky = risky;
328
    this.risky = risky;
336
    setRiskyIsSet(true);
329
    setRiskyIsSet(true);
337
    this.similarityIndex = similarityIndex;
-
 
338
    setSimilarityIndexIsSet(true);
-
 
339
  }
330
  }
340
 
331
 
341
  /**
332
  /**
342
   * Performs a deep copy on <i>other</i>.
333
   * Performs a deep copy on <i>other</i>.
343
   */
334
   */
Line 411... Line 402...
411
    this.bestSellingRank = other.bestSellingRank;
402
    this.bestSellingRank = other.bestSellingRank;
412
    if (other.isSetHotspotCategory()) {
403
    if (other.isSetHotspotCategory()) {
413
      this.hotspotCategory = other.hotspotCategory;
404
      this.hotspotCategory = other.hotspotCategory;
414
    }
405
    }
415
    this.risky = other.risky;
406
    this.risky = other.risky;
416
    this.similarityIndex = other.similarityIndex;
-
 
417
  }
407
  }
418
 
408
 
419
  public Item deepCopy() {
409
  public Item deepCopy() {
420
    return new Item(this);
410
    return new Item(this);
421
  }
411
  }
Line 1168... Line 1158...
1168
 
1158
 
1169
  public void setRiskyIsSet(boolean value) {
1159
  public void setRiskyIsSet(boolean value) {
1170
    __isset_bit_vector.set(__RISKY_ISSET_ID, value);
1160
    __isset_bit_vector.set(__RISKY_ISSET_ID, value);
1171
  }
1161
  }
1172
 
1162
 
1173
  public long getSimilarityIndex() {
-
 
1174
    return this.similarityIndex;
-
 
1175
  }
-
 
1176
 
-
 
1177
  public Item setSimilarityIndex(long similarityIndex) {
-
 
1178
    this.similarityIndex = similarityIndex;
-
 
1179
    setSimilarityIndexIsSet(true);
-
 
1180
    return this;
-
 
1181
  }
-
 
1182
 
-
 
1183
  public void unsetSimilarityIndex() {
-
 
1184
    __isset_bit_vector.clear(__SIMILARITYINDEX_ISSET_ID);
-
 
1185
  }
-
 
1186
 
-
 
1187
  /** Returns true if field similarityIndex is set (has been asigned a value) and false otherwise */
-
 
1188
  public boolean isSetSimilarityIndex() {
-
 
1189
    return __isset_bit_vector.get(__SIMILARITYINDEX_ISSET_ID);
-
 
1190
  }
-
 
1191
 
-
 
1192
  public void setSimilarityIndexIsSet(boolean value) {
-
 
1193
    __isset_bit_vector.set(__SIMILARITYINDEX_ISSET_ID, value);
-
 
1194
  }
-
 
1195
 
-
 
1196
  public void setFieldValue(_Fields field, Object value) {
1163
  public void setFieldValue(_Fields field, Object value) {
1197
    switch (field) {
1164
    switch (field) {
1198
    case ID:
1165
    case ID:
1199
      if (value == null) {
1166
      if (value == null) {
1200
        unsetId();
1167
        unsetId();
Line 1441... Line 1408...
1441
      } else {
1408
      } else {
1442
        setRisky((Boolean)value);
1409
        setRisky((Boolean)value);
1443
      }
1410
      }
1444
      break;
1411
      break;
1445
 
1412
 
1446
    case SIMILARITY_INDEX:
-
 
1447
      if (value == null) {
-
 
1448
        unsetSimilarityIndex();
-
 
1449
      } else {
-
 
1450
        setSimilarityIndex((Long)value);
-
 
1451
      }
-
 
1452
      break;
-
 
1453
 
-
 
1454
    }
1413
    }
1455
  }
1414
  }
1456
 
1415
 
1457
  public void setFieldValue(int fieldID, Object value) {
1416
  public void setFieldValue(int fieldID, Object value) {
1458
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1417
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
Line 1551... Line 1510...
1551
      return getHotspotCategory();
1510
      return getHotspotCategory();
1552
 
1511
 
1553
    case RISKY:
1512
    case RISKY:
1554
      return new Boolean(isRisky());
1513
      return new Boolean(isRisky());
1555
 
1514
 
1556
    case SIMILARITY_INDEX:
-
 
1557
      return new Long(getSimilarityIndex());
-
 
1558
 
-
 
1559
    }
1515
    }
1560
    throw new IllegalStateException();
1516
    throw new IllegalStateException();
1561
  }
1517
  }
1562
 
1518
 
1563
  public Object getFieldValue(int fieldId) {
1519
  public Object getFieldValue(int fieldId) {
Line 1627... Line 1583...
1627
      return isSetBestSellingRank();
1583
      return isSetBestSellingRank();
1628
    case HOTSPOT_CATEGORY:
1584
    case HOTSPOT_CATEGORY:
1629
      return isSetHotspotCategory();
1585
      return isSetHotspotCategory();
1630
    case RISKY:
1586
    case RISKY:
1631
      return isSetRisky();
1587
      return isSetRisky();
1632
    case SIMILARITY_INDEX:
-
 
1633
      return isSetSimilarityIndex();
-
 
1634
    }
1588
    }
1635
    throw new IllegalStateException();
1589
    throw new IllegalStateException();
1636
  }
1590
  }
1637
 
1591
 
1638
  public boolean isSet(int fieldID) {
1592
  public boolean isSet(int fieldID) {
Line 1929... Line 1883...
1929
        return false;
1883
        return false;
1930
      if (this.risky != that.risky)
1884
      if (this.risky != that.risky)
1931
        return false;
1885
        return false;
1932
    }
1886
    }
1933
 
1887
 
1934
    boolean this_present_similarityIndex = true;
-
 
1935
    boolean that_present_similarityIndex = true;
-
 
1936
    if (this_present_similarityIndex || that_present_similarityIndex) {
-
 
1937
      if (!(this_present_similarityIndex && that_present_similarityIndex))
-
 
1938
        return false;
-
 
1939
      if (this.similarityIndex != that.similarityIndex)
-
 
1940
        return false;
-
 
1941
    }
-
 
1942
 
-
 
1943
    return true;
1888
    return true;
1944
  }
1889
  }
1945
 
1890
 
1946
  @Override
1891
  @Override
1947
  public int hashCode() {
1892
  public int hashCode() {
Line 2208... Line 2153...
2208
              setRiskyIsSet(true);
2153
              setRiskyIsSet(true);
2209
            } else { 
2154
            } else { 
2210
              TProtocolUtil.skip(iprot, field.type);
2155
              TProtocolUtil.skip(iprot, field.type);
2211
            }
2156
            }
2212
            break;
2157
            break;
2213
          case SIMILARITY_INDEX:
-
 
2214
            if (field.type == TType.I64) {
-
 
2215
              this.similarityIndex = iprot.readI64();
-
 
2216
              setSimilarityIndexIsSet(true);
-
 
2217
            } else { 
-
 
2218
              TProtocolUtil.skip(iprot, field.type);
-
 
2219
            }
-
 
2220
            break;
-
 
2221
        }
2158
        }
2222
        iprot.readFieldEnd();
2159
        iprot.readFieldEnd();
2223
      }
2160
      }
2224
    }
2161
    }
2225
    iprot.readStructEnd();
2162
    iprot.readStructEnd();
Line 2375... Line 2312...
2375
      oprot.writeFieldEnd();
2312
      oprot.writeFieldEnd();
2376
    }
2313
    }
2377
    oprot.writeFieldBegin(RISKY_FIELD_DESC);
2314
    oprot.writeFieldBegin(RISKY_FIELD_DESC);
2378
    oprot.writeBool(this.risky);
2315
    oprot.writeBool(this.risky);
2379
    oprot.writeFieldEnd();
2316
    oprot.writeFieldEnd();
2380
    oprot.writeFieldBegin(SIMILARITY_INDEX_FIELD_DESC);
-
 
2381
    oprot.writeI64(this.similarityIndex);
-
 
2382
    oprot.writeFieldEnd();
-
 
2383
    oprot.writeFieldStop();
2317
    oprot.writeFieldStop();
2384
    oprot.writeStructEnd();
2318
    oprot.writeStructEnd();
2385
  }
2319
  }
2386
 
2320
 
2387
  @Override
2321
  @Override
Line 2590... Line 2524...
2590
    first = false;
2524
    first = false;
2591
    if (!first) sb.append(", ");
2525
    if (!first) sb.append(", ");
2592
    sb.append("risky:");
2526
    sb.append("risky:");
2593
    sb.append(this.risky);
2527
    sb.append(this.risky);
2594
    first = false;
2528
    first = false;
2595
    if (!first) sb.append(", ");
-
 
2596
    sb.append("similarityIndex:");
-
 
2597
    sb.append(this.similarityIndex);
-
 
2598
    first = false;
-
 
2599
    sb.append(")");
2529
    sb.append(")");
2600
    return sb.toString();
2530
    return sb.toString();
2601
  }
2531
  }
2602
 
2532
 
2603
  public void validate() throws TException {
2533
  public void validate() throws TException {