Subversion Repositories SmartDukaan

Rev

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

Rev 2034 Rev 2064
Line 52... Line 52...
52
  private static final TField BEST_DEAL_TEXT_FIELD_DESC = new TField("bestDealText", TType.STRING, (short)24);
52
  private static final TField BEST_DEAL_TEXT_FIELD_DESC = new TField("bestDealText", TType.STRING, (short)24);
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
 
58
 
58
  private long id;
59
  private long id;
59
  private String productGroup;
60
  private String productGroup;
60
  private String brand;
61
  private String brand;
61
  private String modelNumber;
62
  private String modelNumber;
Line 81... Line 82...
81
  private String bestDealText;
82
  private String bestDealText;
82
  private double bestDealValue;
83
  private double bestDealValue;
83
  private double dealerPrice;
84
  private double dealerPrice;
84
  private boolean defaultForEntity;
85
  private boolean defaultForEntity;
85
  private long updatedOn;
86
  private long updatedOn;
-
 
87
  private long bestSellingRank;
86
 
88
 
87
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
89
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
88
  public enum _Fields implements TFieldIdEnum {
90
  public enum _Fields implements TFieldIdEnum {
89
    ID((short)1, "id"),
91
    ID((short)1, "id"),
90
    PRODUCT_GROUP((short)2, "productGroup"),
92
    PRODUCT_GROUP((short)2, "productGroup"),
Line 115... Line 117...
115
    OTHER_INFO((short)23, "otherInfo"),
117
    OTHER_INFO((short)23, "otherInfo"),
116
    BEST_DEAL_TEXT((short)24, "bestDealText"),
118
    BEST_DEAL_TEXT((short)24, "bestDealText"),
117
    BEST_DEAL_VALUE((short)25, "bestDealValue"),
119
    BEST_DEAL_VALUE((short)25, "bestDealValue"),
118
    DEALER_PRICE((short)26, "dealerPrice"),
120
    DEALER_PRICE((short)26, "dealerPrice"),
119
    DEFAULT_FOR_ENTITY((short)27, "defaultForEntity"),
121
    DEFAULT_FOR_ENTITY((short)27, "defaultForEntity"),
120
    UPDATED_ON((short)28, "updatedOn");
122
    UPDATED_ON((short)28, "updatedOn"),
-
 
123
    BEST_SELLING_RANK((short)29, "bestSellingRank");
121
 
124
 
122
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
125
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
123
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
126
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
124
 
127
 
125
    static {
128
    static {
Line 185... Line 188...
185
  private static final int __RETIREDATE_ISSET_ID = 11;
188
  private static final int __RETIREDATE_ISSET_ID = 11;
186
  private static final int __BESTDEALVALUE_ISSET_ID = 12;
189
  private static final int __BESTDEALVALUE_ISSET_ID = 12;
187
  private static final int __DEALERPRICE_ISSET_ID = 13;
190
  private static final int __DEALERPRICE_ISSET_ID = 13;
188
  private static final int __DEFAULTFORENTITY_ISSET_ID = 14;
191
  private static final int __DEFAULTFORENTITY_ISSET_ID = 14;
189
  private static final int __UPDATEDON_ISSET_ID = 15;
192
  private static final int __UPDATEDON_ISSET_ID = 15;
-
 
193
  private static final int __BESTSELLINGRANK_ISSET_ID = 16;
190
  private BitSet __isset_bit_vector = new BitSet(16);
194
  private BitSet __isset_bit_vector = new BitSet(17);
191
 
195
 
192
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
196
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
193
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
197
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
194
        new FieldValueMetaData(TType.I64)));
198
        new FieldValueMetaData(TType.I64)));
195
    put(_Fields.PRODUCT_GROUP, new FieldMetaData("productGroup", TFieldRequirementType.DEFAULT, 
199
    put(_Fields.PRODUCT_GROUP, new FieldMetaData("productGroup", TFieldRequirementType.DEFAULT, 
Line 246... Line 250...
246
        new FieldValueMetaData(TType.DOUBLE)));
250
        new FieldValueMetaData(TType.DOUBLE)));
247
    put(_Fields.DEFAULT_FOR_ENTITY, new FieldMetaData("defaultForEntity", TFieldRequirementType.DEFAULT, 
251
    put(_Fields.DEFAULT_FOR_ENTITY, new FieldMetaData("defaultForEntity", TFieldRequirementType.DEFAULT, 
248
        new FieldValueMetaData(TType.BOOL)));
252
        new FieldValueMetaData(TType.BOOL)));
249
    put(_Fields.UPDATED_ON, new FieldMetaData("updatedOn", TFieldRequirementType.DEFAULT, 
253
    put(_Fields.UPDATED_ON, new FieldMetaData("updatedOn", TFieldRequirementType.DEFAULT, 
250
        new FieldValueMetaData(TType.I64)));
254
        new FieldValueMetaData(TType.I64)));
-
 
255
    put(_Fields.BEST_SELLING_RANK, new FieldMetaData("bestSellingRank", TFieldRequirementType.DEFAULT, 
-
 
256
        new FieldValueMetaData(TType.I64)));
251
  }});
