Subversion Repositories SmartDukaan

Rev

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

Rev 2128 Rev 2250
Line 54... Line 54...
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
  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
 
60
 
60
  private long id;
61
  private long id;
61
  private String productGroup;
62
  private String productGroup;
62
  private String brand;
63
  private String brand;
63
  private String modelNumber;
64
  private String modelNumber;
Line 85... Line 86...
85
  private double dealerPrice;
86
  private double dealerPrice;
86
  private boolean defaultForEntity;
87
  private boolean defaultForEntity;
87
  private long updatedOn;
88
  private long updatedOn;
88
  private long bestSellingRank;
89
  private long bestSellingRank;
89
  private String hotspotCategory;
90
  private String hotspotCategory;
-
 
91
  private boolean risky;
90
 
92
 
91
  /** 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. */
92
  public enum _Fields implements TFieldIdEnum {
94
  public enum _Fields implements TFieldIdEnum {
93
    ID((short)1, "id"),
95
    ID((short)1, "id"),
94
    PRODUCT_GROUP((short)2, "productGroup"),
96
    PRODUCT_GROUP((short)2, "productGroup"),
Line 121... Line 123...
121
    BEST_DEAL_VALUE((short)25, "bestDealValue"),
123
    BEST_DEAL_VALUE((short)25, "bestDealValue"),
122
    DEALER_PRICE((short)26, "dealerPrice"),
124
    DEALER_PRICE((short)26, "dealerPrice"),
123
    DEFAULT_FOR_ENTITY((short)27, "defaultForEntity"),
125
    DEFAULT_FOR_ENTITY((short)27, "defaultForEntity"),
124
    UPDATED_ON((short)28, "updatedOn"),
126
    UPDATED_ON((short)28, "updatedOn"),
125
    BEST_SELLING_RANK((short)29, "bestSellingRank"),
127
    BEST_SELLING_RANK((short)29, "bestSellingRank"),
126
    HOTSPOT_CATEGORY((short)30, "hotspotCategory");
128
    HOTSPOT_CATEGORY((short)30, "hotspotCategory"),
-
 
129
    RISKY((short)31, "risky");
127
 
130
 
128
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
131
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
129
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
132
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
130
 
133
 
131
    static {
134
    static {
Line 192... Line 195...
192
  private static final int __BESTDEALVALUE_ISSET_ID = 12;
195
  private static final int __BESTDEALVALUE_ISSET_ID = 12;
193
  private static final int __DEALERPRICE_ISSET_ID = 13;
196
  private static final int __DEALERPRICE_ISSET_ID = 13;
194
  private static final int __DEFAULTFORENTITY_ISSET_ID = 14;
197
  private static final int __DEFAULTFORENTITY_ISSET_ID = 14;
195
  private static final int __UPDATEDON_ISSET_ID = 15;
198
  private static final int __UPDATEDON_ISSET_ID = 15;
196
  private static final int __BESTSELLINGRANK_ISSET_ID = 16;
199
  private static final int __BESTSELLINGRANK_ISSET_ID = 16;
-
 
200
  private static final int __RISKY_ISSET_ID = 17;
197
  private BitSet __isset_bit_vector = new BitSet(17);
201
  private BitSet __isset_bit_vector = new BitSet(18);
198
 
202
 
199
  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) {{
200
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
204
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
201
        new FieldValueMetaData(TType.I64)));
205
        new FieldValueMetaData(TType.I64)));
202
    put(_Fields.PRODUCT_GROUP, new FieldMetaData("productGroup", TFieldRequirementType.DEFAULT, 
206
    put(_Fields.PRODUCT_GROUP, new FieldMetaData("productGroup", TFieldRequirementType.DEFAULT, 
Line 257... Line 261...
257
        new FieldValueMetaData(TType.I64)));
261
        new FieldValueMetaData(TType.I64)));
258
    put(_Fields.BEST_SELLING_RANK, new FieldMetaData("bestSellingRank", TFieldRequirementType.OPTIONAL, 
262
    put(_Fields.BEST_SELLING_RANK, new FieldMetaData("bestSellingRank", TFieldRequirementType.OPTIONAL, 
259
        new FieldValueMetaData(TType.I64)));
263
        new FieldValueMetaData(TType.I64)));
260
    put(_Fields.HOTSPOT_CATEGORY, new FieldMetaData("hotspotCategory", TFieldRequirementType.DEFAULT, 
264
    put(_Fields.HOTSPOT_CATEGORY, new FieldMetaData("hotspotCategory", TFieldRequirementType.DEFAULT, 
261
        new FieldValueMetaData(TType.STRING)));
265
        new FieldValueMetaData(TType.STRING)));
-
 
266
    put(_Fields.RISKY, new FieldMetaData("risky", TFieldRequirementType.DEFAULT, 
-
 
267
        new FieldValueMetaData(TType.BOOL)));
262
  }});
268
  }});
263
 
269
 
264
  static {
270
  static {
265
    FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
271
    FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
266
  }
272
  }
