Subversion Repositories SmartDukaan

Rev

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