257
  }});
252
 
258
 
253
  static {
259
  static {
254
    FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
260
    FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
255
  }
261
  }
Line 283... Line 289...
283
    Map<String,String> otherInfo,
289
    Map<String,String> otherInfo,
284
    String bestDealText,
290
    String bestDealText,
285
    double bestDealValue,
291
    double bestDealValue,
286
    double dealerPrice,
292
    double dealerPrice,
287
    boolean defaultForEntity,
293
    boolean defaultForEntity,
288
    long updatedOn)
294
    long updatedOn,
-
 
295
    long bestSellingRank)
289
  {
296
  {
290
    this();
297
    this();
291
    this.id = id;
298
    this.id = id;
292
    setIdIsSet(true);
299
    setIdIsSet(true);
293
    this.productGroup = productGroup;
300
    this.productGroup = productGroup;
Line 330... Line 337...
330
    setDealerPriceIsSet(true);
337
    setDealerPriceIsSet(true);
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);
-
 
342
    this.bestSellingRank = bestSellingRank;
-
 
343
    setBestSellingRankIsSet(true);
335
  }
344
  }
336
 
345
 
337
  /**
346
  /**
338
   * Performs a deep copy on <i>other</i>.
347
   * Performs a deep copy on <i>other</i>.
339
   */
348
   */
Line 402... Line 411...
402
    }
411
    }
403
    this.bestDealValue = other.bestDealValue;
412
    this.bestDealValue = other.bestDealValue;
404
    this.dealerPrice = other.dealerPrice;
413
    this.dealerPrice = other.dealerPrice;
405
    this.defaultForEntity = other.defaultForEntity;
414
    this.defaultForEntity = other.defaultForEntity;
406
    this.updatedOn = other.updatedOn;
415
    this.updatedOn = other.updatedOn;
-
 
416
    this.bestSellingRank = other.bestSellingRank;
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 1088... Line 1098...
1088
 
1098
 
1089
  public void setUpdatedOnIsSet(boolean value) {
1099
  public void setUpdatedOnIsSet(boolean value) {
1090
    __isset_bit_vector.set(__UPDATEDON_ISSET_ID, value);
1100
    __isset_bit_vector.set(__UPDATEDON_ISSET_ID, value);
1091
  }
1101
  }
1092
 
1102
 
-
 
1103
  public long getBestSellingRank() {
-
 
1104
    return this.bestSellingRank;
-
 
1105
  }
-
 
1106
 
-
 
1107
  public Item setBestSellingRank(long bestSellingRank) {
-
 
1108
    this.bestSellingRank = bestSellingRank;
-
 
1109
    setBestSellingRankIsSet(true);
-
 
1110
    return this;
-
 
1111
  }
-
 
1112
 
-
 
1113
  public void unsetBestSellingRank() {
-
 
1114
    __isset_bit_vector.clear(__BESTSELLINGRANK_ISSET_ID);
-
 
1115
  }
-
 
1116
 
-
 
1117
  /** Returns true if field bestSellingRank is set (has been asigned a value) and false otherwise */
-
 
1118
  public boolean isSetBestSellingRank() {
-
 
1119
    return __isset_bit_vector.get(__BESTSELLINGRANK_ISSET_ID);
-
 
1120
  }
-
 
1121
 
-
 
1122
  public void setBestSellingRankIsSet(boolean value) {
-
 
1123
    __isset_bit_vector.set(__BESTSELLINGRANK_ISSET_ID, value);
-
 
1124
  }
-
 
1125
 
1093
  public void setFieldValue(_Fields field, Object value) {
1126
  public void setFieldValue(_Fields field, Object value) {
1094
    switch (field) {
1127
    switch (field) {
1095
    case ID:
1128
    case ID:
1096
      if (value == null) {
1129
      if (value == null) {
1097
        unsetId();
1130
        unsetId();
Line 1314... Line 1347...
1314
      } else {
1347
      } else {
1315
        setUpdatedOn((Long)value);
1348
        setUpdatedOn((Long)value);
1316
      }
1349
      }
1317
      break;
1350
      break;
1318
 
1351
 
-
 
1352
    case BEST_SELLING_RANK:
-
 
1353
      if (value == null) {
-
 
1354
        unsetBestSellingRank();
-
 
1355
      } else {
-
 
1356
        setBestSellingRank((Long)value);
-
 
1357
      }
-
 
1358
      break;
-
 
1359
 
1319
    }
1360
    }
1320
  }
1361
  }
1321
 
1362
 
1322
  public void setFieldValue(int fieldID, Object value) {
1363
  public void setFieldValue(int fieldID, Object value) {
1323
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1364
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
Line 1407... Line 1448...
1407
      return new Boolean(isDefaultForEntity());
1448
      return new Boolean(isDefaultForEntity());
1408
 
1449
 
1409
    case UPDATED_ON:
1450
    case UPDATED_ON:
1410
      return new Long(getUpdatedOn());
1451
      return new Long(getUpdatedOn());
1411
 
1452
 
-
 
1453
    case BEST_SELLING_RANK:
-
 
1454
      return new Long(getBestSellingRank());
-
 
1455
 
1412
    }
1456
    }
