Subversion Repositories SmartDukaan

Rev

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

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