Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
100 ashish 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.catalog;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class Item implements TBase<Item._Fields>, java.io.Serializable, Cloneable {
27
  private static final TStruct STRUCT_DESC = new TStruct("Item");
28
 
29
  private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
510 rajveer 30
  private static final TField MANUFACTURER_NAME_FIELD_DESC = new TField("manufacturerName", TType.STRING, (short)2);
483 rajveer 31
  private static final TField MODEL_NUMBER_FIELD_DESC = new TField("modelNumber", TType.STRING, (short)3);
32
  private static final TField MODEL_NAME_FIELD_DESC = new TField("modelName", TType.STRING, (short)4);
622 chandransh 33
  private static final TField CATEGORY_FIELD_DESC = new TField("category", TType.I64, (short)5);
483 rajveer 34
  private static final TField COMMENTS_FIELD_DESC = new TField("comments", TType.STRING, (short)6);
35
  private static final TField CATALOG_ITEM_ID_FIELD_DESC = new TField("catalogItemId", TType.I64, (short)7);
36
  private static final TField VENDOR_ITEM_ID_FIELD_DESC = new TField("vendorItemId", TType.STRING, (short)8);
123 ashish 37
  private static final TField FEATURE_ID_FIELD_DESC = new TField("featureId", TType.I64, (short)10);
38
  private static final TField FEATURE_DESCRIPTION_FIELD_DESC = new TField("featureDescription", TType.STRING, (short)11);
483 rajveer 39
  private static final TField ITEM_INVENTORY_FIELD_DESC = new TField("itemInventory", TType.STRUCT, (short)12);
40
  private static final TField MRP_FIELD_DESC = new TField("mrp", TType.DOUBLE, (short)13);
41
  private static final TField MOP_FIELD_DESC = new TField("mop", TType.DOUBLE, (short)14);
42
  private static final TField SELLING_PRICE_FIELD_DESC = new TField("sellingPrice", TType.DOUBLE, (short)15);
43
  private static final TField WEIGHT_FIELD_DESC = new TField("weight", TType.DOUBLE, (short)16);
44
  private static final TField ADDED_ON_FIELD_DESC = new TField("addedOn", TType.I64, (short)17);
45
  private static final TField START_DATE_FIELD_DESC = new TField("startDate", TType.I64, (short)18);
46
  private static final TField RETIRE_DATE_FIELD_DESC = new TField("retireDate", TType.I64, (short)19);
47
  private static final TField ITEM_STATUS_FIELD_DESC = new TField("itemStatus", TType.I32, (short)20);
48
  private static final TField OTHER_INFO_FIELD_DESC = new TField("otherInfo", TType.MAP, (short)21);
607 chandransh 49
  private static final TField BEST_DEAL_TEXT_FIELD_DESC = new TField("bestDealText", TType.STRING, (short)22);
50
  private static final TField BEST_DEAL_VALUE_FIELD_DESC = new TField("bestDealValue", TType.DOUBLE, (short)23);
51
  private static final TField DEALER_PRICE_FIELD_DESC = new TField("dealerPrice", TType.DOUBLE, (short)24);
52
  private static final TField UPDATED_ON_FIELD_DESC = new TField("updatedOn", TType.I64, (short)25);
53
  private static final TField COLOR_FIELD_DESC = new TField("color", TType.STRING, (short)26);
100 ashish 54
 
55
  private long id;
510 rajveer 56
  private String manufacturerName;
483 rajveer 57
  private String modelNumber;
58
  private String modelName;
622 chandransh 59
  private long category;
483 rajveer 60
  private String comments;
123 ashish 61
  private long catalogItemId;
483 rajveer 62
  private String vendorItemId;
63
  private long featureId;
64
  private String featureDescription;
100 ashish 65
  private ItemInventory itemInventory;
483 rajveer 66
  private double mrp;
67
  private double mop;
68
  private double sellingPrice;
69
  private double weight;
103 ashish 70
  private long addedOn;
71
  private long startDate;
483 rajveer 72
  private long retireDate;
103 ashish 73
  private status itemStatus;
74
  private Map<String,String> otherInfo;
607 chandransh 75
  private String bestDealText;
76
  private double bestDealValue;
77
  private double dealerPrice;
78
  private long updatedOn;
79
  private String color;
100 ashish 80
 
81
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
82
  public enum _Fields implements TFieldIdEnum {
83
    ID((short)1, "id"),
510 rajveer 84
    MANUFACTURER_NAME((short)2, "manufacturerName"),
483 rajveer 85
    MODEL_NUMBER((short)3, "modelNumber"),
86
    MODEL_NAME((short)4, "modelName"),
87
    CATEGORY((short)5, "category"),
88
    COMMENTS((short)6, "comments"),
89
    CATALOG_ITEM_ID((short)7, "catalogItemId"),
90
    VENDOR_ITEM_ID((short)8, "vendorItemId"),
91
    FEATURE_ID((short)10, "featureId"),
92
    FEATURE_DESCRIPTION((short)11, "featureDescription"),
93
    ITEM_INVENTORY((short)12, "itemInventory"),
94
    MRP((short)13, "mrp"),
95
    MOP((short)14, "mop"),
96
    SELLING_PRICE((short)15, "sellingPrice"),
97
    WEIGHT((short)16, "weight"),
98
    ADDED_ON((short)17, "addedOn"),
99
    START_DATE((short)18, "startDate"),
100
    RETIRE_DATE((short)19, "retireDate"),
103 ashish 101
    /**
102
     * 
103
     * @see status
104
     */
483 rajveer 105
    ITEM_STATUS((short)20, "itemStatus"),
607 chandransh 106
    OTHER_INFO((short)21, "otherInfo"),
107
    BEST_DEAL_TEXT((short)22, "bestDealText"),
108
    BEST_DEAL_VALUE((short)23, "bestDealValue"),
109
    DEALER_PRICE((short)24, "dealerPrice"),
110
    UPDATED_ON((short)25, "updatedOn"),
111
    COLOR((short)26, "color");
100 ashish 112
 
113
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
114
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
115
 
116
    static {
117
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
118
        byId.put((int)field._thriftId, field);
119
        byName.put(field.getFieldName(), field);
120
      }
121
    }
122
 
123
    /**
124
     * Find the _Fields constant that matches fieldId, or null if its not found.
125
     */
126
    public static _Fields findByThriftId(int fieldId) {
127
      return byId.get(fieldId);
128
    }
129
 
130
    /**
131
     * Find the _Fields constant that matches fieldId, throwing an exception
132
     * if it is not found.
133
     */
134
    public static _Fields findByThriftIdOrThrow(int fieldId) {
135
      _Fields fields = findByThriftId(fieldId);
136
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
137
      return fields;
138
    }
139
 
140
    /**
141
     * Find the _Fields constant that matches name, or null if its not found.
142
     */
143
    public static _Fields findByName(String name) {
144
      return byName.get(name);
145
    }
146
 
147
    private final short _thriftId;
148
    private final String _fieldName;
149
 
150
    _Fields(short thriftId, String fieldName) {
151
      _thriftId = thriftId;
152
      _fieldName = fieldName;
153
    }
154
 
155
    public short getThriftFieldId() {
156
      return _thriftId;
157
    }
158
 
159
    public String getFieldName() {
160
      return _fieldName;
161
    }
162
  }
163
 
164
  // isset id assignments
165
  private static final int __ID_ISSET_ID = 0;
622 chandransh 166
  private static final int __CATEGORY_ISSET_ID = 1;
167
  private static final int __CATALOGITEMID_ISSET_ID = 2;
168
  private static final int __FEATUREID_ISSET_ID = 3;
169
  private static final int __MRP_ISSET_ID = 4;
170
  private static final int __MOP_ISSET_ID = 5;
171
  private static final int __SELLINGPRICE_ISSET_ID = 6;
172
  private static final int __WEIGHT_ISSET_ID = 7;
173
  private static final int __ADDEDON_ISSET_ID = 8;
174
  private static final int __STARTDATE_ISSET_ID = 9;
175
  private static final int __RETIREDATE_ISSET_ID = 10;
176
  private static final int __BESTDEALVALUE_ISSET_ID = 11;
177
  private static final int __DEALERPRICE_ISSET_ID = 12;
178
  private static final int __UPDATEDON_ISSET_ID = 13;
179
  private BitSet __isset_bit_vector = new BitSet(14);
100 ashish 180
 
181
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
182
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
183
        new FieldValueMetaData(TType.I64)));
510 rajveer 184
    put(_Fields.MANUFACTURER_NAME, new FieldMetaData("manufacturerName", TFieldRequirementType.DEFAULT, 
483 rajveer 185
        new FieldValueMetaData(TType.STRING)));
186
    put(_Fields.MODEL_NUMBER, new FieldMetaData("modelNumber", TFieldRequirementType.DEFAULT, 
187
        new FieldValueMetaData(TType.STRING)));
188
    put(_Fields.MODEL_NAME, new FieldMetaData("modelName", TFieldRequirementType.DEFAULT, 
189
        new FieldValueMetaData(TType.STRING)));
190
    put(_Fields.CATEGORY, new FieldMetaData("category", TFieldRequirementType.DEFAULT, 
622 chandransh 191
        new FieldValueMetaData(TType.I64)));
483 rajveer 192
    put(_Fields.COMMENTS, new FieldMetaData("comments", TFieldRequirementType.DEFAULT, 
193
        new FieldValueMetaData(TType.STRING)));
123 ashish 194
    put(_Fields.CATALOG_ITEM_ID, new FieldMetaData("catalogItemId", TFieldRequirementType.DEFAULT, 
195
        new FieldValueMetaData(TType.I64)));
483 rajveer 196
    put(_Fields.VENDOR_ITEM_ID, new FieldMetaData("vendorItemId", TFieldRequirementType.DEFAULT, 
197
        new FieldValueMetaData(TType.STRING)));
198
    put(_Fields.FEATURE_ID, new FieldMetaData("featureId", TFieldRequirementType.DEFAULT, 
199
        new FieldValueMetaData(TType.I64)));