1413
    throw new IllegalStateException();
1457
    throw new IllegalStateException();
1414
  }
1458
  }
1415
 
1459
 
1416
  public Object getFieldValue(int fieldId) {
1460
  public Object getFieldValue(int fieldId) {
Line 1474... Line 1518...
1474
      return isSetDealerPrice();
1518
      return isSetDealerPrice();
1475
    case DEFAULT_FOR_ENTITY:
1519
    case DEFAULT_FOR_ENTITY:
1476
      return isSetDefaultForEntity();
1520
      return isSetDefaultForEntity();
1477
    case UPDATED_ON:
1521
    case UPDATED_ON:
1478
      return isSetUpdatedOn();
1522
      return isSetUpdatedOn();
-
 
1523
    case BEST_SELLING_RANK:
-
 
1524
      return isSetBestSellingRank();
1479
    }
1525
    }
1480
    throw new IllegalStateException();
1526
    throw new IllegalStateException();
1481
  }
1527
  }
1482
 
1528
 
1483
  public boolean isSet(int fieldID) {
1529
  public boolean isSet(int fieldID) {
Line 1747... Line 1793...
1747
        return false;
1793
        return false;
1748
      if (this.updatedOn != that.updatedOn)
1794
      if (this.updatedOn != that.updatedOn)
1749
        return false;
1795
        return false;
1750
    }
1796
    }
1751
 
1797
 
-
 
1798
    boolean this_present_bestSellingRank = true;
-
 
1799
    boolean that_present_bestSellingRank = true;
-
 
1800
    if (this_present_bestSellingRank || that_present_bestSellingRank) {
-
 
1801
      if (!(this_present_bestSellingRank && that_present_bestSellingRank))
-
 
1802
        return false;
-
 
1803
      if (this.bestSellingRank != that.bestSellingRank)
-
 
1804
        return false;
-
 
1805
    }
-
 
1806
 
1752
    return true;
1807
    return true;
1753
  }
1808
  }
1754
 
1809
 
1755
  @Override
1810
  @Override
1756
  public int hashCode() {
1811
  public int hashCode() {
Line 1994... Line 2049...
1994
              setUpdatedOnIsSet(true);
2049
              setUpdatedOnIsSet(true);
1995
            } else { 
2050
            } else { 
1996
              TProtocolUtil.skip(iprot, field.type);
2051
              TProtocolUtil.skip(iprot, field.type);
1997
            }
2052
            }
1998
            break;
2053
            break;
-
 
2054
          case BEST_SELLING_RANK:
-
 
2055
            if (field.type == TType.I64) {
-
 
2056
              this.bestSellingRank = iprot.readI64();
-
 
2057
              setBestSellingRankIsSet(true);
-
 
2058
            } else { 
-
 
2059
              TProtocolUtil.skip(iprot, field.type);
-
 
2060
            }
-
 
2061
            break;
1999
        }
2062
        }
2000
        iprot.readFieldEnd();
2063
        iprot.readFieldEnd();
2001
      }
2064
      }
2002
    }
2065
    }
2003
    iprot.readStructEnd();
2066
    iprot.readStructEnd();
Line 2122... Line 2185...
2122
    oprot.writeBool(this.defaultForEntity);
2185
    oprot.writeBool(this.defaultForEntity);
2123
    oprot.writeFieldEnd();
2186
    oprot.writeFieldEnd();
2124
    oprot.writeFieldBegin(UPDATED_ON_FIELD_DESC);
2187
    oprot.writeFieldBegin(UPDATED_ON_FIELD_DESC);
2125
    oprot.writeI64(this.updatedOn);
2188
    oprot.writeI64(this.updatedOn);
2126
    oprot.writeFieldEnd();
2189
    oprot.writeFieldEnd();
-
 
2190
    oprot.writeFieldBegin(BEST_SELLING_RANK_FIELD_DESC);
-
 
2191
    oprot.writeI64(this.bestSellingRank);
-
 
2192
    oprot.writeFieldEnd();
2127
    oprot.writeFieldStop();
2193
    oprot.writeFieldStop();
2128
    oprot.writeStructEnd();
2194
    oprot.writeStructEnd();
2129
  }
2195
  }
2130
 
2196
 
2131
  @Override
2197
  @Override
Line 2298... Line 2364...
2298
    first = false;
2364
    first = false;
2299
    if (!first) sb.append(", ");
2365
    if (!first) sb.append(", ");
2300
    sb.append("updatedOn:");
2366
    sb.append("updatedOn:");
2301
    sb.append(this.updatedOn);
2367
    sb.append(this.updatedOn);
2302
    first = false;
2368
    first = false;
-
 
2369
    if (!first) sb.append(", ");
-
 
2370
    sb.append("bestSellingRank:");
-
 
2371
    sb.append(this.bestSellingRank);
-
 
2372
    first = false;
2303
    sb.append(")");
2373
    sb.append(")");
2304
    return sb.toString();
2374
    return sb.toString();
2305
  }
2375
  }
2306
 
2376
 
2307
  public void validate() throws TException {
2377
  public void validate() throws TException {