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