200
    put(_Fields.FEATURE_DESCRIPTION, new FieldMetaData("featureDescription", TFieldRequirementType.DEFAULT, 
201
        new FieldValueMetaData(TType.STRING)));
100 ashish 202
    put(_Fields.ITEM_INVENTORY, new FieldMetaData("itemInventory", TFieldRequirementType.DEFAULT, 
203
        new StructMetaData(TType.STRUCT, ItemInventory.class)));
483 rajveer 204
    put(_Fields.MRP, new FieldMetaData("mrp", TFieldRequirementType.DEFAULT, 
205
        new FieldValueMetaData(TType.DOUBLE)));
206
    put(_Fields.MOP, new FieldMetaData("mop", TFieldRequirementType.DEFAULT, 
207
        new FieldValueMetaData(TType.DOUBLE)));
208
    put(_Fields.SELLING_PRICE, new FieldMetaData("sellingPrice", TFieldRequirementType.DEFAULT, 
209
        new FieldValueMetaData(TType.DOUBLE)));
210
    put(_Fields.WEIGHT, new FieldMetaData("weight", TFieldRequirementType.DEFAULT, 
211
        new FieldValueMetaData(TType.DOUBLE)));
103 ashish 212
    put(_Fields.ADDED_ON, new FieldMetaData("addedOn", TFieldRequirementType.DEFAULT, 
213
        new FieldValueMetaData(TType.I64)));
214
    put(_Fields.START_DATE, new FieldMetaData("startDate", TFieldRequirementType.DEFAULT, 
215
        new FieldValueMetaData(TType.I64)));
483 rajveer 216
    put(_Fields.RETIRE_DATE, new FieldMetaData("retireDate", TFieldRequirementType.DEFAULT, 
217
        new FieldValueMetaData(TType.I64)));
103 ashish 218
    put(_Fields.ITEM_STATUS, new FieldMetaData("itemStatus", TFieldRequirementType.DEFAULT, 
219
        new EnumMetaData(TType.ENUM, status.class)));
220
    put(_Fields.OTHER_INFO, new FieldMetaData("otherInfo", TFieldRequirementType.DEFAULT, 
221
        new MapMetaData(TType.MAP, 
222
            new FieldValueMetaData(TType.STRING), 
223
            new FieldValueMetaData(TType.STRING))));
607 chandransh 224
    put(_Fields.BEST_DEAL_TEXT, new FieldMetaData("bestDealText", TFieldRequirementType.DEFAULT, 
225
        new FieldValueMetaData(TType.STRING)));
226
    put(_Fields.BEST_DEAL_VALUE, new FieldMetaData("bestDealValue", TFieldRequirementType.DEFAULT, 
227
        new FieldValueMetaData(TType.DOUBLE)));
228
    put(_Fields.DEALER_PRICE, new FieldMetaData("dealerPrice", TFieldRequirementType.DEFAULT, 
229
        new FieldValueMetaData(TType.DOUBLE)));
230
    put(_Fields.UPDATED_ON, new FieldMetaData("updatedOn", TFieldRequirementType.DEFAULT, 
231
        new FieldValueMetaData(TType.I64)));
232
    put(_Fields.COLOR, new FieldMetaData("color", TFieldRequirementType.DEFAULT, 
233
        new FieldValueMetaData(TType.STRING)));
100 ashish 234
  }});
235
 
236
  static {
237
    FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
238
  }
239
 
240
  public Item() {
241
  }
242
 
243
  public Item(
244
    long id,
510 rajveer 245
    String manufacturerName,
483 rajveer 246
    String modelNumber,
247
    String modelName,
622 chandransh 248
    long category,
483 rajveer 249
    String comments,
123 ashish 250
    long catalogItemId,
483 rajveer 251
    String vendorItemId,
252
    long featureId,
253
    String featureDescription,
103 ashish 254
    ItemInventory itemInventory,
483 rajveer 255
    double mrp,
256
    double mop,
257
    double sellingPrice,
258
    double weight,
103 ashish 259
    long addedOn,
260
    long startDate,
483 rajveer 261
    long retireDate,
103 ashish 262
    status itemStatus,
607 chandransh 263
    Map<String,String> otherInfo,
264
    String bestDealText,
265
    double bestDealValue,
266
    double dealerPrice,
267
    long updatedOn,
268
    String color)
100 ashish 269
  {
270
    this();
271
    this.id = id;
272
    setIdIsSet(true);
510 rajveer 273
    this.manufacturerName = manufacturerName;
483 rajveer 274
    this.modelNumber = modelNumber;
275
    this.modelName = modelName;
276
    this.category = category;
622 chandransh 277
    setCategoryIsSet(true);
483 rajveer 278
    this.comments = comments;
123 ashish 279
    this.catalogItemId = catalogItemId;
280
    setCatalogItemIdIsSet(true);
483 rajveer 281
    this.vendorItemId = vendorItemId;
282
    this.featureId = featureId;
283
    setFeatureIdIsSet(true);
284
    this.featureDescription = featureDescription;
100 ashish 285
    this.itemInventory = itemInventory;
483 rajveer 286
    this.mrp = mrp;
287
    setMrpIsSet(true);
288
    this.mop = mop;
289
    setMopIsSet(true);
290
    this.sellingPrice = sellingPrice;
291
    setSellingPriceIsSet(true);
292
    this.weight = weight;
293
    setWeightIsSet(true);
103 ashish 294
    this.addedOn = addedOn;
295
    setAddedOnIsSet(true);
296
    this.startDate = startDate;
297
    setStartDateIsSet(true);
483 rajveer 298
    this.retireDate = retireDate;
299
    setRetireDateIsSet(true);
103 ashish 300
    this.itemStatus = itemStatus;
301
    this.otherInfo = otherInfo;
607 chandransh 302
    this.bestDealText = bestDealText;
303
    this.bestDealValue = bestDealValue;
304
    setBestDealValueIsSet(true);
305
    this.dealerPrice = dealerPrice;
306
    setDealerPriceIsSet(true);
307
    this.updatedOn = updatedOn;
308
    setUpdatedOnIsSet(true);
309
    this.color = color;
100 ashish 310
  }
311
 
312
  /**
313
   * Performs a deep copy on <i>other</i>.
314
   */
315
  public Item(Item other) {
316
    __isset_bit_vector.clear();
317
    __isset_bit_vector.or(other.__isset_bit_vector);
318
    this.id = other.id;
510 rajveer 319
    if (other.isSetManufacturerName()) {
320
      this.manufacturerName = other.manufacturerName;
483 rajveer 321
    }
322
    if (other.isSetModelNumber()) {
323
      this.modelNumber = other.modelNumber;
324
    }
325
    if (other.isSetModelName()) {
326
      this.modelName = other.modelName;
327
    }
622 chandransh 328
    this.category = other.category;
483 rajveer 329
    if (other.isSetComments()) {
330
      this.comments = other.comments;
331
    }
123 ashish 332
    this.catalogItemId = other.catalogItemId;
483 rajveer 333
    if (other.isSetVendorItemId()) {
334
      this.vendorItemId = other.vendorItemId;
335
    }
336
    this.featureId = other.featureId;
337
    if (other.isSetFeatureDescription()) {
338
      this.featureDescription = other.featureDescription;
339
    }
100 ashish 340
    if (other.isSetItemInventory()) {
341
      this.itemInventory = new ItemInventory(other.itemInventory);
342
    }
483 rajveer 343
    this.mrp = other.mrp;
344
    this.mop = other.mop;
345
    this.sellingPrice = other.sellingPrice;
346
    this.weight = other.weight;
103 ashish 347
    this.addedOn = other.addedOn;
348
    this.startDate = other.startDate;
483 rajveer 349
    this.retireDate = other.retireDate;
103 ashish 350
    if (other.isSetItemStatus()) {
351
      this.itemStatus = other.itemStatus;
352
    }
353
    if (other.isSetOtherInfo()) {
354
      Map<String,String> __this__otherInfo = new HashMap<String,String>();
355
      for (Map.Entry<String, String> other_element : other.otherInfo.entrySet()) {
356
 
357
        String other_element_key = other_element.getKey();
358
        String other_element_value = other_element.getValue();
359
 
360
        String __this__otherInfo_copy_key = other_element_key;
361
 
362
        String __this__otherInfo_copy_value = other_element_value;
363
 
364
        __this__otherInfo.put(__this__otherInfo_copy_key, __this__otherInfo_copy_value);
365
      }
366
      this.otherInfo = __this__otherInfo;
367
    }
607 chandransh 368
    if (other.isSetBestDealText()) {
369
      this.bestDealText = other.bestDealText;
370
    }
371
    this.bestDealValue = other.bestDealValue;
372
    this.dealerPrice = other.dealerPrice;
373
    this.updatedOn = other.updatedOn;
374
    if (other.isSetColor()) {
375
      this.color = other.color;
376
    }
100 ashish 377
  }
378
 
379
  public Item deepCopy() {
380
    return new Item(this);
381
  }
382
 
383
  @Deprecated
384
  public Item clone() {
385
    return new Item(this);
386
  }
387
 
388
  public long getId() {
389
    return this.id;
390
  }
391
 
392
  public Item setId(long id) {
393
    this.id = id;
394
    setIdIsSet(true);
395
    return this;
396
  }
397
 
398
  public void unsetId() {
399
    __isset_bit_vector.clear(__ID_ISSET_ID);
400
  }
401
 
402
  /** Returns true if field id is set (has been asigned a value) and false otherwise */
403
  public boolean isSetId() {
404
    return __isset_bit_vector.get(__ID_ISSET_ID);
405
  }
406
 
407
  public void setIdIsSet(boolean value) {
408
    __isset_bit_vector.set(__ID_ISSET_ID, value);
409
  }
410
 
510 rajveer 411
  public String getManufacturerName() {
412
    return this.manufacturerName;
483 rajveer 413
  }
414
 
510 rajveer 415
  public Item setManufacturerName(String manufacturerName) {
416
    this.manufacturerName = manufacturerName;
483 rajveer 417
    return this;
418
  }
419
 
