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