Line 291... Line 297...
291
    Map<String,String> otherInfo,
297
    Map<String,String> otherInfo,
292
    String bestDealText,
298
    String bestDealText,
293
    double dealerPrice,
299
    double dealerPrice,
294
    boolean defaultForEntity,
300
    boolean defaultForEntity,
295
    long updatedOn,
301
    long updatedOn,
296
    String hotspotCategory)
302
    String hotspotCategory,
-
 
303
    boolean risky)
297
  {
304
  {
298
    this();
305
    this();
299
    this.id = id;
306
    this.id = id;
300
    setIdIsSet(true);
307
    setIdIsSet(true);
301
    this.productGroup = productGroup;
308
    this.productGroup = productGroup;
Line 331... Line 338...
331
    this.defaultForEntity = defaultForEntity;
338
    this.defaultForEntity = defaultForEntity;
332
    setDefaultForEntityIsSet(true);
339
    setDefaultForEntityIsSet(true);
333
    this.updatedOn = updatedOn;
340
    this.updatedOn = updatedOn;
334
    setUpdatedOnIsSet(true);
341
    setUpdatedOnIsSet(true);
335
    this.hotspotCategory = hotspotCategory;
342
    this.hotspotCategory = hotspotCategory;
-
 
343
    this.risky = risky;
-
 
344
    setRiskyIsSet(true);
336
  }
345
  }
337
 
346
 
338
  /**
347
  /**
339
   * Performs a deep copy on <i>other</i>.
348
   * Performs a deep copy on <i>other</i>.
340
   */
349
   */
Line 407... Line 416...
407
    this.updatedOn = other.updatedOn;
416
    this.updatedOn = other.updatedOn;
408
    this.bestSellingRank = other.bestSellingRank;
417
    this.bestSellingRank = other.bestSellingRank;
409
    if (other.isSetHotspotCategory()) {
418
    if (other.isSetHotspotCategory()) {
410
      this.hotspotCategory = other.hotspotCategory;
419
      this.hotspotCategory = other.hotspotCategory;
411
    }
420
    }
-
 
421
    this.risky = other.risky;
412
  }
422
  }
413
 
423
 
414
  public Item deepCopy() {
424
  public Item deepCopy() {
415
    return new Item(this);
425
    return new Item(this);
416
  }
426
  }
Line 1140... Line 1150...
1140
    if (!value) {
1150
    if (!value) {
1141
      this.hotspotCategory = null;
1151
      this.hotspotCategory = null;
1142
    }
1152
    }
1143
  }
1153
  }
1144
 
1154
 
-
 
1155
  public boolean isRisky() {
-
 
1156
    return this.risky;
-
 
1157
  }
-
 
1158
 
-
 
1159
  public Item setRisky(boolean risky) {
-
 
1160
    this.risky = risky;
-
 
1161
    setRiskyIsSet(true);
-
 
1162
    return this;
-
 
1163
  }
-
 
1164
 
-
 
1165
  public void unsetRisky() {
-
 
1166
    __isset_bit_vector.clear(__RISKY_ISSET_ID);
-
 
1167
  }
-
 
1168
 
-
 
1169
  /** Returns true if field risky is set (has been asigned a value) and false otherwise */
-
 
1170
  public boolean isSetRisky() {
-
 
1171
    return __isset_bit_vector.get(__RISKY_ISSET_ID);
-
 
1172
  }
-
 
1173
 
-
 
1174
  public void setRiskyIsSet(boolean value) {
-
 
1175
    __isset_bit_vector.set(__RISKY_ISSET_ID, value);
-
 
1176
  }
-
 
1177
 
1145
  public void setFieldValue(_Fields field, Object value) {
1178
  public void setFieldValue(_Fields field, Object value) {
1146
    switch (field) {
1179
    switch (field) {
1147
    case ID:
1180
    case ID:
1148
      if (value == null) {
1181
      if (value == null) {
1149
        unsetId();
1182
        unsetId();
Line 1382... Line 1415...
1382
      } else {
1415
      } else {
1383
        setHotspotCategory((String)value);
1416
        setHotspotCategory((String)value);
1384
      }
1417
      }
1385
      break;
1418
      break;
1386
 
1419
 
-
 
1420
    case RISKY:
-
 
1421
      if (value == null) {
-
 
1422
        unsetRisky();
-
 
1423
      } else {
-
 
1424
        setRisky((Boolean)value);
-
 
1425
      }
-
 
1426
      break;
-
 
1427
 
1387
    }
1428
    }
1388
  }
1429
  }
1389
 
1430
 
1390
  public void setFieldValue(int fieldID, Object value) {
1431
  public void setFieldValue(int fieldID, Object value) {
1391
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1432
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
Line 1481... Line 1522...
1481
      return new Long(getBestSellingRank());
1522
      return new Long(getBestSellingRank());
1482
 
1523
 
1483
    case HOTSPOT_CATEGORY:
1524
    case HOTSPOT_CATEGORY:
1484
      return getHotspotCategory();
1525
      return getHotspotCategory();
1485
 
1526
 
-
 
1527
    case RISKY:
-
 
1528
      return new Boolean(isRisky());
-
 
1529
 
1486
    }
1530
    }