510 rajveer 420
  public void unsetManufacturerName() {
421
    this.manufacturerName = null;
483 rajveer 422
  }
423
 
510 rajveer 424
  /** Returns true if field manufacturerName is set (has been asigned a value) and false otherwise */
425
  public boolean isSetManufacturerName() {
426
    return this.manufacturerName != null;
483 rajveer 427
  }
428
 
510 rajveer 429
  public void setManufacturerNameIsSet(boolean value) {
483 rajveer 430
    if (!value) {
510 rajveer 431
      this.manufacturerName = null;
483 rajveer 432
    }
433
  }
434
 
435
  public String getModelNumber() {
436
    return this.modelNumber;
437
  }
438
 
439
  public Item setModelNumber(String modelNumber) {
440
    this.modelNumber = modelNumber;
441
    return this;
442
  }
443
 
444
  public void unsetModelNumber() {
445
    this.modelNumber = null;
446
  }
447
 
448
  /** Returns true if field modelNumber is set (has been asigned a value) and false otherwise */
449
  public boolean isSetModelNumber() {
450
    return this.modelNumber != null;
451
  }
452
 
453
  public void setModelNumberIsSet(boolean value) {
454
    if (!value) {
455
      this.modelNumber = null;
456
    }
457
  }
458
 
459
  public String getModelName() {
460
    return this.modelName;
461
  }
462
 
463
  public Item setModelName(String modelName) {
464
    this.modelName = modelName;
465
    return this;
466
  }
467
 
468
  public void unsetModelName() {
469
    this.modelName = null;
470
  }
471
 
472
  /** Returns true if field modelName is set (has been asigned a value) and false otherwise */
473
  public boolean isSetModelName() {
474
    return this.modelName != null;
475
  }
476
 
477
  public void setModelNameIsSet(boolean value) {
478
    if (!value) {
479
      this.modelName = null;
480
    }
481
  }
482
 
622 chandransh 483
  public long getCategory() {
483 rajveer 484
    return this.category;
485
  }
486
 
622 chandransh 487
  public Item setCategory(long category) {
483 rajveer 488
    this.category = category;
622 chandransh 489
    setCategoryIsSet(true);
483 rajveer 490
    return this;
491
  }
492
 
493
  public void unsetCategory() {
622 chandransh 494
    __isset_bit_vector.clear(__CATEGORY_ISSET_ID);
483 rajveer 495
  }
496
 
497
  /** Returns true if field category is set (has been asigned a value) and false otherwise */
498
  public boolean isSetCategory() {
622 chandransh 499
    return __isset_bit_vector.get(__CATEGORY_ISSET_ID);
483 rajveer 500
  }
501
 
502
  public void setCategoryIsSet(boolean value) {
622 chandransh 503
    __isset_bit_vector.set(__CATEGORY_ISSET_ID, value);
483 rajveer 504
  }
505
 
506
  public String getComments() {
507
    return this.comments;
508
  }
509
 
510
  public Item setComments(String comments) {
511
    this.comments = comments;
512
    return this;
513
  }
514
 
515
  public void unsetComments() {
516
    this.comments = null;
517
  }
518
 
519
  /** Returns true if field comments is set (has been asigned a value) and false otherwise */
520
  public boolean isSetComments() {
521
    return this.comments != null;
522
  }
523
 
524
  public void setCommentsIsSet(boolean value) {
525
    if (!value) {
526
      this.comments = null;
527
    }
528
  }
529
 
123 ashish 530
  public long getCatalogItemId() {
531
    return this.catalogItemId;
100 ashish 532
  }
533
 
123 ashish 534
  public Item setCatalogItemId(long catalogItemId) {
535
    this.catalogItemId = catalogItemId;
536
    setCatalogItemIdIsSet(true);
100 ashish 537
    return this;
538
  }
539
 
123 ashish 540
  public void unsetCatalogItemId() {
541
    __isset_bit_vector.clear(__CATALOGITEMID_ISSET_ID);
100 ashish 542
  }
543
 
123 ashish 544
  /** Returns true if field catalogItemId is set (has been asigned a value) and false otherwise */
545
  public boolean isSetCatalogItemId() {
546
    return __isset_bit_vector.get(__CATALOGITEMID_ISSET_ID);
100 ashish 547
  }
548
 
123 ashish 549
  public void setCatalogItemIdIsSet(boolean value) {
550
    __isset_bit_vector.set(__CATALOGITEMID_ISSET_ID, value);
100 ashish 551
  }
552
 
483 rajveer 553
  public String getVendorItemId() {
554
    return this.vendorItemId;
555
  }
556
 
557
  public Item setVendorItemId(String vendorItemId) {
558
    this.vendorItemId = vendorItemId;
559
    return this;
560
  }
561
 
562
  public void unsetVendorItemId() {
563
    this.vendorItemId = null;
564
  }
565
 
566
  /** Returns true if field vendorItemId is set (has been asigned a value) and false otherwise */
567
  public boolean isSetVendorItemId() {
568
    return this.vendorItemId != null;
569
  }
570
 
571
  public void setVendorItemIdIsSet(boolean value) {
572
    if (!value) {
573
      this.vendorItemId = null;
574
    }
575
  }
576
 
577
  public long getFeatureId() {
578
    return this.featureId;
579
  }
580
 
581
  public Item setFeatureId(long featureId) {
582
    this.featureId = featureId;
583
    setFeatureIdIsSet(true);
584
    return this;
585
  }
586
 
587
  public void unsetFeatureId() {
588
    __isset_bit_vector.clear(__FEATUREID_ISSET_ID);
589
  }
590
 
591
  /** Returns true if field featureId is set (has been asigned a value) and false otherwise */
592
  public boolean isSetFeatureId() {
593
    return __isset_bit_vector.get(__FEATUREID_ISSET_ID);
594
  }
595
 
596
  public void setFeatureIdIsSet(boolean value) {
597
    __isset_bit_vector.set(__FEATUREID_ISSET_ID, value);
598
  }
599
 
600
  public String getFeatureDescription() {
601
    return this.featureDescription;
602
  }
603
 
604
  public Item setFeatureDescription(String featureDescription) {
605
    this.featureDescription = featureDescription;
606
    return this;
607
  }
608
 
609
  public void unsetFeatureDescription() {
610
    this.featureDescription = null;
611
  }
612
 
613
  /** Returns true if field featureDescription is set (has been asigned a value) and false otherwise */
614
  public boolean isSetFeatureDescription() {
615
    return this.featureDescription != null;
616
  }
617
 
618
  public void setFeatureDescriptionIsSet(boolean value) {
619
    if (!value) {
620
      this.featureDescription = null;
621
    }
622
  }
623
 
100 ashish 624
  public ItemInventory getItemInventory() {
625
    return this.itemInventory;
626
  }
627
 
628
  public Item setItemInventory(ItemInventory itemInventory) {
629
    this.itemInventory = itemInventory;
630
    return this;
631
  }
632
 
633
  public void unsetItemInventory() {
634
    this.itemInventory = null;
635
  }
636
 
637
  /** Returns true if field itemInventory is set (has been asigned a value) and false otherwise */
638
  public boolean isSetItemInventory() {
639
    return this.itemInventory != null;
640
  }
641
 
642
  public void setItemInventoryIsSet(boolean value) {
643
    if (!value) {
644
      this.itemInventory = null;
645
    }
646
  }
647
 
483 rajveer 648
  public double getMrp() {
649
    return this.mrp;
650
  }
651
 
652
  public Item setMrp(double mrp) {
653
    this.mrp = mrp;
654
    setMrpIsSet(true);
655
    return this;
656
  }
657
 
658
  public void unsetMrp() {
659
    __isset_bit_vector.clear(__MRP_ISSET_ID);
660
  }
661
 
662
  /** Returns true if field mrp is set (has been asigned a value) and false otherwise */
663
  public boolean isSetMrp() {
664
    return __isset_bit_vector.get(__MRP_ISSET_ID);
665
  }
666
 
667
  public void setMrpIsSet(boolean value) {
668
    __isset_bit_vector.set(__MRP_ISSET_ID, value);
669
  }
670
 
671
  public double getMop() {
672
    return this.mop;
673
  }
674
 
675
  public Item setMop(double mop) {
676
    this.mop = mop;
677
    setMopIsSet(true);
678
    return this;
679
  }
680
 
681
  public void unsetMop() {
682
    __isset_bit_vector.clear(__MOP_ISSET_ID);
683
  }
684
 
685
  /** Returns true if field mop is set (has been asigned a value) and false otherwise */
686
  public boolean isSetMop() {
687
    return __isset_bit_vector.get(__MOP_ISSET_ID);
688
  }
689
 
690
  public void setMopIsSet(boolean value) {
691
    __isset_bit_vector.set(__MOP_ISSET_ID, value);
692
  }
693
 
694
  public double getSellingPrice() {
695
    return this.sellingPrice;
696
  }
697
 
698
  public Item setSellingPrice(double sellingPrice) {
699
    this.sellingPrice = sellingPrice;
700
    setSellingPriceIsSet(true);
701
    return this;
702
  }
703
 
704
  public void unsetSellingPrice() {
705
    __isset_bit_vector.clear(__SELLINGPRICE_ISSET_ID);
706
  }
707
 
708
  /** Returns true if field sellingPrice is set (has been asigned a value) and false otherwise */
709
  public boolean isSetSellingPrice() {
710
    return __isset_bit_vector.get(__SELLINGPRICE_ISSET_ID);
711
  }
712
 
713
  public void setSellingPriceIsSet(boolean value) {
714
    __isset_bit_vector.set(__SELLINGPRICE_ISSET_ID, value);
715
  }
716
 
717
  public double getWeight() {
718
    return this.weight;
719
  }
720
 
721
  public Item setWeight(double weight) {
722
    this.weight = weight;
723
    setWeightIsSet(true);
724
    return this;
725
  }
726
 
727
  public void unsetWeight() {
728
    __isset_bit_vector.clear(__WEIGHT_ISSET_ID);
729
  }
730
 
731
  /** Returns true if field weight is set (has been asigned a value) and false otherwise */
732
  public boolean isSetWeight() {
733
    return __isset_bit_vector.get(__WEIGHT_ISSET_ID);
734
  }
735
 
736
  public void setWeightIsSet(boolean value) {
737
    __isset_bit_vector.set(__WEIGHT_ISSET_ID, value);
738
  }
739
 
103 ashish 740
  public long getAddedOn() {
741
    return this.addedOn;
742
  }
743
 
744
  public Item setAddedOn(long addedOn) {
745
    this.addedOn = addedOn;
746
    setAddedOnIsSet(true);
747
    return this;
748
  }
749
 
750
  public void unsetAddedOn() {
751
    __isset_bit_vector.clear(__ADDEDON_ISSET_ID);
752
  }
753
 
754
  /** Returns true if field addedOn is set (has been asigned a value) and false otherwise */
755
  public boolean isSetAddedOn() {
756
    return __isset_bit_vector.get(__ADDEDON_ISSET_ID);
757
  }
758
 
759
  public void setAddedOnIsSet(boolean value) {
760
    __isset_bit_vector.set(__ADDEDON_ISSET_ID, value);
761
  }
762
 
763
  public long getStartDate() {
764
    return this.startDate;
765
  }
766
 
767
  public Item setStartDate(long startDate) {
768
    this.startDate = startDate;
769
    setStartDateIsSet(true);
770
    return this;
771
  }
772
 
773
  public void unsetStartDate() {
774
    __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
775
  }
776
 
777
  /** Returns true if field startDate is set (has been asigned a value) and false otherwise */
778
  public boolean isSetStartDate() {
779
    return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
780
  }
781
 
782
  public void setStartDateIsSet(boolean value) {
783
    __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
784
  }
785
 
483 rajveer 786
  public long getRetireDate() {
787
    return this.retireDate;
788
  }
789
 
790
  public Item setRetireDate(long retireDate) {
791
    this.retireDate = retireDate;
792
    setRetireDateIsSet(true);
793
    return this;
794
  }
795
 
796
  public void unsetRetireDate() {
797
    __isset_bit_vector.clear(__RETIREDATE_ISSET_ID);
798
  }
799
 
800
  /** Returns true if field retireDate is set (has been asigned a value) and false otherwise */
801
  public boolean isSetRetireDate() {
802
    return __isset_bit_vector.get(__RETIREDATE_ISSET_ID);
803
  }
804
 
805
  public void setRetireDateIsSet(boolean value) {
806
    __isset_bit_vector.set(__RETIREDATE_ISSET_ID, value);
807
  }
808
 
103 ashish 809
  /**
810
   * 
811
   * @see status
812
   */
813
  public status getItemStatus() {
814
    return this.itemStatus;
815
  }
816
 
817
  /**
818
   * 
819
   * @see status
820
   */
821
  public Item setItemStatus(status itemStatus) {
822
    this.itemStatus = itemStatus;
823
    return this;
824
  }
825
 
826
  public void unsetItemStatus() {
827
    this.itemStatus = null;
828
  }
829
 
830
  /** Returns true if field itemStatus is set (has been asigned a value) and false otherwise */
831
  public boolean isSetItemStatus() {
832
    return this.itemStatus != null;
833
  }
834
 
835
  public void setItemStatusIsSet(boolean value) {
836
    if (!value) {
837
      this.itemStatus = null;
838
    }
839
  }
840
 
841
  public int getOtherInfoSize() {
842
    return (this.otherInfo == null) ? 0 : this.otherInfo.size();
843
  }
844
 
845
  public void putToOtherInfo(String key, String val) {
846
    if (this.otherInfo == null) {
847
      this.otherInfo = new HashMap<String,String>();
848
    }
849
    this.otherInfo.put(key, val);
850
  }
851
 
852
  public Map<String,String> getOtherInfo() {
853
    return this.otherInfo;
854
  }
855
 
856
  public Item setOtherInfo(Map<String,String> otherInfo) {
857
    this.otherInfo = otherInfo;
858
    return this;
859
  }
860
 
861
  public void unsetOtherInfo() {
862
    this.otherInfo = null;
863
  }
864
 
865
  /** Returns true if field otherInfo is set (has been asigned a value) and false otherwise */
866
  public boolean isSetOtherInfo() {
867
    return this.otherInfo != null;
868
  }
869
 
870
  public void setOtherInfoIsSet(boolean value) {
871
    if (!value) {
872
      this.otherInfo = null;
873
    }
874
  }
875
 
607 chandransh 876
  public String getBestDealText() {
877
    return this.bestDealText;
878
  }
879
 
880
  public Item setBestDealText(String bestDealText) {
881
    this.bestDealText = bestDealText;
882
    return this;
883
  }
884
 
885
  public void unsetBestDealText() {
886
    this.bestDealText = null;
887
  }
888
 
889
  /** Returns true if field bestDealText is set (has been asigned a value) and false otherwise */
890
  public boolean isSetBestDealText() {
891
    return this.bestDealText != null;
892
  }
893
 
894
  public void setBestDealTextIsSet(boolean value) {
895
    if (!value) {
896
      this.bestDealText = null;
897
    }
898
  }
899
 
900
  public double getBestDealValue() {
901
    return this.bestDealValue;
902
  }
903
 
904
  public Item setBestDealValue(double bestDealValue) {
905
    this.bestDealValue = bestDealValue;
906
    setBestDealValueIsSet(true);
907
    return this;
908
  }
909
 
910
  public void unsetBestDealValue() {
911
    __isset_bit_vector.clear(__BESTDEALVALUE_ISSET_ID);
912
  }
913
 
914
  /** Returns true if field bestDealValue is set (has been asigned a value) and false otherwise */
915
  public boolean isSetBestDealValue() {
916
    return __isset_bit_vector.get(__BESTDEALVALUE_ISSET_ID);
917
  }
918
 
919
  public void setBestDealValueIsSet(boolean value) {
920
    __isset_bit_vector.set(__BESTDEALVALUE_ISSET_ID, value);
921
  }
922
 
923
  public double getDealerPrice() {
924
    return this.dealerPrice;
925
  }
926
 
927
  public Item setDealerPrice(double dealerPrice) {
928
    this.dealerPrice = dealerPrice;
929
    setDealerPriceIsSet(true);
930
    return this;
931
  }
932
 
933
  public void unsetDealerPrice() {
934
    __isset_bit_vector.clear(__DEALERPRICE_ISSET_ID);
935
  }
936
 
937
  /** Returns true if field dealerPrice is set (has been asigned a value) and false otherwise */
938
  public boolean isSetDealerPrice() {
939
    return __isset_bit_vector.get(__DEALERPRICE_ISSET_ID);
940
  }
941
 
942
  public void setDealerPriceIsSet(boolean value) {
943
    __isset_bit_vector.set(__DEALERPRICE_ISSET_ID, value);
944
  }
945
 
946
  public long getUpdatedOn() {
947
    return this.updatedOn;
948
  }
949
 
950
  public Item setUpdatedOn(long updatedOn) {
951
    this.updatedOn = updatedOn;
952
    setUpdatedOnIsSet(true);
953
    return this;
954
  }
955
 
956
  public void unsetUpdatedOn() {
957
    __isset_bit_vector.clear(__UPDATEDON_ISSET_ID);
958
  }
959
 
960
  /** Returns true if field updatedOn is set (has been asigned a value) and false otherwise */
961
  public boolean isSetUpdatedOn() {
962
    return __isset_bit_vector.get(__UPDATEDON_ISSET_ID);
963
  }
964
 
965
  public void setUpdatedOnIsSet(boolean value) {
966
    __isset_bit_vector.set(__UPDATEDON_ISSET_ID, value);
967
  }
968
 
969
  public String getColor() {
970
    return this.color;
971
  }
972
 
973
  public Item setColor(String color) {
974
    this.color = color;
975
    return this;
976
  }
977
 
978
  public void unsetColor() {
979
    this.color = null;
980
  }
981
 
982
  /** Returns true if field color is set (has been asigned a value) and false otherwise */
983
  public boolean isSetColor() {
984
    return this.color != null;
985
  }
986
 
987
  public void setColorIsSet(boolean value) {
988
    if (!value) {
989
      this.color = null;
990
    }
991
  }
992
 