1487
    throw new IllegalStateException();
1531
    throw new IllegalStateException();
1488
  }
1532
  }
1489
 
1533
 
1490
  public Object getFieldValue(int fieldId) {
1534
  public Object getFieldValue(int fieldId) {
Line 1552... Line 1596...
1552
      return isSetUpdatedOn();
1596
      return isSetUpdatedOn();
1553
    case BEST_SELLING_RANK:
1597
    case BEST_SELLING_RANK:
1554
      return isSetBestSellingRank();
1598
      return isSetBestSellingRank();
1555
    case HOTSPOT_CATEGORY:
1599
    case HOTSPOT_CATEGORY:
1556
      return isSetHotspotCategory();
1600
      return isSetHotspotCategory();
-
 
1601
    case RISKY:
-
 
1602
      return isSetRisky();
1557
    }
1603
    }
1558
    throw new IllegalStateException();
1604
    throw new IllegalStateException();
1559
  }
1605
  }
1560
 
1606
 
1561
  public boolean isSet(int fieldID) {
1607
  public boolean isSet(int fieldID) {
Line 1843... Line 1889...
1843
        return false;
1889
        return false;
1844
      if (!this.hotspotCategory.equals(that.hotspotCategory))
1890
      if (!this.hotspotCategory.equals(that.hotspotCategory))
1845
        return false;
1891
        return false;
1846
    }
1892
    }
1847
 
1893
 
-
 
1894
    boolean this_present_risky = true;
-
 
1895
    boolean that_present_risky = true;
-
 
1896
    if (this_present_risky || that_present_risky) {
-
 
1897
      if (!(this_present_risky && that_present_risky))
-
 
1898
        return false;
-
 
1899
      if (this.risky != that.risky)
-
 
1900
        return false;
-
 
1901
    }
-
 
1902
 
1848
    return true;
1903
    return true;
1849
  }
1904
  }
1850
 
1905
 
1851
  @Override
1906
  @Override
1852
  public int hashCode() {
1907
  public int hashCode() {
Line 2105... Line 2160...
2105
              this.hotspotCategory = iprot.readString();
2160
              this.hotspotCategory = iprot.readString();
2106
            } else { 
2161
            } else { 
2107
              TProtocolUtil.skip(iprot, field.type);
2162
              TProtocolUtil.skip(iprot, field.type);
2108
            }
2163
            }
2109
            break;
2164
            break;
-
 
2165
          case RISKY:
-
 
2166
            if (field.type == TType.BOOL) {
-
 
2167
              this.risky = iprot.readBool();
-
 
2168
              setRiskyIsSet(true);
-
 
2169
            } else { 
-
 
2170
              TProtocolUtil.skip(iprot, field.type);
-
 
2171
            }
-
 
2172
            break;
2110
        }
2173
        }
2111
        iprot.readFieldEnd();
2174
        iprot.readFieldEnd();
2112
      }
2175
      }
2113
    }
2176
    }
2114
    iprot.readStructEnd();
2177
    iprot.readStructEnd();
Line 2251... Line 2314...
2251
    if (this.hotspotCategory != null) {
2314
    if (this.hotspotCategory != null) {
2252
      oprot.writeFieldBegin(HOTSPOT_CATEGORY_FIELD_DESC);
2315
      oprot.writeFieldBegin(HOTSPOT_CATEGORY_FIELD_DESC);
2253
      oprot.writeString(this.hotspotCategory);
2316
      oprot.writeString(this.hotspotCategory);
2254
      oprot.writeFieldEnd();
2317
      oprot.writeFieldEnd();
2255
    }
2318
    }
-
 
2319
    oprot.writeFieldBegin(RISKY_FIELD_DESC);
-
 
2320
    oprot.writeBool(this.risky);
-
 
2321
    oprot.writeFieldEnd();
2256
    oprot.writeFieldStop();
2322
    oprot.writeFieldStop();
2257
    oprot.writeStructEnd();
2323
    oprot.writeStructEnd();
2258
  }
2324
  }
2259
 
2325
 
2260
  @Override
2326
  @Override
Line 2449... Line 2515...
2449
      sb.append("null");
2515
      sb.append("null");
2450
    } else {
2516
    } else {
2451
      sb.append(this.hotspotCategory);
2517
      sb.append(this.hotspotCategory);
2452
    }
2518
    }
2453
    first = false;
2519
    first = false;
-
 
2520
    if (!first) sb.append(", ");
-
 
2521
    sb.append("risky:");
-
 
2522
    sb.append(this.risky);
-
 
2523
    first = false;
2454
    sb.append(")");
2524
    sb.append(")");
2455
    return sb.toString();
2525
    return sb.toString();
2456
  }
2526
  }
2457
 
2527
 
2458
  public void validate() throws TException {
2528
  public void validate() throws TException {