100 ashish 993
  public void setFieldValue(_Fields field, Object value) {
994
    switch (field) {
995
    case ID:
996
      if (value == null) {
997
        unsetId();
998
      } else {
999
        setId((Long)value);
1000
      }
1001
      break;
1002
 
510 rajveer 1003
    case MANUFACTURER_NAME:
483 rajveer 1004
      if (value == null) {
510 rajveer 1005
        unsetManufacturerName();
483 rajveer 1006
      } else {
510 rajveer 1007
        setManufacturerName((String)value);
483 rajveer 1008
      }
1009
      break;
1010
 
1011
    case MODEL_NUMBER:
1012
      if (value == null) {
1013
        unsetModelNumber();
1014
      } else {
1015
        setModelNumber((String)value);
1016
      }
1017
      break;
1018
 
1019
    case MODEL_NAME:
1020
      if (value == null) {
1021
        unsetModelName();
1022
      } else {
1023
        setModelName((String)value);
1024
      }
1025
      break;
1026
 
1027
    case CATEGORY:
1028
      if (value == null) {
1029
        unsetCategory();
1030
      } else {
622 chandransh 1031
        setCategory((Long)value);
483 rajveer 1032
      }
1033
      break;
1034
 
1035
    case COMMENTS:
1036
      if (value == null) {
1037
        unsetComments();
1038
      } else {
1039
        setComments((String)value);
1040
      }
1041
      break;
1042
 
123 ashish 1043
    case CATALOG_ITEM_ID:
100 ashish 1044
      if (value == null) {
123 ashish 1045
        unsetCatalogItemId();
100 ashish 1046
      } else {
123 ashish 1047
        setCatalogItemId((Long)value);
100 ashish 1048
      }
1049
      break;
1050
 
483 rajveer 1051
    case VENDOR_ITEM_ID:
100 ashish 1052
      if (value == null) {
483 rajveer 1053
        unsetVendorItemId();
100 ashish 1054
      } else {
483 rajveer 1055
        setVendorItemId((String)value);
100 ashish 1056
      }
1057
      break;
1058
 
483 rajveer 1059
    case FEATURE_ID:
100 ashish 1060
      if (value == null) {
483 rajveer 1061
        unsetFeatureId();
100 ashish 1062
      } else {
483 rajveer 1063
        setFeatureId((Long)value);
100 ashish 1064
      }
1065
      break;
1066
 
483 rajveer 1067
    case FEATURE_DESCRIPTION:
103 ashish 1068
      if (value == null) {
483 rajveer 1069
        unsetFeatureDescription();
103 ashish 1070
      } else {
483 rajveer 1071
        setFeatureDescription((String)value);
103 ashish 1072
      }
1073
      break;
1074
 
483 rajveer 1075
    case ITEM_INVENTORY:
103 ashish 1076
      if (value == null) {
483 rajveer 1077
        unsetItemInventory();
103 ashish 1078
      } else {
483 rajveer 1079
        setItemInventory((ItemInventory)value);
103 ashish 1080
      }
1081
      break;
1082
 
483 rajveer 1083
    case MRP:
103 ashish 1084
      if (value == null) {
483 rajveer 1085
        unsetMrp();
103 ashish 1086
      } else {
483 rajveer 1087
        setMrp((Double)value);
103 ashish 1088
      }
1089
      break;
1090
 
483 rajveer 1091
    case MOP:
103 ashish 1092
      if (value == null) {
483 rajveer 1093
        unsetMop();
103 ashish 1094
      } else {
483 rajveer 1095
        setMop((Double)value);
103 ashish 1096
      }
1097
      break;
1098
 
483 rajveer 1099
    case SELLING_PRICE:
1100
      if (value == null) {
1101
        unsetSellingPrice();
1102
      } else {
1103
        setSellingPrice((Double)value);
1104
      }
1105
      break;
1106
 
123 ashish 1107
    case WEIGHT:
1108
      if (value == null) {
1109
        unsetWeight();
1110
      } else {
1111
        setWeight((Double)value);
1112
      }
1113
      break;
1114
 
483 rajveer 1115
    case ADDED_ON:
123 ashish 1116
      if (value == null) {
483 rajveer 1117
        unsetAddedOn();
123 ashish 1118
      } else {
483 rajveer 1119
        setAddedOn((Long)value);
123 ashish 1120
      }
1121
      break;
1122
 
483 rajveer 1123
    case START_DATE:
123 ashish 1124
      if (value == null) {
483 rajveer 1125
        unsetStartDate();
123 ashish 1126
      } else {
483 rajveer 1127
        setStartDate((Long)value);
123 ashish 1128
      }
1129
      break;
1130
 
483 rajveer 1131
    case RETIRE_DATE:
123 ashish 1132
      if (value == null) {
483 rajveer 1133
        unsetRetireDate();
123 ashish 1134
      } else {
483 rajveer 1135
        setRetireDate((Long)value);
123 ashish 1136
      }
1137
      break;
1138
 
483 rajveer 1139
    case ITEM_STATUS:
1140
      if (value == null) {
1141
        unsetItemStatus();
1142
      } else {
1143
        setItemStatus((status)value);
1144
      }
1145
      break;
1146
 
1147
    case OTHER_INFO:
1148
      if (value == null) {
1149
        unsetOtherInfo();
1150
      } else {
1151
        setOtherInfo((Map<String,String>)value);
1152
      }
1153
      break;
1154
 
607 chandransh 1155
    case BEST_DEAL_TEXT:
1156
      if (value == null) {
1157
        unsetBestDealText();
1158
      } else {
1159
        setBestDealText((String)value);
1160
      }
1161
      break;
1162
 
1163
    case BEST_DEAL_VALUE:
1164
      if (value == null) {
1165
        unsetBestDealValue();
1166
      } else {
1167
        setBestDealValue((Double)value);
1168
      }
1169
      break;
1170
 
1171
    case DEALER_PRICE:
1172
      if (value == null) {
1173
        unsetDealerPrice();
1174
      } else {
1175
        setDealerPrice((Double)value);
1176
      }
1177
      break;
1178
 
1179
    case UPDATED_ON:
1180
      if (value == null) {
1181
        unsetUpdatedOn();
1182
      } else {
1183
        setUpdatedOn((Long)value);
1184
      }
1185
      break;
1186
 
1187
    case COLOR:
1188
      if (value == null) {
1189
        unsetColor();
1190
      } else {
1191
        setColor((String)value);
1192
      }
1193
      break;
1194
 
100 ashish 1195
    }
1196
  }
1197
 
1198
  public void setFieldValue(int fieldID, Object value) {
1199
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1200
  }
1201
 
1202
  public Object getFieldValue(_Fields field) {
1203
    switch (field) {
1204
    case ID:
1205
      return new Long(getId());
1206
 
510 rajveer 1207
    case MANUFACTURER_NAME:
1208
      return getManufacturerName();
483 rajveer 1209
 
1210
    case MODEL_NUMBER:
1211
      return getModelNumber();
1212
 
1213
    case MODEL_NAME:
1214
      return getModelName();
1215
 
1216
    case CATEGORY:
622 chandransh 1217
      return new Long(getCategory());
483 rajveer 1218
 
1219
    case COMMENTS:
1220
      return getComments();
1221
 
123 ashish 1222
    case CATALOG_ITEM_ID:
1223
      return new Long(getCatalogItemId());
100 ashish 1224
 
483 rajveer 1225
    case VENDOR_ITEM_ID:
1226
      return getVendorItemId();
1227
 
1228
    case FEATURE_ID:
1229
      return new Long(getFeatureId());
1230
 
1231
    case FEATURE_DESCRIPTION:
1232
      return getFeatureDescription();
1233
 
100 ashish 1234
    case ITEM_INVENTORY:
1235
      return getItemInventory();
1236
 
483 rajveer 1237
    case MRP:
1238
      return new Double(getMrp());
1239
 
1240
    case MOP:
1241
      return new Double(getMop());
1242
 
1243
    case SELLING_PRICE:
1244
      return new Double(getSellingPrice());
1245
 
1246
    case WEIGHT:
1247
      return new Double(getWeight());
1248
 
103 ashish 1249
    case ADDED_ON:
1250
      return new Long(getAddedOn());
1251
 
1252
    case START_DATE:
1253
      return new Long(getStartDate());
1254
 
483 rajveer 1255
    case RETIRE_DATE:
1256
      return new Long(getRetireDate());
1257
 
103 ashish 1258
    case ITEM_STATUS:
1259
      return getItemStatus();
1260
 
1261
    case OTHER_INFO:
1262
      return getOtherInfo();
1263
 
607 chandransh 1264
    case BEST_DEAL_TEXT:
1265
      return getBestDealText();
1266
 
1267
    case BEST_DEAL_VALUE:
1268
      return new Double(getBestDealValue());
1269
 
1270
    case DEALER_PRICE:
1271
      return new Double(getDealerPrice());
1272
 
1273
    case UPDATED_ON:
1274
      return new Long(getUpdatedOn());
1275
 
1276
    case COLOR:
1277
      return getColor();
1278
 
100 ashish 1279
    }
1280
    throw new IllegalStateException();
1281
  }
1282
 
1283
  public Object getFieldValue(int fieldId) {
1284
    return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1285
  }
1286
 
1287
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1288
  public boolean isSet(_Fields field) {
1289
    switch (field) {
1290
    case ID:
1291
      return isSetId();
510 rajveer 1292
    case MANUFACTURER_NAME:
1293
      return isSetManufacturerName();
483 rajveer 1294
    case MODEL_NUMBER:
1295
      return isSetModelNumber();
1296
    case MODEL_NAME:
1297
      return isSetModelName();
1298
    case CATEGORY:
1299
      return isSetCategory();
1300
    case COMMENTS:
1301
      return isSetComments();
123 ashish 1302
    case CATALOG_ITEM_ID:
1303
      return isSetCatalogItemId();
483 rajveer 1304
    case VENDOR_ITEM_ID:
1305
      return isSetVendorItemId();
1306
    case FEATURE_ID:
1307
      return isSetFeatureId();
1308
    case FEATURE_DESCRIPTION:
1309
      return isSetFeatureDescription();
100 ashish 1310
    case ITEM_INVENTORY:
1311
      return isSetItemInventory();
483 rajveer 1312
    case MRP:
1313
      return isSetMrp();
1314
    case MOP:
1315
      return isSetMop();
1316
    case SELLING_PRICE:
1317
      return isSetSellingPrice();
1318
    case WEIGHT:
1319
      return isSetWeight();
103 ashish 1320
    case ADDED_ON:
1321
      return isSetAddedOn();
1322
    case START_DATE:
1323
      return isSetStartDate();
483 rajveer 1324
    case RETIRE_DATE:
1325
      return isSetRetireDate();
103 ashish 1326
    case ITEM_STATUS:
1327
      return isSetItemStatus();
1328
    case OTHER_INFO:
1329
      return isSetOtherInfo();
607 chandransh 1330
    case BEST_DEAL_TEXT:
1331
      return isSetBestDealText();
1332
    case BEST_DEAL_VALUE:
1333
      return isSetBestDealValue();
1334
    case DEALER_PRICE:
1335
      return isSetDealerPrice();
1336
    case UPDATED_ON:
1337
      return isSetUpdatedOn();
1338
    case COLOR:
1339
      return isSetColor();
100 ashish 1340
    }
1341
    throw new IllegalStateException();
1342
  }
1343
 
1344
  public boolean isSet(int fieldID) {
1345
    return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1346
  }
1347
 
1348
  @Override
1349
  public boolean equals(Object that) {
1350
    if (that == null)
1351
      return false;
1352
    if (that instanceof Item)
1353
      return this.equals((Item)that);
1354
    return false;
1355
  }
1356
 
1357
  public boolean equals(Item that) {
1358
    if (that == null)
1359
      return false;
1360
 
1361
    boolean this_present_id = true;
1362
    boolean that_present_id = true;
1363
    if (this_present_id || that_present_id) {
1364
      if (!(this_present_id && that_present_id))
1365
        return false;
1366
      if (this.id != that.id)
1367
        return false;
1368
    }
1369
 
510 rajveer 1370
    boolean this_present_manufacturerName = true && this.isSetManufacturerName();
1371
    boolean that_present_manufacturerName = true && that.isSetManufacturerName();
1372
    if (this_present_manufacturerName || that_present_manufacturerName) {
1373
      if (!(this_present_manufacturerName && that_present_manufacturerName))
483 rajveer 1374
        return false;
510 rajveer 1375
      if (!this.manufacturerName.equals(that.manufacturerName))
483 rajveer 1376
        return false;
1377
    }
1378
 
1379
    boolean this_present_modelNumber = true && this.isSetModelNumber();
1380
    boolean that_present_modelNumber = true && that.isSetModelNumber();
1381
    if (this_present_modelNumber || that_present_modelNumber) {
1382
      if (!(this_present_modelNumber && that_present_modelNumber))
1383
        return false;
1384
      if (!this.modelNumber.equals(that.modelNumber))
1385
        return false;
1386
    }
1387
 
1388
    boolean this_present_modelName = true && this.isSetModelName();
1389
    boolean that_present_modelName = true && that.isSetModelName();
1390
    if (this_present_modelName || that_present_modelName) {
1391
      if (!(this_present_modelName && that_present_modelName))
1392
        return false;
1393
      if (!this.modelName.equals(that.modelName))
1394
        return false;
1395
    }
1396
 
622 chandransh 1397
    boolean this_present_category = true;
1398
    boolean that_present_category = true;
483 rajveer 1399
    if (this_present_category || that_present_category) {
1400
      if (!(this_present_category && that_present_category))
1401
        return false;
622 chandransh 1402
      if (this.category != that.category)
483 rajveer 1403
        return false;
1404
    }
1405
 
1406
    boolean this_present_comments = true && this.isSetComments();
1407
    boolean that_present_comments = true && that.isSetComments();
1408
    if (this_present_comments || that_present_comments) {
1409
      if (!(this_present_comments && that_present_comments))
1410
        return false;
1411
      if (!this.comments.equals(that.comments))
1412
        return false;
1413
    }
1414
 
123 ashish 1415
    boolean this_present_catalogItemId = true;
1416
    boolean that_present_catalogItemId = true;
1417
    if (this_present_catalogItemId || that_present_catalogItemId) {
1418
      if (!(this_present_catalogItemId && that_present_catalogItemId))
100 ashish 1419
        return false;
123 ashish 1420
      if (this.catalogItemId != that.catalogItemId)
100 ashish 1421
        return false;
1422
    }
1423
 
483 rajveer 1424
    boolean this_present_vendorItemId = true && this.isSetVendorItemId();
1425
    boolean that_present_vendorItemId = true && that.isSetVendorItemId();
1426
    if (this_present_vendorItemId || that_present_vendorItemId) {
1427
      if (!(this_present_vendorItemId && that_present_vendorItemId))
1428
        return false;
1429
      if (!this.vendorItemId.equals(that.vendorItemId))
1430
        return false;
1431
    }
1432
 
1433
    boolean this_present_featureId = true;
1434
    boolean that_present_featureId = true;
1435
    if (this_present_featureId || that_present_featureId) {
1436
      if (!(this_present_featureId && that_present_featureId))
1437
        return false;
1438
      if (this.featureId != that.featureId)
1439
        return false;
1440
    }
1441
 
1442
    boolean this_present_featureDescription = true && this.isSetFeatureDescription();
1443
    boolean that_present_featureDescription = true && that.isSetFeatureDescription();
1444
    if (this_present_featureDescription || that_present_featureDescription) {
1445
      if (!(this_present_featureDescription && that_present_featureDescription))
1446
        return false;
1447
      if (!this.featureDescription.equals(that.featureDescription))
1448
        return false;
1449
    }
1450
 
100 ashish 1451
    boolean this_present_itemInventory = true && this.isSetItemInventory();
1452
    boolean that_present_itemInventory = true && that.isSetItemInventory();
1453
    if (this_present_itemInventory || that_present_itemInventory) {
1454
      if (!(this_present_itemInventory && that_present_itemInventory))
1455
        return false;
1456
      if (!this.itemInventory.equals(that.itemInventory))
1457
        return false;
1458
    }
1459
 
483 rajveer 1460
    boolean this_present_mrp = true;
1461
    boolean that_present_mrp = true;
1462
    if (this_present_mrp || that_present_mrp) {
1463
      if (!(this_present_mrp && that_present_mrp))
1464
        return false;
1465
      if (this.mrp != that.mrp)
1466
        return false;
1467
    }
1468
 
1469
    boolean this_present_mop = true;
1470
    boolean that_present_mop = true;
1471
    if (this_present_mop || that_present_mop) {
1472
      if (!(this_present_mop && that_present_mop))
1473
        return false;
1474
      if (this.mop != that.mop)
1475
        return false;
1476
    }
1477
 
1478
    boolean this_present_sellingPrice = true;
1479
    boolean that_present_sellingPrice = true;
1480
    if (this_present_sellingPrice || that_present_sellingPrice) {
1481
      if (!(this_present_sellingPrice && that_present_sellingPrice))
1482
        return false;
1483
      if (this.sellingPrice != that.sellingPrice)
1484
        return false;
1485
    }
1486
 
1487
    boolean this_present_weight = true;
1488
    boolean that_present_weight = true;
1489
    if (this_present_weight || that_present_weight) {
1490
      if (!(this_present_weight && that_present_weight))
1491
        return false;
1492
      if (this.weight != that.weight)
1493
        return false;
1494
    }
1495
 
103 ashish 1496
    boolean this_present_addedOn = true;
1497
    boolean that_present_addedOn = true;
1498
    if (this_present_addedOn || that_present_addedOn) {
1499
      if (!(this_present_addedOn && that_present_addedOn))
1500
        return false;
1501
      if (this.addedOn != that.addedOn)
1502
        return false;
1503
    }
1504
 
1505
    boolean this_present_startDate = true;
1506
    boolean that_present_startDate = true;
1507
    if (this_present_startDate || that_present_startDate) {
1508
      if (!(this_present_startDate && that_present_startDate))
1509
        return false;
1510
      if (this.startDate != that.startDate)
1511
        return false;
1512
    }
1513
 
483 rajveer 1514
    boolean this_present_retireDate = true;
1515
    boolean that_present_retireDate = true;
1516
    if (this_present_retireDate || that_present_retireDate) {
1517
      if (!(this_present_retireDate && that_present_retireDate))
1518
        return false;
1519
      if (this.retireDate != that.retireDate)
1520
        return false;
1521
    }
1522
 
103 ashish 1523
    boolean this_present_itemStatus = true && this.isSetItemStatus();
1524
    boolean that_present_itemStatus = true && that.isSetItemStatus();
1525
    if (this_present_itemStatus || that_present_itemStatus) {
1526
      if (!(this_present_itemStatus && that_present_itemStatus))
1527
        return false;
1528
      if (!this.itemStatus.equals(that.itemStatus))
1529
        return false;
1530
    }
1531
 
1532
    boolean this_present_otherInfo = true && this.isSetOtherInfo();
1533
    boolean that_present_otherInfo = true && that.isSetOtherInfo();
1534
    if (this_present_otherInfo || that_present_otherInfo) {
1535
      if (!(this_present_otherInfo && that_present_otherInfo))
1536
        return false;
1537
      if (!this.otherInfo.equals(that.otherInfo))
1538
        return false;
1539
    }
1540
 
607 chandransh 1541
    boolean this_present_bestDealText = true && this.isSetBestDealText();
1542
    boolean that_present_bestDealText = true && that.isSetBestDealText();
1543
    if (this_present_bestDealText || that_present_bestDealText) {
1544
      if (!(this_present_bestDealText && that_present_bestDealText))
1545
        return false;
1546
      if (!this.bestDealText.equals(that.bestDealText))
1547
        return false;
1548
    }
1549
 
1550
    boolean this_present_bestDealValue = true;
1551
    boolean that_present_bestDealValue = true;
1552
    if (this_present_bestDealValue || that_present_bestDealValue) {
1553
      if (!(this_present_bestDealValue && that_present_bestDealValue))
1554
        return false;
1555
      if (this.bestDealValue != that.bestDealValue)
1556
        return false;
1557
    }
1558
 
1559
    boolean this_present_dealerPrice = true;
1560
    boolean that_present_dealerPrice = true;
1561
    if (this_present_dealerPrice || that_present_dealerPrice) {
1562
      if (!(this_present_dealerPrice && that_present_dealerPrice))
1563
        return false;
1564
      if (this.dealerPrice != that.dealerPrice)
1565
        return false;
1566
    }
1567
 
1568
    boolean this_present_updatedOn = true;
1569
    boolean that_present_updatedOn = true;
1570
    if (this_present_updatedOn || that_present_updatedOn) {
1571
      if (!(this_present_updatedOn && that_present_updatedOn))
1572
        return false;
1573
      if (this.updatedOn != that.updatedOn)
1574
        return false;
1575
    }
1576
 
1577
    boolean this_present_color = true && this.isSetColor();
1578
    boolean that_present_color = true && that.isSetColor();
1579
    if (this_present_color || that_present_color) {
1580
      if (!(this_present_color && that_present_color))
1581
        return false;
1582
      if (!this.color.equals(that.color))
1583
        return false;
1584
    }
1585
 
100 ashish 1586
    return true;
1587
  }
1588
 
1589
  @Override
1590
  public int hashCode() {
1591
    return 0;
1592
  }
1593
 
1594
  public void read(TProtocol iprot) throws TException {
1595
    TField field;
1596
    iprot.readStructBegin();
1597
    while (true)
1598
    {
1599
      field = iprot.readFieldBegin();
1600
      if (field.type == TType.STOP) { 
1601
        break;
1602
      }
1603
      _Fields fieldId = _Fields.findByThriftId(field.id);
1604
      if (fieldId == null) {
1605
        TProtocolUtil.skip(iprot, field.type);
1606
      } else {
1607
        switch (fieldId) {
1608
          case ID:
1609
            if (field.type == TType.I64) {
1610
              this.id = iprot.readI64();
1611
              setIdIsSet(true);
1612
            } else { 
1613
              TProtocolUtil.skip(iprot, field.type);
1614
            }
1615
            break;
510 rajveer 1616
          case MANUFACTURER_NAME:
483 rajveer 1617
            if (field.type == TType.STRING) {
510 rajveer 1618
              this.manufacturerName = iprot.readString();
483 rajveer 1619
            } else { 
1620
              TProtocolUtil.skip(iprot, field.type);
1621
            }
1622
            break;
1623
          case MODEL_NUMBER:
1624
            if (field.type == TType.STRING) {
1625
              this.modelNumber = iprot.readString();
1626
            } else { 
1627
              TProtocolUtil.skip(iprot, field.type);
1628
            }
1629
            break;
1630
          case MODEL_NAME:
1631
            if (field.type == TType.STRING) {
1632
              this.modelName = iprot.readString();
1633
            } else { 
1634
              TProtocolUtil.skip(iprot, field.type);
1635
            }
1636
            break;
1637
          case CATEGORY:
622 chandransh 1638
            if (field.type == TType.I64) {
1639
              this.category = iprot.readI64();
1640
              setCategoryIsSet(true);
483 rajveer 1641
            } else { 
1642
              TProtocolUtil.skip(iprot, field.type);
1643
            }
1644
            break;
1645
          case COMMENTS:
1646
            if (field.type == TType.STRING) {
1647
              this.comments = iprot.readString();
1648
            } else { 
1649
              TProtocolUtil.skip(iprot, field.type);
1650
            }
1651
            break;
123 ashish 1652
          case CATALOG_ITEM_ID:
1653
            if (field.type == TType.I64) {
1654
              this.catalogItemId = iprot.readI64();
1655
              setCatalogItemIdIsSet(true);
100 ashish 1656
            } else { 
1657
              TProtocolUtil.skip(iprot, field.type);
1658
            }
1659
            break;
483 rajveer 1660
          case VENDOR_ITEM_ID:
1661
            if (field.type == TType.STRING) {
1662
              this.vendorItemId = iprot.readString();
1663
            } else { 
1664
              TProtocolUtil.skip(iprot, field.type);
1665
            }
1666
            break;
1667
          case FEATURE_ID:
1668
            if (field.type == TType.I64) {
1669
              this.featureId = iprot.readI64();
1670
              setFeatureIdIsSet(true);
1671
            } else { 
1672
              TProtocolUtil.skip(iprot, field.type);
1673
            }
1674
            break;
1675
          case FEATURE_DESCRIPTION:
1676
            if (field.type == TType.STRING) {
1677
              this.featureDescription = iprot.readString();
1678
            } else { 
1679
              TProtocolUtil.skip(iprot, field.type);
1680
            }
1681
            break;
103 ashish 1682
          case ITEM_INVENTORY:
100 ashish 1683
            if (field.type == TType.STRUCT) {
103 ashish 1684
              this.itemInventory = new ItemInventory();
1685
              this.itemInventory.read(iprot);
100 ashish 1686
            } else { 
1687
              TProtocolUtil.skip(iprot, field.type);
1688
            }
1689
            break;
483 rajveer 1690
          case MRP:
1691
            if (field.type == TType.DOUBLE) {
1692
              this.mrp = iprot.readDouble();
1693
              setMrpIsSet(true);
1694
            } else { 
1695
              TProtocolUtil.skip(iprot, field.type);
1696
            }
1697
            break;
1698
          case MOP:
1699
            if (field.type == TType.DOUBLE) {
1700
              this.mop = iprot.readDouble();
1701
              setMopIsSet(true);
1702
            } else { 
1703
              TProtocolUtil.skip(iprot, field.type);
1704
            }
1705
            break;
1706
          case SELLING_PRICE:
1707
            if (field.type == TType.DOUBLE) {
1708
              this.sellingPrice = iprot.readDouble();
1709
              setSellingPriceIsSet(true);
1710
            } else { 
1711
              TProtocolUtil.skip(iprot, field.type);
1712
            }
1713
            break;
1714
          case WEIGHT:
1715
            if (field.type == TType.DOUBLE) {
1716
              this.weight = iprot.readDouble();
1717
              setWeightIsSet(true);
1718
            } else { 
1719
              TProtocolUtil.skip(iprot, field.type);
1720
            }
1721
            break;
103 ashish 1722
          case ADDED_ON:
1723
            if (field.type == TType.I64) {
1724
              this.addedOn = iprot.readI64();
1725
              setAddedOnIsSet(true);
100 ashish 1726
            } else { 
1727
              TProtocolUtil.skip(iprot, field.type);
1728
            }
1729
            break;
103 ashish 1730
          case START_DATE:
1731
            if (field.type == TType.I64) {
1732
              this.startDate = iprot.readI64();
1733
              setStartDateIsSet(true);
1734
            } else { 
1735
              TProtocolUtil.skip(iprot, field.type);
1736
            }
1737
            break;
483 rajveer 1738
          case RETIRE_DATE:
1739
            if (field.type == TType.I64) {
1740
              this.retireDate = iprot.readI64();
1741
              setRetireDateIsSet(true);
1742
            } else { 
1743
              TProtocolUtil.skip(iprot, field.type);
1744
            }
1745
            break;
103 ashish 1746
          case ITEM_STATUS:
1747
            if (field.type == TType.I32) {
1748
              this.itemStatus = status.findByValue(iprot.readI32());
1749
            } else { 
1750
              TProtocolUtil.skip(iprot, field.type);
1751
            }
1752
            break;
1753
          case OTHER_INFO:
1754
            if (field.type == TType.MAP) {
1755
              {
123 ashish 1756
                TMap _map5 = iprot.readMapBegin();
1757
                this.otherInfo = new HashMap<String,String>(2*_map5.size);
1758
                for (int _i6 = 0; _i6 < _map5.size; ++_i6)
103 ashish 1759
                {
123 ashish 1760
                  String _key7;
1761
                  String _val8;
1762
                  _key7 = iprot.readString();
1763
                  _val8 = iprot.readString();
1764
                  this.otherInfo.put(_key7, _val8);
103 ashish 1765
                }
1766
                iprot.readMapEnd();
1767
              }
1768
            } else { 
1769
              TProtocolUtil.skip(iprot, field.type);
1770
            }
1771
            break;
607 chandransh 1772
          case BEST_DEAL_TEXT:
1773
            if (field.type == TType.STRING) {
1774
              this.bestDealText = iprot.readString();
1775
            } else { 
1776
              TProtocolUtil.skip(iprot, field.type);
1777
            }
1778
            break;
1779
          case BEST_DEAL_VALUE:
1780
            if (field.type == TType.DOUBLE) {
1781
              this.bestDealValue = iprot.readDouble();
1782
              setBestDealValueIsSet(true);
1783
            } else { 
1784
              TProtocolUtil.skip(iprot, field.type);
1785
            }
1786
            break;
1787
          case DEALER_PRICE:
1788
            if (field.type == TType.DOUBLE) {
1789
              this.dealerPrice = iprot.readDouble();
1790
              setDealerPriceIsSet(true);
1791
            } else { 
1792
              TProtocolUtil.skip(iprot, field.type);
1793
            }
1794
            break;
1795
          case UPDATED_ON:
1796
            if (field.type == TType.I64) {
1797
              this.updatedOn = iprot.readI64();
1798
              setUpdatedOnIsSet(true);
1799
            } else { 
1800
              TProtocolUtil.skip(iprot, field.type);
1801
            }
1802
            break;
1803
          case COLOR:
1804
            if (field.type == TType.STRING) {
1805
              this.color = iprot.readString();
1806
            } else { 
1807
              TProtocolUtil.skip(iprot, field.type);
1808
            }
1809
            break;
100 ashish 1810
        }
1811
        iprot.readFieldEnd();
1812
      }
1813
    }
1814
    iprot.readStructEnd();
1815
    validate();
1816
  }
1817
 
1818
  public void write(TProtocol oprot) throws TException {
1819
    validate();
1820
 
1821
    oprot.writeStructBegin(STRUCT_DESC);
1822
    oprot.writeFieldBegin(ID_FIELD_DESC);
1823
    oprot.writeI64(this.id);
1824
    oprot.writeFieldEnd();
510 rajveer 1825
    if (this.manufacturerName != null) {
1826
      oprot.writeFieldBegin(MANUFACTURER_NAME_FIELD_DESC);
1827
      oprot.writeString(this.manufacturerName);
483 rajveer 1828
      oprot.writeFieldEnd();
1829
    }
1830
    if (this.modelNumber != null) {
1831
      oprot.writeFieldBegin(MODEL_NUMBER_FIELD_DESC);
1832
      oprot.writeString(this.modelNumber);
1833
      oprot.writeFieldEnd();
1834
    }
1835
    if (this.modelName != null) {
1836
      oprot.writeFieldBegin(MODEL_NAME_FIELD_DESC);
1837
      oprot.writeString(this.modelName);
1838
      oprot.writeFieldEnd();
1839
    }
622 chandransh 1840
    oprot.writeFieldBegin(CATEGORY_FIELD_DESC);
1841
    oprot.writeI64(this.category);
1842
    oprot.writeFieldEnd();
483 rajveer 1843
    if (this.comments != null) {
1844
      oprot.writeFieldBegin(COMMENTS_FIELD_DESC);
1845
      oprot.writeString(this.comments);
1846
      oprot.writeFieldEnd();
1847
    }
123 ashish 1848
    oprot.writeFieldBegin(CATALOG_ITEM_ID_FIELD_DESC);
1849
    oprot.writeI64(this.catalogItemId);
1850
    oprot.writeFieldEnd();
483 rajveer 1851
    if (this.vendorItemId != null) {
1852
      oprot.writeFieldBegin(VENDOR_ITEM_ID_FIELD_DESC);
1853
      oprot.writeString(this.vendorItemId);
1854
      oprot.writeFieldEnd();
1855
    }
1856
    oprot.writeFieldBegin(FEATURE_ID_FIELD_DESC);
1857
    oprot.writeI64(this.featureId);
1858
    oprot.writeFieldEnd();
1859
    if (this.featureDescription != null) {
1860
      oprot.writeFieldBegin(FEATURE_DESCRIPTION_FIELD_DESC);
1861
      oprot.writeString(this.featureDescription);
1862
      oprot.writeFieldEnd();
1863
    }
100 ashish 1864
    if (this.itemInventory != null) {
1865
      oprot.writeFieldBegin(ITEM_INVENTORY_FIELD_DESC);
1866
      this.itemInventory.write(oprot);
1867
      oprot.writeFieldEnd();
1868
    }
483 rajveer 1869
    oprot.writeFieldBegin(MRP_FIELD_DESC);
1870
    oprot.writeDouble(this.mrp);
1871
    oprot.writeFieldEnd();
1872
    oprot.writeFieldBegin(MOP_FIELD_DESC);
1873
    oprot.writeDouble(this.mop);
1874
    oprot.writeFieldEnd();
1875
    oprot.writeFieldBegin(SELLING_PRICE_FIELD_DESC);
1876
    oprot.writeDouble(this.sellingPrice);
1877
    oprot.writeFieldEnd();
1878
    oprot.writeFieldBegin(WEIGHT_FIELD_DESC);
1879
    oprot.writeDouble(this.weight);
1880
    oprot.writeFieldEnd();
103 ashish 1881
    oprot.writeFieldBegin(ADDED_ON_FIELD_DESC);
1882
    oprot.writeI64(this.addedOn);
1883
    oprot.writeFieldEnd();
1884
    oprot.writeFieldBegin(START_DATE_FIELD_DESC);
1885
    oprot.writeI64(this.startDate);
1886
    oprot.writeFieldEnd();
483 rajveer 1887
    oprot.writeFieldBegin(RETIRE_DATE_FIELD_DESC);
1888
    oprot.writeI64(this.retireDate);
1889
    oprot.writeFieldEnd();
103 ashish 1890
    if (this.itemStatus != null) {
1891
      oprot.writeFieldBegin(ITEM_STATUS_FIELD_DESC);
1892
      oprot.writeI32(this.itemStatus.getValue());
1893
      oprot.writeFieldEnd();
1894
    }
1895
    if (this.otherInfo != null) {
1896
      oprot.writeFieldBegin(OTHER_INFO_FIELD_DESC);
1897
      {
1898
        oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.otherInfo.size()));
483 rajveer 1899
        for (Map.Entry<String, String> _iter9 : this.otherInfo.entrySet())
103 ashish 1900
        {
483 rajveer 1901
          oprot.writeString(_iter9.getKey());
1902
          oprot.writeString(_iter9.getValue());
103 ashish 1903
        }
1904
        oprot.writeMapEnd();
1905
      }
1906
      oprot.writeFieldEnd();
1907
    }
607 chandransh 1908
    if (this.bestDealText != null) {
1909
      oprot.writeFieldBegin(BEST_DEAL_TEXT_FIELD_DESC);
1910
      oprot.writeString(this.bestDealText);
1911
      oprot.writeFieldEnd();
1912
    }
1913
    oprot.writeFieldBegin(BEST_DEAL_VALUE_FIELD_DESC);
1914
    oprot.writeDouble(this.bestDealValue);
1915
    oprot.writeFieldEnd();
1916
    oprot.writeFieldBegin(DEALER_PRICE_FIELD_DESC);
1917
    oprot.writeDouble(this.dealerPrice);
1918
    oprot.writeFieldEnd();
1919
    oprot.writeFieldBegin(UPDATED_ON_FIELD_DESC);
1920
    oprot.writeI64(this.updatedOn);
1921
    oprot.writeFieldEnd();
1922
    if (this.color != null) {
1923
      oprot.writeFieldBegin(COLOR_FIELD_DESC);
1924
      oprot.writeString(this.color);
1925
      oprot.writeFieldEnd();
1926
    }
100 ashish 1927
    oprot.writeFieldStop();
1928
    oprot.writeStructEnd();
1929
  }
1930
 
1931
  @Override
1932
  public String toString() {
1933
    StringBuilder sb = new StringBuilder("Item(");
1934
    boolean first = true;
1935
 
1936
    sb.append("id:");
1937
    sb.append(this.id);
1938
    first = false;
1939
    if (!first) sb.append(", ");
510 rajveer 1940
    sb.append("manufacturerName:");
1941
    if (this.manufacturerName == null) {
483 rajveer 1942
      sb.append("null");
1943
    } else {
510 rajveer 1944
      sb.append(this.manufacturerName);
483 rajveer 1945
    }
1946
    first = false;
1947
    if (!first) sb.append(", ");
1948
    sb.append("modelNumber:");
1949
    if (this.modelNumber == null) {
1950
      sb.append("null");
1951
    } else {
1952
      sb.append(this.modelNumber);
1953
    }
1954
    first = false;
1955
    if (!first) sb.append(", ");
1956
    sb.append("modelName:");
1957
    if (this.modelName == null) {
1958
      sb.append("null");
1959
    } else {
1960
      sb.append(this.modelName);
1961
    }
1962
    first = false;
1963
    if (!first) sb.append(", ");
1964
    sb.append("category:");
622 chandransh 1965
    sb.append(this.category);
483 rajveer 1966
    first = false;
1967
    if (!first) sb.append(", ");
1968
    sb.append("comments:");
1969
    if (this.comments == null) {
1970
      sb.append("null");
1971
    } else {
1972
      sb.append(this.comments);
1973
    }
1974
    first = false;
1975
    if (!first) sb.append(", ");
123 ashish 1976
    sb.append("catalogItemId:");
1977
    sb.append(this.catalogItemId);
100 ashish 1978
    first = false;
1979
    if (!first) sb.append(", ");
483 rajveer 1980
    sb.append("vendorItemId:");
1981
    if (this.vendorItemId == null) {
1982
      sb.append("null");
1983
    } else {
1984
      sb.append(this.vendorItemId);
1985
    }
1986
    first = false;
1987
    if (!first) sb.append(", ");
1988
    sb.append("featureId:");
1989
    sb.append(this.featureId);
1990
    first = false;
1991
    if (!first) sb.append(", ");
1992
    sb.append("featureDescription:");
1993
    if (this.featureDescription == null) {
1994
      sb.append("null");
1995
    } else {
1996
      sb.append(this.featureDescription);
1997
    }
1998
    first = false;
1999
    if (!first) sb.append(", ");
100 ashish 2000
    sb.append("itemInventory:");
2001
    if (this.itemInventory == null) {
2002
      sb.append("null");
2003
    } else {
2004
      sb.append(this.itemInventory);
2005
    }
2006
    first = false;
103 ashish 2007
    if (!first) sb.append(", ");
483 rajveer 2008
    sb.append("mrp:");
2009
    sb.append(this.mrp);
2010
    first = false;
2011
    if (!first) sb.append(", ");
2012
    sb.append("mop:");
2013
    sb.append(this.mop);
2014
    first = false;
2015
    if (!first) sb.append(", ");
2016
    sb.append("sellingPrice:");
2017
    sb.append(this.sellingPrice);
2018
    first = false;
2019
    if (!first) sb.append(", ");
2020
    sb.append("weight:");
2021
    sb.append(this.weight);
2022
    first = false;
2023
    if (!first) sb.append(", ");
103 ashish 2024
    sb.append("addedOn:");
2025
    sb.append(this.addedOn);
2026
    first = false;
2027
    if (!first) sb.append(", ");
2028
    sb.append("startDate:");
2029
    sb.append(this.startDate);
2030
    first = false;
2031
    if (!first) sb.append(", ");
483 rajveer 2032
    sb.append("retireDate:");
2033
    sb.append(this.retireDate);
2034
    first = false;
2035
    if (!first) sb.append(", ");
103 ashish 2036
    sb.append("itemStatus:");
2037
    if (this.itemStatus == null) {
2038
      sb.append("null");
2039
    } else {
2040
      String itemStatus_name = itemStatus.name();
2041
      if (itemStatus_name != null) {
2042
        sb.append(itemStatus_name);
2043
        sb.append(" (");
2044
      }
2045
      sb.append(this.itemStatus);
2046
      if (itemStatus_name != null) {
2047
        sb.append(")");
2048
      }
2049
    }
2050
    first = false;
2051
    if (!first) sb.append(", ");
2052
    sb.append("otherInfo:");
2053
    if (this.otherInfo == null) {
2054
      sb.append("null");
2055
    } else {
2056
      sb.append(this.otherInfo);
2057
    }
2058
    first = false;
607 chandransh 2059
    if (!first) sb.append(", ");
2060
    sb.append("bestDealText:");
2061
    if (this.bestDealText == null) {
2062
      sb.append("null");
2063
    } else {
2064
      sb.append(this.bestDealText);
2065
    }
2066
    first = false;
2067
    if (!first) sb.append(", ");
2068
    sb.append("bestDealValue:");
2069
    sb.append(this.bestDealValue);
2070
    first = false;
2071
    if (!first) sb.append(", ");
2072
    sb.append("dealerPrice:");
2073
    sb.append(this.dealerPrice);
2074
    first = false;
2075
    if (!first) sb.append(", ");
2076
    sb.append("updatedOn:");
2077
    sb.append(this.updatedOn);
2078
    first = false;
2079
    if (!first) sb.append(", ");
2080
    sb.append("color:");
2081
    if (this.color == null) {
2082
      sb.append("null");
2083
    } else {
2084
      sb.append(this.color);
2085
    }
2086
    first = false;
100 ashish 2087
    sb.append(")");
2088
    return sb.toString();
2089
  }
2090
 
2091
  public void validate() throws TException {
2092
    // check for required fields
2093
  }
2094
 
2095
}
2096