Subversion Repositories SmartDukaan

Rev

Rev 1329 | Rev 2034 | 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);
1910 varun.gupt 54
  private static final TField DEFAULT_FOR_ENTITY_FIELD_DESC = new TField("defaultForEntity", TType.BOOL, (short)26);
55
  private static final TField UPDATED_ON_FIELD_DESC = new TField("updatedOn", TType.I64, (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;
1329 chandransh 62
  private String color;
622 chandransh 63
  private long category;
483 rajveer 64
  private String comments;
123 ashish 65
  private long catalogItemId;
483 rajveer 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;
1910 varun.gupt 82
  private boolean defaultForEntity;
607 chandransh 83
  private long updatedOn;
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"),
1329 chandransh 92
    COLOR((short)6, "color"),
93
    CATEGORY((short)7, "category"),
94
    COMMENTS((short)8, "comments"),
95
    CATALOG_ITEM_ID((short)9, "catalogItemId"),
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"),
1910 varun.gupt 116
    DEFAULT_FOR_ENTITY((short)26, "defaultForEntity"),
117
    UPDATED_ON((short)27, "updatedOn");
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;
1910 varun.gupt 185
  private static final int __DEFAULTFORENTITY_ISSET_ID = 14;
186
  private static final int __UPDATEDON_ISSET_ID = 15;
187
  private BitSet __isset_bit_vector = new BitSet(16);
100 ashish 188
 
189
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
190
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
191
        new FieldValueMetaData(TType.I64)));
957 chandransh 192
    put(_Fields.PRODUCT_GROUP, new FieldMetaData("productGroup", TFieldRequirementType.DEFAULT, 
483 rajveer 193
        new FieldValueMetaData(TType.STRING)));
957 chandransh 194
    put(_Fields.BRAND, new FieldMetaData("brand", TFieldRequirementType.DEFAULT, 
195
        new FieldValueMetaData(TType.STRING)));
483 rajveer 196
    put(_Fields.MODEL_NUMBER, new FieldMetaData("modelNumber", TFieldRequirementType.DEFAULT, 
197
        new FieldValueMetaData(TType.STRING)));
198
    put(_Fields.MODEL_NAME, new FieldMetaData("modelName", TFieldRequirementType.DEFAULT, 
199
        new FieldValueMetaData(TType.STRING)));
1329 chandransh 200
    put(_Fields.COLOR, new FieldMetaData("color", TFieldRequirementType.DEFAULT, 
201
        new FieldValueMetaData(TType.STRING)));
483 rajveer 202
    put(_Fields.CATEGORY, new FieldMetaData("category", TFieldRequirementType.DEFAULT, 
622 chandransh 203
        new FieldValueMetaData(TType.I64)));
483 rajveer 204
    put(_Fields.COMMENTS, new FieldMetaData("comments", TFieldRequirementType.DEFAULT, 
205
        new FieldValueMetaData(TType.STRING)));
123 ashish 206
    put(_Fields.CATALOG_ITEM_ID, new FieldMetaData("catalogItemId", TFieldRequirementType.DEFAULT, 
207
        new FieldValueMetaData(TType.I64)));
483 rajveer 208
    put(_Fields.FEATURE_ID, new FieldMetaData("featureId", TFieldRequirementType.DEFAULT, 
209
        new FieldValueMetaData(TType.I64)));
210
    put(_Fields.FEATURE_DESCRIPTION, new FieldMetaData("featureDescription", TFieldRequirementType.DEFAULT, 
211
        new FieldValueMetaData(TType.STRING)));
100 ashish 212
    put(_Fields.ITEM_INVENTORY, new FieldMetaData("itemInventory", TFieldRequirementType.DEFAULT, 
213
        new StructMetaData(TType.STRUCT, ItemInventory.class)));
483 rajveer 214
    put(_Fields.MRP, new FieldMetaData("mrp", TFieldRequirementType.DEFAULT, 
215
        new FieldValueMetaData(TType.DOUBLE)));
216
    put(_Fields.MOP, new FieldMetaData("mop", TFieldRequirementType.DEFAULT, 
217
        new FieldValueMetaData(TType.DOUBLE)));
218
    put(_Fields.SELLING_PRICE, new FieldMetaData("sellingPrice", TFieldRequirementType.DEFAULT, 
219
        new FieldValueMetaData(TType.DOUBLE)));
721 chandransh 220
    put(_Fields.TRANSFER_PRICE, new FieldMetaData("transferPrice", TFieldRequirementType.DEFAULT, 
221
        new FieldValueMetaData(TType.DOUBLE)));
483 rajveer 222
    put(_Fields.WEIGHT, new FieldMetaData("weight", TFieldRequirementType.DEFAULT, 
223
        new FieldValueMetaData(TType.DOUBLE)));
103 ashish 224
    put(_Fields.ADDED_ON, new FieldMetaData("addedOn", TFieldRequirementType.DEFAULT, 
225
        new FieldValueMetaData(TType.I64)));
226
    put(_Fields.START_DATE, new FieldMetaData("startDate", TFieldRequirementType.DEFAULT, 
227
        new FieldValueMetaData(TType.I64)));
483 rajveer 228
    put(_Fields.RETIRE_DATE, new FieldMetaData("retireDate", TFieldRequirementType.DEFAULT, 
229
        new FieldValueMetaData(TType.I64)));
103 ashish 230
    put(_Fields.ITEM_STATUS, new FieldMetaData("itemStatus", TFieldRequirementType.DEFAULT, 
231
        new EnumMetaData(TType.ENUM, status.class)));
232
    put(_Fields.OTHER_INFO, new FieldMetaData("otherInfo", TFieldRequirementType.DEFAULT, 
233
        new MapMetaData(TType.MAP, 
234
            new FieldValueMetaData(TType.STRING), 
235
            new FieldValueMetaData(TType.STRING))));
607 chandransh 236
    put(_Fields.BEST_DEAL_TEXT, new FieldMetaData("bestDealText", TFieldRequirementType.DEFAULT, 
237
        new FieldValueMetaData(TType.STRING)));
238
    put(_Fields.BEST_DEAL_VALUE, new FieldMetaData("bestDealValue", TFieldRequirementType.DEFAULT, 
239
        new FieldValueMetaData(TType.DOUBLE)));
240
    put(_Fields.DEALER_PRICE, new FieldMetaData("dealerPrice", TFieldRequirementType.DEFAULT, 
241
        new FieldValueMetaData(TType.DOUBLE)));
1910 varun.gupt 242
    put(_Fields.DEFAULT_FOR_ENTITY, new FieldMetaData("defaultForEntity", TFieldRequirementType.DEFAULT, 
243
        new FieldValueMetaData(TType.BOOL)));
607 chandransh 244
    put(_Fields.UPDATED_ON, new FieldMetaData("updatedOn", TFieldRequirementType.DEFAULT, 
245
        new FieldValueMetaData(TType.I64)));
100 ashish 246
  }});
247
 
248
  static {
249
    FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
250
  }
251
 
252
  public Item() {
253
  }
254
 
255
  public Item(
256
    long id,
957 chandransh 257
    String productGroup,
258
    String brand,
483 rajveer 259
    String modelNumber,
260
    String modelName,
1329 chandransh 261
    String color,
622 chandransh 262
    long category,
483 rajveer 263
    String comments,
123 ashish 264
    long catalogItemId,
483 rajveer 265
    long featureId,
266
    String featureDescription,
103 ashish 267
    ItemInventory itemInventory,
483 rajveer 268
    double mrp,
269
    double mop,
270
    double sellingPrice,
721 chandransh 271
    double transferPrice,
483 rajveer 272
    double weight,
103 ashish 273
    long addedOn,
274
    long startDate,
483 rajveer 275
    long retireDate,
103 ashish 276
    status itemStatus,
607 chandransh 277
    Map<String,String> otherInfo,
278
    String bestDealText,
279
    double bestDealValue,
280
    double dealerPrice,
1910 varun.gupt 281
    boolean defaultForEntity,
1329 chandransh 282
    long updatedOn)
100 ashish 283
  {
284
    this();
285
    this.id = id;
286
    setIdIsSet(true);
957 chandransh 287
    this.productGroup = productGroup;
288
    this.brand = brand;
483 rajveer 289
    this.modelNumber = modelNumber;
290
    this.modelName = modelName;
1329 chandransh 291
    this.color = color;
483 rajveer 292
    this.category = category;
622 chandransh 293
    setCategoryIsSet(true);
483 rajveer 294
    this.comments = comments;
123 ashish 295
    this.catalogItemId = catalogItemId;
296
    setCatalogItemIdIsSet(true);
483 rajveer 297
    this.featureId = featureId;
298
    setFeatureIdIsSet(true);
299
    this.featureDescription = featureDescription;
100 ashish 300
    this.itemInventory = itemInventory;
483 rajveer 301
    this.mrp = mrp;
302
    setMrpIsSet(true);
303
    this.mop = mop;
304
    setMopIsSet(true);
305
    this.sellingPrice = sellingPrice;
306
    setSellingPriceIsSet(true);
721 chandransh 307
    this.transferPrice = transferPrice;
308
    setTransferPriceIsSet(true);
483 rajveer 309
    this.weight = weight;
310
    setWeightIsSet(true);
103 ashish 311
    this.addedOn = addedOn;
312
    setAddedOnIsSet(true);
313
    this.startDate = startDate;
314
    setStartDateIsSet(true);
483 rajveer 315
    this.retireDate = retireDate;
316
    setRetireDateIsSet(true);
103 ashish 317
    this.itemStatus = itemStatus;
318
    this.otherInfo = otherInfo;
607 chandransh 319
    this.bestDealText = bestDealText;
320
    this.bestDealValue = bestDealValue;
321
    setBestDealValueIsSet(true);
322
    this.dealerPrice = dealerPrice;
323
    setDealerPriceIsSet(true);
1910 varun.gupt 324
    this.defaultForEntity = defaultForEntity;
325
    setDefaultForEntityIsSet(true);
607 chandransh 326
    this.updatedOn = updatedOn;
327
    setUpdatedOnIsSet(true);
100 ashish 328
  }
329
 
330
  /**
331
   * Performs a deep copy on <i>other</i>.
332
   */
333
  public Item(Item other) {
334
    __isset_bit_vector.clear();
335
    __isset_bit_vector.or(other.__isset_bit_vector);
336
    this.id = other.id;
957 chandransh 337
    if (other.isSetProductGroup()) {
338
      this.productGroup = other.productGroup;
483 rajveer 339
    }
957 chandransh 340
    if (other.isSetBrand()) {
341
      this.brand = other.brand;
342
    }
483 rajveer 343
    if (other.isSetModelNumber()) {
344
      this.modelNumber = other.modelNumber;
345
    }
346
    if (other.isSetModelName()) {
347
      this.modelName = other.modelName;
348
    }
1329 chandransh 349
    if (other.isSetColor()) {
350
      this.color = other.color;
351
    }
622 chandransh 352
    this.category = other.category;
483 rajveer 353
    if (other.isSetComments()) {
354
      this.comments = other.comments;
355
    }
123 ashish 356
    this.catalogItemId = other.catalogItemId;
483 rajveer 357
    this.featureId = other.featureId;
358
    if (other.isSetFeatureDescription()) {
359
      this.featureDescription = other.featureDescription;
360
    }
100 ashish 361
    if (other.isSetItemInventory()) {
362
      this.itemInventory = new ItemInventory(other.itemInventory);
363
    }
483 rajveer 364
    this.mrp = other.mrp;
365
    this.mop = other.mop;
366
    this.sellingPrice = other.sellingPrice;
721 chandransh 367
    this.transferPrice = other.transferPrice;
483 rajveer 368
    this.weight = other.weight;
103 ashish 369
    this.addedOn = other.addedOn;
370
    this.startDate = other.startDate;
483 rajveer 371
    this.retireDate = other.retireDate;
103 ashish 372
    if (other.isSetItemStatus()) {
373
      this.itemStatus = other.itemStatus;
374
    }
375
    if (other.isSetOtherInfo()) {
376
      Map<String,String> __this__otherInfo = new HashMap<String,String>();
377
      for (Map.Entry<String, String> other_element : other.otherInfo.entrySet()) {
378
 
379
        String other_element_key = other_element.getKey();
380
        String other_element_value = other_element.getValue();
381
 
382
        String __this__otherInfo_copy_key = other_element_key;
383
 
384
        String __this__otherInfo_copy_value = other_element_value;
385
 
386
        __this__otherInfo.put(__this__otherInfo_copy_key, __this__otherInfo_copy_value);
387
      }
388
      this.otherInfo = __this__otherInfo;
389
    }
607 chandransh 390
    if (other.isSetBestDealText()) {
391
      this.bestDealText = other.bestDealText;
392
    }
393
    this.bestDealValue = other.bestDealValue;
394
    this.dealerPrice = other.dealerPrice;
1910 varun.gupt 395
    this.defaultForEntity = other.defaultForEntity;
607 chandransh 396
    this.updatedOn = other.updatedOn;
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
 
1329 chandransh 527
  public String getColor() {
528
    return this.color;
529
  }
530
 
531
  public Item setColor(String color) {
532
    this.color = color;
533
    return this;
534
  }
535
 
536
  public void unsetColor() {
537
    this.color = null;
538
  }
539
 
540
  /** Returns true if field color is set (has been asigned a value) and false otherwise */
541
  public boolean isSetColor() {
542
    return this.color != null;
543
  }
544
 
545
  public void setColorIsSet(boolean value) {
546
    if (!value) {
547
      this.color = null;
548
    }
549
  }
550
 
622 chandransh 551
  public long getCategory() {
483 rajveer 552
    return this.category;
553
  }
554
 
622 chandransh 555
  public Item setCategory(long category) {
483 rajveer 556
    this.category = category;
622 chandransh 557
    setCategoryIsSet(true);
483 rajveer 558
    return this;
559
  }
560
 
561
  public void unsetCategory() {
622 chandransh 562
    __isset_bit_vector.clear(__CATEGORY_ISSET_ID);
483 rajveer 563
  }
564
 
565
  /** Returns true if field category is set (has been asigned a value) and false otherwise */
566
  public boolean isSetCategory() {
622 chandransh 567
    return __isset_bit_vector.get(__CATEGORY_ISSET_ID);
483 rajveer 568
  }
569
 
570
  public void setCategoryIsSet(boolean value) {
622 chandransh 571
    __isset_bit_vector.set(__CATEGORY_ISSET_ID, value);
483 rajveer 572
  }
573
 
574
  public String getComments() {
575
    return this.comments;
576
  }
577
 
578
  public Item setComments(String comments) {
579
    this.comments = comments;
580
    return this;
581
  }
582
 
583
  public void unsetComments() {
584
    this.comments = null;
585
  }
586
 
587
  /** Returns true if field comments is set (has been asigned a value) and false otherwise */
588
  public boolean isSetComments() {
589
    return this.comments != null;
590
  }
591
 
592
  public void setCommentsIsSet(boolean value) {
593
    if (!value) {
594
      this.comments = null;
595
    }
596
  }
597
 
123 ashish 598
  public long getCatalogItemId() {
599
    return this.catalogItemId;
100 ashish 600
  }
601
 
123 ashish 602
  public Item setCatalogItemId(long catalogItemId) {
603
    this.catalogItemId = catalogItemId;
604
    setCatalogItemIdIsSet(true);
100 ashish 605
    return this;
606
  }
607
 
123 ashish 608
  public void unsetCatalogItemId() {
609
    __isset_bit_vector.clear(__CATALOGITEMID_ISSET_ID);
100 ashish 610
  }
611
 
123 ashish 612
  /** Returns true if field catalogItemId is set (has been asigned a value) and false otherwise */
613
  public boolean isSetCatalogItemId() {
614
    return __isset_bit_vector.get(__CATALOGITEMID_ISSET_ID);
100 ashish 615
  }
616
 
123 ashish 617
  public void setCatalogItemIdIsSet(boolean value) {
618
    __isset_bit_vector.set(__CATALOGITEMID_ISSET_ID, value);
100 ashish 619
  }
620
 
483 rajveer 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
 
1910 varun.gupt 1013
  public boolean isDefaultForEntity() {
1014
    return this.defaultForEntity;
1015
  }
1016
 
1017
  public Item setDefaultForEntity(boolean defaultForEntity) {
1018
    this.defaultForEntity = defaultForEntity;
1019
    setDefaultForEntityIsSet(true);
1020
    return this;
1021
  }
1022
 
1023
  public void unsetDefaultForEntity() {
1024
    __isset_bit_vector.clear(__DEFAULTFORENTITY_ISSET_ID);
1025
  }
1026
 
1027
  /** Returns true if field defaultForEntity is set (has been asigned a value) and false otherwise */
1028
  public boolean isSetDefaultForEntity() {
1029
    return __isset_bit_vector.get(__DEFAULTFORENTITY_ISSET_ID);
1030
  }
1031
 
1032
  public void setDefaultForEntityIsSet(boolean value) {
1033
    __isset_bit_vector.set(__DEFAULTFORENTITY_ISSET_ID, value);
1034
  }
1035
 
607 chandransh 1036
  public long getUpdatedOn() {
1037
    return this.updatedOn;
1038
  }
1039
 
1040
  public Item setUpdatedOn(long updatedOn) {
1041
    this.updatedOn = updatedOn;
1042
    setUpdatedOnIsSet(true);
1043
    return this;
1044
  }
1045
 
1046
  public void unsetUpdatedOn() {
1047
    __isset_bit_vector.clear(__UPDATEDON_ISSET_ID);
1048
  }
1049
 
1050
  /** Returns true if field updatedOn is set (has been asigned a value) and false otherwise */
1051
  public boolean isSetUpdatedOn() {
1052
    return __isset_bit_vector.get(__UPDATEDON_ISSET_ID);
1053
  }
1054
 
1055
  public void setUpdatedOnIsSet(boolean value) {
1056
    __isset_bit_vector.set(__UPDATEDON_ISSET_ID, value);
1057
  }
1058
 
100 ashish 1059
  public void setFieldValue(_Fields field, Object value) {
1060
    switch (field) {
1061
    case ID:
1062
      if (value == null) {
1063
        unsetId();
1064
      } else {
1065
        setId((Long)value);
1066
      }
1067
      break;
1068
 
957 chandransh 1069
    case PRODUCT_GROUP:
483 rajveer 1070
      if (value == null) {
957 chandransh 1071
        unsetProductGroup();
483 rajveer 1072
      } else {
957 chandransh 1073
        setProductGroup((String)value);
483 rajveer 1074
      }
1075
      break;
1076
 
957 chandransh 1077
    case BRAND:
1078
      if (value == null) {
1079
        unsetBrand();
1080
      } else {
1081
        setBrand((String)value);
1082
      }
1083
      break;
1084
 
483 rajveer 1085
    case MODEL_NUMBER:
1086
      if (value == null) {
1087
        unsetModelNumber();
1088
      } else {
1089
        setModelNumber((String)value);
1090
      }
1091
      break;
1092
 
1093
    case MODEL_NAME:
1094
      if (value == null) {
1095
        unsetModelName();
1096
      } else {
1097
        setModelName((String)value);
1098
      }
1099
      break;
1100
 
1329 chandransh 1101
    case COLOR:
1102
      if (value == null) {
1103
        unsetColor();
1104
      } else {
1105
        setColor((String)value);
1106
      }
1107
      break;
1108
 
483 rajveer 1109
    case CATEGORY:
1110
      if (value == null) {
1111
        unsetCategory();
1112
      } else {
622 chandransh 1113
        setCategory((Long)value);
483 rajveer 1114
      }
1115
      break;
1116
 
1117
    case COMMENTS:
1118
      if (value == null) {
1119
        unsetComments();
1120
      } else {
1121
        setComments((String)value);
1122
      }
1123
      break;
1124
 
123 ashish 1125
    case CATALOG_ITEM_ID:
100 ashish 1126
      if (value == null) {
123 ashish 1127
        unsetCatalogItemId();
100 ashish 1128
      } else {
123 ashish 1129
        setCatalogItemId((Long)value);
100 ashish 1130
      }
1131
      break;
1132
 
483 rajveer 1133
    case FEATURE_ID:
100 ashish 1134
      if (value == null) {
483 rajveer 1135
        unsetFeatureId();
100 ashish 1136
      } else {
483 rajveer 1137
        setFeatureId((Long)value);
100 ashish 1138
      }
1139
      break;
1140
 
483 rajveer 1141
    case FEATURE_DESCRIPTION:
103 ashish 1142
      if (value == null) {
483 rajveer 1143
        unsetFeatureDescription();
103 ashish 1144
      } else {
483 rajveer 1145
        setFeatureDescription((String)value);
103 ashish 1146
      }
1147
      break;
1148
 
483 rajveer 1149
    case ITEM_INVENTORY:
103 ashish 1150
      if (value == null) {
483 rajveer 1151
        unsetItemInventory();
103 ashish 1152
      } else {
483 rajveer 1153
        setItemInventory((ItemInventory)value);
103 ashish 1154
      }
1155
      break;
1156
 
483 rajveer 1157
    case MRP:
103 ashish 1158
      if (value == null) {
483 rajveer 1159
        unsetMrp();
103 ashish 1160
      } else {
483 rajveer 1161
        setMrp((Double)value);
103 ashish 1162
      }
1163
      break;
1164
 
483 rajveer 1165
    case MOP:
103 ashish 1166
      if (value == null) {
483 rajveer 1167
        unsetMop();
103 ashish 1168
      } else {
483 rajveer 1169
        setMop((Double)value);
103 ashish 1170
      }
1171
      break;
1172
 
483 rajveer 1173
    case SELLING_PRICE:
1174
      if (value == null) {
1175
        unsetSellingPrice();
1176
      } else {
1177
        setSellingPrice((Double)value);
1178
      }
1179
      break;
1180
 
721 chandransh 1181
    case TRANSFER_PRICE:
1182
      if (value == null) {
1183
        unsetTransferPrice();
1184
      } else {
1185
        setTransferPrice((Double)value);
1186
      }
1187
      break;
1188
 
123 ashish 1189
    case WEIGHT:
1190
      if (value == null) {
1191
        unsetWeight();
1192
      } else {
1193
        setWeight((Double)value);
1194
      }
1195
      break;
1196
 
483 rajveer 1197
    case ADDED_ON:
123 ashish 1198
      if (value == null) {
483 rajveer 1199
        unsetAddedOn();
123 ashish 1200
      } else {
483 rajveer 1201
        setAddedOn((Long)value);
123 ashish 1202
      }
1203
      break;
1204
 
483 rajveer 1205
    case START_DATE:
123 ashish 1206
      if (value == null) {
483 rajveer 1207
        unsetStartDate();
123 ashish 1208
      } else {
483 rajveer 1209
        setStartDate((Long)value);
123 ashish 1210
      }
1211
      break;
1212
 
483 rajveer 1213
    case RETIRE_DATE:
123 ashish 1214
      if (value == null) {
483 rajveer 1215
        unsetRetireDate();
123 ashish 1216
      } else {
483 rajveer 1217
        setRetireDate((Long)value);
123 ashish 1218
      }
1219
      break;
1220
 
483 rajveer 1221
    case ITEM_STATUS:
1222
      if (value == null) {
1223
        unsetItemStatus();
1224
      } else {
1225
        setItemStatus((status)value);
1226
      }
1227
      break;
1228
 
1229
    case OTHER_INFO:
1230
      if (value == null) {
1231
        unsetOtherInfo();
1232
      } else {
1233
        setOtherInfo((Map<String,String>)value);
1234
      }
1235
      break;
1236
 
607 chandransh 1237
    case BEST_DEAL_TEXT:
1238
      if (value == null) {
1239
        unsetBestDealText();
1240
      } else {
1241
        setBestDealText((String)value);
1242
      }
1243
      break;
1244
 
1245
    case BEST_DEAL_VALUE:
1246
      if (value == null) {
1247
        unsetBestDealValue();
1248
      } else {
1249
        setBestDealValue((Double)value);
1250
      }
1251
      break;
1252
 
1253
    case DEALER_PRICE:
1254
      if (value == null) {
1255
        unsetDealerPrice();
1256
      } else {
1257
        setDealerPrice((Double)value);
1258
      }
1259
      break;
1260
 
1910 varun.gupt 1261
    case DEFAULT_FOR_ENTITY:
1262
      if (value == null) {
1263
        unsetDefaultForEntity();
1264
      } else {
1265
        setDefaultForEntity((Boolean)value);
1266
      }
1267
      break;
1268
 
607 chandransh 1269
    case UPDATED_ON:
1270
      if (value == null) {
1271
        unsetUpdatedOn();
1272
      } else {
1273
        setUpdatedOn((Long)value);
1274
      }
1275
      break;
1276
 
100 ashish 1277
    }
1278
  }
1279
 
1280
  public void setFieldValue(int fieldID, Object value) {
1281
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1282
  }
1283
 
1284
  public Object getFieldValue(_Fields field) {
1285
    switch (field) {
1286
    case ID:
1287
      return new Long(getId());
1288
 
957 chandransh 1289
    case PRODUCT_GROUP:
1290
      return getProductGroup();
483 rajveer 1291
 
957 chandransh 1292
    case BRAND:
1293
      return getBrand();
1294
 
483 rajveer 1295
    case MODEL_NUMBER:
1296
      return getModelNumber();
1297
 
1298
    case MODEL_NAME:
1299
      return getModelName();
1300
 
1329 chandransh 1301
    case COLOR:
1302
      return getColor();
1303
 
483 rajveer 1304
    case CATEGORY:
622 chandransh 1305
      return new Long(getCategory());
483 rajveer 1306
 
1307
    case COMMENTS:
1308
      return getComments();
1309
 
123 ashish 1310
    case CATALOG_ITEM_ID:
1311
      return new Long(getCatalogItemId());
100 ashish 1312
 
483 rajveer 1313
    case FEATURE_ID:
1314
      return new Long(getFeatureId());
1315
 
1316
    case FEATURE_DESCRIPTION:
1317
      return getFeatureDescription();
1318
 
100 ashish 1319
    case ITEM_INVENTORY:
1320
      return getItemInventory();
1321
 
483 rajveer 1322
    case MRP:
1323
      return new Double(getMrp());
1324
 
1325
    case MOP:
1326
      return new Double(getMop());
1327
 
1328
    case SELLING_PRICE:
1329
      return new Double(getSellingPrice());
1330
 
721 chandransh 1331
    case TRANSFER_PRICE:
1332
      return new Double(getTransferPrice());
1333
 
483 rajveer 1334
    case WEIGHT:
1335
      return new Double(getWeight());
1336
 
103 ashish 1337
    case ADDED_ON:
1338
      return new Long(getAddedOn());
1339
 
1340
    case START_DATE:
1341
      return new Long(getStartDate());
1342
 
483 rajveer 1343
    case RETIRE_DATE:
1344
      return new Long(getRetireDate());
1345
 
103 ashish 1346
    case ITEM_STATUS:
1347
      return getItemStatus();
1348
 
1349
    case OTHER_INFO:
1350
      return getOtherInfo();
1351
 
607 chandransh 1352
    case BEST_DEAL_TEXT:
1353
      return getBestDealText();
1354
 
1355
    case BEST_DEAL_VALUE:
1356
      return new Double(getBestDealValue());
1357
 
1358
    case DEALER_PRICE:
1359
      return new Double(getDealerPrice());
1360
 
1910 varun.gupt 1361
    case DEFAULT_FOR_ENTITY:
1362
      return new Boolean(isDefaultForEntity());
1363
 
607 chandransh 1364
    case UPDATED_ON:
1365
      return new Long(getUpdatedOn());
1366
 
100 ashish 1367
    }
1368
    throw new IllegalStateException();
1369
  }
1370
 
1371
  public Object getFieldValue(int fieldId) {
1372
    return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1373
  }
1374
 
1375
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1376
  public boolean isSet(_Fields field) {
1377
    switch (field) {
1378
    case ID:
1379
      return isSetId();
957 chandransh 1380
    case PRODUCT_GROUP:
1381
      return isSetProductGroup();
1382
    case BRAND:
1383
      return isSetBrand();
483 rajveer 1384
    case MODEL_NUMBER:
1385
      return isSetModelNumber();
1386
    case MODEL_NAME:
1387
      return isSetModelName();
1329 chandransh 1388
    case COLOR:
1389
      return isSetColor();
483 rajveer 1390
    case CATEGORY:
1391
      return isSetCategory();
1392
    case COMMENTS:
1393
      return isSetComments();
123 ashish 1394
    case CATALOG_ITEM_ID:
1395
      return isSetCatalogItemId();
483 rajveer 1396
    case FEATURE_ID:
1397
      return isSetFeatureId();
1398
    case FEATURE_DESCRIPTION:
1399
      return isSetFeatureDescription();
100 ashish 1400
    case ITEM_INVENTORY:
1401
      return isSetItemInventory();
483 rajveer 1402
    case MRP:
1403
      return isSetMrp();
1404
    case MOP:
1405
      return isSetMop();
1406
    case SELLING_PRICE:
1407
      return isSetSellingPrice();
721 chandransh 1408
    case TRANSFER_PRICE:
1409
      return isSetTransferPrice();
483 rajveer 1410
    case WEIGHT:
1411
      return isSetWeight();
103 ashish 1412
    case ADDED_ON:
1413
      return isSetAddedOn();
1414
    case START_DATE:
1415
      return isSetStartDate();
483 rajveer 1416
    case RETIRE_DATE:
1417
      return isSetRetireDate();
103 ashish 1418
    case ITEM_STATUS:
1419
      return isSetItemStatus();
1420
    case OTHER_INFO:
1421
      return isSetOtherInfo();
607 chandransh 1422
    case BEST_DEAL_TEXT:
1423
      return isSetBestDealText();
1424
    case BEST_DEAL_VALUE:
1425
      return isSetBestDealValue();
1426
    case DEALER_PRICE:
1427
      return isSetDealerPrice();
1910 varun.gupt 1428
    case DEFAULT_FOR_ENTITY:
1429
      return isSetDefaultForEntity();
607 chandransh 1430
    case UPDATED_ON:
1431
      return isSetUpdatedOn();
100 ashish 1432
    }
1433
    throw new IllegalStateException();
1434
  }
1435
 
1436
  public boolean isSet(int fieldID) {
1437
    return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1438
  }
1439
 
1440
  @Override
1441
  public boolean equals(Object that) {
1442
    if (that == null)
1443
      return false;
1444
    if (that instanceof Item)
1445
      return this.equals((Item)that);
1446
    return false;
1447
  }
1448
 
1449
  public boolean equals(Item that) {
1450
    if (that == null)
1451
      return false;
1452
 
1453
    boolean this_present_id = true;
1454
    boolean that_present_id = true;
1455
    if (this_present_id || that_present_id) {
1456
      if (!(this_present_id && that_present_id))
1457
        return false;
1458
      if (this.id != that.id)
1459
        return false;
1460
    }
1461
 
957 chandransh 1462
    boolean this_present_productGroup = true && this.isSetProductGroup();
1463
    boolean that_present_productGroup = true && that.isSetProductGroup();
1464
    if (this_present_productGroup || that_present_productGroup) {
1465
      if (!(this_present_productGroup && that_present_productGroup))
483 rajveer 1466
        return false;
957 chandransh 1467
      if (!this.productGroup.equals(that.productGroup))
483 rajveer 1468
        return false;
1469
    }
1470
 
957 chandransh 1471
    boolean this_present_brand = true && this.isSetBrand();
1472
    boolean that_present_brand = true && that.isSetBrand();
1473
    if (this_present_brand || that_present_brand) {
1474
      if (!(this_present_brand && that_present_brand))
1475
        return false;
1476
      if (!this.brand.equals(that.brand))
1477
        return false;
1478
    }
1479
 
483 rajveer 1480
    boolean this_present_modelNumber = true && this.isSetModelNumber();
1481
    boolean that_present_modelNumber = true && that.isSetModelNumber();
1482
    if (this_present_modelNumber || that_present_modelNumber) {
1483
      if (!(this_present_modelNumber && that_present_modelNumber))
1484
        return false;
1485
      if (!this.modelNumber.equals(that.modelNumber))
1486
        return false;
1487
    }
1488
 
1489
    boolean this_present_modelName = true && this.isSetModelName();
1490
    boolean that_present_modelName = true && that.isSetModelName();
1491
    if (this_present_modelName || that_present_modelName) {
1492
      if (!(this_present_modelName && that_present_modelName))
1493
        return false;
1494
      if (!this.modelName.equals(that.modelName))
1495
        return false;
1496
    }
1497
 
1329 chandransh 1498
    boolean this_present_color = true && this.isSetColor();
1499
    boolean that_present_color = true && that.isSetColor();
1500
    if (this_present_color || that_present_color) {
1501
      if (!(this_present_color && that_present_color))
1502
        return false;
1503
      if (!this.color.equals(that.color))
1504
        return false;
1505
    }
1506
 
622 chandransh 1507
    boolean this_present_category = true;
1508
    boolean that_present_category = true;
483 rajveer 1509
    if (this_present_category || that_present_category) {
1510
      if (!(this_present_category && that_present_category))
1511
        return false;
622 chandransh 1512
      if (this.category != that.category)
483 rajveer 1513
        return false;
1514
    }
1515
 
1516
    boolean this_present_comments = true && this.isSetComments();
1517
    boolean that_present_comments = true && that.isSetComments();
1518
    if (this_present_comments || that_present_comments) {
1519
      if (!(this_present_comments && that_present_comments))
1520
        return false;
1521
      if (!this.comments.equals(that.comments))
1522
        return false;
1523
    }
1524
 
123 ashish 1525
    boolean this_present_catalogItemId = true;
1526
    boolean that_present_catalogItemId = true;
1527
    if (this_present_catalogItemId || that_present_catalogItemId) {
1528
      if (!(this_present_catalogItemId && that_present_catalogItemId))
100 ashish 1529
        return false;
123 ashish 1530
      if (this.catalogItemId != that.catalogItemId)
100 ashish 1531
        return false;
1532
    }
1533
 
483 rajveer 1534
    boolean this_present_featureId = true;
1535
    boolean that_present_featureId = true;
1536
    if (this_present_featureId || that_present_featureId) {
1537
      if (!(this_present_featureId && that_present_featureId))
1538
        return false;
1539
      if (this.featureId != that.featureId)
1540
        return false;
1541
    }
1542
 
1543
    boolean this_present_featureDescription = true && this.isSetFeatureDescription();
1544
    boolean that_present_featureDescription = true && that.isSetFeatureDescription();
1545
    if (this_present_featureDescription || that_present_featureDescription) {
1546
      if (!(this_present_featureDescription && that_present_featureDescription))
1547
        return false;
1548
      if (!this.featureDescription.equals(that.featureDescription))
1549
        return false;
1550
    }
1551
 
100 ashish 1552
    boolean this_present_itemInventory = true && this.isSetItemInventory();
1553
    boolean that_present_itemInventory = true && that.isSetItemInventory();
1554
    if (this_present_itemInventory || that_present_itemInventory) {
1555
      if (!(this_present_itemInventory && that_present_itemInventory))
1556
        return false;
1557
      if (!this.itemInventory.equals(that.itemInventory))
1558
        return false;
1559
    }
1560
 
483 rajveer 1561
    boolean this_present_mrp = true;
1562
    boolean that_present_mrp = true;
1563
    if (this_present_mrp || that_present_mrp) {
1564
      if (!(this_present_mrp && that_present_mrp))
1565
        return false;
1566
      if (this.mrp != that.mrp)
1567
        return false;
1568
    }
1569
 
1570
    boolean this_present_mop = true;
1571
    boolean that_present_mop = true;
1572
    if (this_present_mop || that_present_mop) {
1573
      if (!(this_present_mop && that_present_mop))
1574
        return false;
1575
      if (this.mop != that.mop)
1576
        return false;
1577
    }
1578
 
1579
    boolean this_present_sellingPrice = true;
1580
    boolean that_present_sellingPrice = true;
1581
    if (this_present_sellingPrice || that_present_sellingPrice) {
1582
      if (!(this_present_sellingPrice && that_present_sellingPrice))
1583
        return false;
1584
      if (this.sellingPrice != that.sellingPrice)
1585
        return false;
1586
    }
1587
 
721 chandransh 1588
    boolean this_present_transferPrice = true;
1589
    boolean that_present_transferPrice = true;
1590
    if (this_present_transferPrice || that_present_transferPrice) {
1591
      if (!(this_present_transferPrice && that_present_transferPrice))
1592
        return false;
1593
      if (this.transferPrice != that.transferPrice)
1594
        return false;
1595
    }
1596
 
483 rajveer 1597
    boolean this_present_weight = true;
1598
    boolean that_present_weight = true;
1599
    if (this_present_weight || that_present_weight) {
1600
      if (!(this_present_weight && that_present_weight))
1601
        return false;
1602
      if (this.weight != that.weight)
1603
        return false;
1604
    }
1605
 
103 ashish 1606
    boolean this_present_addedOn = true;
1607
    boolean that_present_addedOn = true;
1608
    if (this_present_addedOn || that_present_addedOn) {
1609
      if (!(this_present_addedOn && that_present_addedOn))
1610
        return false;
1611
      if (this.addedOn != that.addedOn)
1612
        return false;
1613
    }
1614
 
1615
    boolean this_present_startDate = true;
1616
    boolean that_present_startDate = true;
1617
    if (this_present_startDate || that_present_startDate) {
1618
      if (!(this_present_startDate && that_present_startDate))
1619
        return false;
1620
      if (this.startDate != that.startDate)
1621
        return false;
1622
    }
1623
 
483 rajveer 1624
    boolean this_present_retireDate = true;
1625
    boolean that_present_retireDate = true;
1626
    if (this_present_retireDate || that_present_retireDate) {
1627
      if (!(this_present_retireDate && that_present_retireDate))
1628
        return false;
1629
      if (this.retireDate != that.retireDate)
1630
        return false;
1631
    }
1632
 
103 ashish 1633
    boolean this_present_itemStatus = true && this.isSetItemStatus();
1634
    boolean that_present_itemStatus = true && that.isSetItemStatus();
1635
    if (this_present_itemStatus || that_present_itemStatus) {
1636
      if (!(this_present_itemStatus && that_present_itemStatus))
1637
        return false;
1638
      if (!this.itemStatus.equals(that.itemStatus))
1639
        return false;
1640
    }
1641
 
1642
    boolean this_present_otherInfo = true && this.isSetOtherInfo();
1643
    boolean that_present_otherInfo = true && that.isSetOtherInfo();
1644
    if (this_present_otherInfo || that_present_otherInfo) {
1645
      if (!(this_present_otherInfo && that_present_otherInfo))
1646
        return false;
1647
      if (!this.otherInfo.equals(that.otherInfo))
1648
        return false;
1649
    }
1650
 
607 chandransh 1651
    boolean this_present_bestDealText = true && this.isSetBestDealText();
1652
    boolean that_present_bestDealText = true && that.isSetBestDealText();
1653
    if (this_present_bestDealText || that_present_bestDealText) {
1654
      if (!(this_present_bestDealText && that_present_bestDealText))
1655
        return false;
1656
      if (!this.bestDealText.equals(that.bestDealText))
1657
        return false;
1658
    }
1659
 
1660
    boolean this_present_bestDealValue = true;
1661
    boolean that_present_bestDealValue = true;
1662
    if (this_present_bestDealValue || that_present_bestDealValue) {
1663
      if (!(this_present_bestDealValue && that_present_bestDealValue))
1664
        return false;
1665
      if (this.bestDealValue != that.bestDealValue)
1666
        return false;
1667
    }
1668
 
1669
    boolean this_present_dealerPrice = true;
1670
    boolean that_present_dealerPrice = true;
1671
    if (this_present_dealerPrice || that_present_dealerPrice) {
1672
      if (!(this_present_dealerPrice && that_present_dealerPrice))
1673
        return false;
1674
      if (this.dealerPrice != that.dealerPrice)
1675
        return false;
1676
    }
1677
 
1910 varun.gupt 1678
    boolean this_present_defaultForEntity = true;
1679
    boolean that_present_defaultForEntity = true;
1680
    if (this_present_defaultForEntity || that_present_defaultForEntity) {
1681
      if (!(this_present_defaultForEntity && that_present_defaultForEntity))
1682
        return false;
1683
      if (this.defaultForEntity != that.defaultForEntity)
1684
        return false;
1685
    }
1686
 
607 chandransh 1687
    boolean this_present_updatedOn = true;
1688
    boolean that_present_updatedOn = true;
1689
    if (this_present_updatedOn || that_present_updatedOn) {
1690
      if (!(this_present_updatedOn && that_present_updatedOn))
1691
        return false;
1692
      if (this.updatedOn != that.updatedOn)
1693
        return false;
1694
    }
1695
 
100 ashish 1696
    return true;
1697
  }
1698
 
1699
  @Override
1700
  public int hashCode() {
1701
    return 0;
1702
  }
1703
 
1704
  public void read(TProtocol iprot) throws TException {
1705
    TField field;
1706
    iprot.readStructBegin();
1707
    while (true)
1708
    {
1709
      field = iprot.readFieldBegin();
1710
      if (field.type == TType.STOP) { 
1711
        break;
1712
      }
1713
      _Fields fieldId = _Fields.findByThriftId(field.id);
1714
      if (fieldId == null) {
1715
        TProtocolUtil.skip(iprot, field.type);
1716
      } else {
1717
        switch (fieldId) {
1718
          case ID:
1719
            if (field.type == TType.I64) {
1720
              this.id = iprot.readI64();
1721
              setIdIsSet(true);
1722
            } else { 
1723
              TProtocolUtil.skip(iprot, field.type);
1724
            }
1725
            break;
957 chandransh 1726
          case PRODUCT_GROUP:
483 rajveer 1727
            if (field.type == TType.STRING) {
957 chandransh 1728
              this.productGroup = iprot.readString();
483 rajveer 1729
            } else { 
1730
              TProtocolUtil.skip(iprot, field.type);
1731
            }
1732
            break;
957 chandransh 1733
          case BRAND:
1734
            if (field.type == TType.STRING) {
1735
              this.brand = iprot.readString();
1736
            } else { 
1737
              TProtocolUtil.skip(iprot, field.type);
1738
            }
1739
            break;
483 rajveer 1740
          case MODEL_NUMBER:
1741
            if (field.type == TType.STRING) {
1742
              this.modelNumber = iprot.readString();
1743
            } else { 
1744
              TProtocolUtil.skip(iprot, field.type);
1745
            }
1746
            break;
1747
          case MODEL_NAME:
1748
            if (field.type == TType.STRING) {
1749
              this.modelName = iprot.readString();
1750
            } else { 
1751
              TProtocolUtil.skip(iprot, field.type);
1752
            }
1753
            break;
1329 chandransh 1754
          case COLOR:
1755
            if (field.type == TType.STRING) {
1756
              this.color = iprot.readString();
1757
            } else { 
1758
              TProtocolUtil.skip(iprot, field.type);
1759
            }
1760
            break;
483 rajveer 1761
          case CATEGORY:
622 chandransh 1762
            if (field.type == TType.I64) {
1763
              this.category = iprot.readI64();
1764
              setCategoryIsSet(true);
483 rajveer 1765
            } else { 
1766
              TProtocolUtil.skip(iprot, field.type);
1767
            }
1768
            break;
1769
          case COMMENTS:
1770
            if (field.type == TType.STRING) {
1771
              this.comments = iprot.readString();
1772
            } else { 
1773
              TProtocolUtil.skip(iprot, field.type);
1774
            }
1775
            break;
123 ashish 1776
          case CATALOG_ITEM_ID:
1777
            if (field.type == TType.I64) {
1778
              this.catalogItemId = iprot.readI64();
1779
              setCatalogItemIdIsSet(true);
100 ashish 1780
            } else { 
1781
              TProtocolUtil.skip(iprot, field.type);
1782
            }
1783
            break;
483 rajveer 1784
          case FEATURE_ID:
1785
            if (field.type == TType.I64) {
1786
              this.featureId = iprot.readI64();
1787
              setFeatureIdIsSet(true);
1788
            } else { 
1789
              TProtocolUtil.skip(iprot, field.type);
1790
            }
1791
            break;
1792
          case FEATURE_DESCRIPTION:
1793
            if (field.type == TType.STRING) {
1794
              this.featureDescription = iprot.readString();
1795
            } else { 
1796
              TProtocolUtil.skip(iprot, field.type);
1797
            }
1798
            break;
103 ashish 1799
          case ITEM_INVENTORY:
100 ashish 1800
            if (field.type == TType.STRUCT) {
103 ashish 1801
              this.itemInventory = new ItemInventory();
1802
              this.itemInventory.read(iprot);
100 ashish 1803
            } else { 
1804
              TProtocolUtil.skip(iprot, field.type);
1805
            }
1806
            break;
483 rajveer 1807
          case MRP:
1808
            if (field.type == TType.DOUBLE) {
1809
              this.mrp = iprot.readDouble();
1810
              setMrpIsSet(true);
1811
            } else { 
1812
              TProtocolUtil.skip(iprot, field.type);
1813
            }
1814
            break;
1815
          case MOP:
1816
            if (field.type == TType.DOUBLE) {
1817
              this.mop = iprot.readDouble();
1818
              setMopIsSet(true);
1819
            } else { 
1820
              TProtocolUtil.skip(iprot, field.type);
1821
            }
1822
            break;
1823
          case SELLING_PRICE:
1824
            if (field.type == TType.DOUBLE) {
1825
              this.sellingPrice = iprot.readDouble();
1826
              setSellingPriceIsSet(true);
1827
            } else { 
1828
              TProtocolUtil.skip(iprot, field.type);
1829
            }
1830
            break;
721 chandransh 1831
          case TRANSFER_PRICE:
1832
            if (field.type == TType.DOUBLE) {
1833
              this.transferPrice = iprot.readDouble();
1834
              setTransferPriceIsSet(true);
1835
            } else { 
1836
              TProtocolUtil.skip(iprot, field.type);
1837
            }
1838
            break;
483 rajveer 1839
          case WEIGHT:
1840
            if (field.type == TType.DOUBLE) {
1841
              this.weight = iprot.readDouble();
1842
              setWeightIsSet(true);
1843
            } else { 
1844
              TProtocolUtil.skip(iprot, field.type);
1845
            }
1846
            break;
103 ashish 1847
          case ADDED_ON:
1848
            if (field.type == TType.I64) {
1849
              this.addedOn = iprot.readI64();
1850
              setAddedOnIsSet(true);
100 ashish 1851
            } else { 
1852
              TProtocolUtil.skip(iprot, field.type);
1853
            }
1854
            break;
103 ashish 1855
          case START_DATE:
1856
            if (field.type == TType.I64) {
1857
              this.startDate = iprot.readI64();
1858
              setStartDateIsSet(true);
1859
            } else { 
1860
              TProtocolUtil.skip(iprot, field.type);
1861
            }
1862
            break;
483 rajveer 1863
          case RETIRE_DATE:
1864
            if (field.type == TType.I64) {
1865
              this.retireDate = iprot.readI64();
1866
              setRetireDateIsSet(true);
1867
            } else { 
1868
              TProtocolUtil.skip(iprot, field.type);
1869
            }
1870
            break;
103 ashish 1871
          case ITEM_STATUS:
1872
            if (field.type == TType.I32) {
1873
              this.itemStatus = status.findByValue(iprot.readI32());
1874
            } else { 
1875
              TProtocolUtil.skip(iprot, field.type);
1876
            }
1877
            break;
1878
          case OTHER_INFO:
1879
            if (field.type == TType.MAP) {
1880
              {
123 ashish 1881
                TMap _map5 = iprot.readMapBegin();
1882
                this.otherInfo = new HashMap<String,String>(2*_map5.size);
1883
                for (int _i6 = 0; _i6 < _map5.size; ++_i6)
103 ashish 1884
                {
123 ashish 1885
                  String _key7;
1886
                  String _val8;
1887
                  _key7 = iprot.readString();
1888
                  _val8 = iprot.readString();
1889
                  this.otherInfo.put(_key7, _val8);
103 ashish 1890
                }
1891
                iprot.readMapEnd();
1892
              }
1893
            } else { 
1894
              TProtocolUtil.skip(iprot, field.type);
1895
            }
1896
            break;
607 chandransh 1897
          case BEST_DEAL_TEXT:
1898
            if (field.type == TType.STRING) {
1899
              this.bestDealText = iprot.readString();
1900
            } else { 
1901
              TProtocolUtil.skip(iprot, field.type);
1902
            }
1903
            break;
1904
          case BEST_DEAL_VALUE:
1905
            if (field.type == TType.DOUBLE) {
1906
              this.bestDealValue = iprot.readDouble();
1907
              setBestDealValueIsSet(true);
1908
            } else { 
1909
              TProtocolUtil.skip(iprot, field.type);
1910
            }
1911
            break;
1912
          case DEALER_PRICE:
1913
            if (field.type == TType.DOUBLE) {
1914
              this.dealerPrice = iprot.readDouble();
1915
              setDealerPriceIsSet(true);
1916
            } else { 
1917
              TProtocolUtil.skip(iprot, field.type);
1918
            }
1919
            break;
1910 varun.gupt 1920
          case DEFAULT_FOR_ENTITY:
1921
            if (field.type == TType.BOOL) {
1922
              this.defaultForEntity = iprot.readBool();
1923
              setDefaultForEntityIsSet(true);
1924
            } else { 
1925
              TProtocolUtil.skip(iprot, field.type);
1926
            }
1927
            break;
607 chandransh 1928
          case UPDATED_ON:
1929
            if (field.type == TType.I64) {
1930
              this.updatedOn = iprot.readI64();
1931
              setUpdatedOnIsSet(true);
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
    }
1329 chandransh 1971
    if (this.color != null) {
1972
      oprot.writeFieldBegin(COLOR_FIELD_DESC);
1973
      oprot.writeString(this.color);
1974
      oprot.writeFieldEnd();
1975
    }
622 chandransh 1976
    oprot.writeFieldBegin(CATEGORY_FIELD_DESC);
1977
    oprot.writeI64(this.category);
1978
    oprot.writeFieldEnd();
483 rajveer 1979
    if (this.comments != null) {
1980
      oprot.writeFieldBegin(COMMENTS_FIELD_DESC);
1981
      oprot.writeString(this.comments);
1982
      oprot.writeFieldEnd();
1983
    }
123 ashish 1984
    oprot.writeFieldBegin(CATALOG_ITEM_ID_FIELD_DESC);
1985
    oprot.writeI64(this.catalogItemId);
1986
    oprot.writeFieldEnd();
483 rajveer 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();
1910 varun.gupt 2053
    oprot.writeFieldBegin(DEFAULT_FOR_ENTITY_FIELD_DESC);
2054
    oprot.writeBool(this.defaultForEntity);
2055
    oprot.writeFieldEnd();
607 chandransh 2056
    oprot.writeFieldBegin(UPDATED_ON_FIELD_DESC);
2057
    oprot.writeI64(this.updatedOn);
2058
    oprot.writeFieldEnd();
100 ashish 2059
    oprot.writeFieldStop();
2060
    oprot.writeStructEnd();
2061
  }
2062
 
2063
  @Override
2064
  public String toString() {
2065
    StringBuilder sb = new StringBuilder("Item(");
2066
    boolean first = true;
2067
 
2068
    sb.append("id:");
2069
    sb.append(this.id);
2070
    first = false;
2071
    if (!first) sb.append(", ");
957 chandransh 2072
    sb.append("productGroup:");
2073
    if (this.productGroup == null) {
483 rajveer 2074
      sb.append("null");
2075
    } else {
957 chandransh 2076
      sb.append(this.productGroup);
483 rajveer 2077
    }
2078
    first = false;
2079
    if (!first) sb.append(", ");
957 chandransh 2080
    sb.append("brand:");
2081
    if (this.brand == null) {
2082
      sb.append("null");
2083
    } else {
2084
      sb.append(this.brand);
2085
    }
2086
    first = false;
2087
    if (!first) sb.append(", ");
483 rajveer 2088
    sb.append("modelNumber:");
2089
    if (this.modelNumber == null) {
2090
      sb.append("null");
2091
    } else {
2092
      sb.append(this.modelNumber);
2093
    }
2094
    first = false;
2095
    if (!first) sb.append(", ");
2096
    sb.append("modelName:");
2097
    if (this.modelName == null) {
2098
      sb.append("null");
2099
    } else {
2100
      sb.append(this.modelName);
2101
    }
2102
    first = false;
2103
    if (!first) sb.append(", ");
1329 chandransh 2104
    sb.append("color:");
2105
    if (this.color == null) {
2106
      sb.append("null");
2107
    } else {
2108
      sb.append(this.color);
2109
    }
2110
    first = false;
2111
    if (!first) sb.append(", ");
483 rajveer 2112
    sb.append("category:");
622 chandransh 2113
    sb.append(this.category);
483 rajveer 2114
    first = false;
2115
    if (!first) sb.append(", ");
2116
    sb.append("comments:");
2117
    if (this.comments == null) {
2118
      sb.append("null");
2119
    } else {
2120
      sb.append(this.comments);
2121
    }
2122
    first = false;
2123
    if (!first) sb.append(", ");
123 ashish 2124
    sb.append("catalogItemId:");
2125
    sb.append(this.catalogItemId);
100 ashish 2126
    first = false;
2127
    if (!first) sb.append(", ");
483 rajveer 2128
    sb.append("featureId:");
2129
    sb.append(this.featureId);
2130
    first = false;
2131
    if (!first) sb.append(", ");
2132
    sb.append("featureDescription:");
2133
    if (this.featureDescription == null) {
2134
      sb.append("null");
2135
    } else {
2136
      sb.append(this.featureDescription);
2137
    }
2138
    first = false;
2139
    if (!first) sb.append(", ");
100 ashish 2140
    sb.append("itemInventory:");
2141
    if (this.itemInventory == null) {
2142
      sb.append("null");
2143
    } else {
2144
      sb.append(this.itemInventory);
2145
    }
2146
    first = false;
103 ashish 2147
    if (!first) sb.append(", ");
483 rajveer 2148
    sb.append("mrp:");
2149
    sb.append(this.mrp);
2150
    first = false;
2151
    if (!first) sb.append(", ");
2152
    sb.append("mop:");
2153
    sb.append(this.mop);
2154
    first = false;
2155
    if (!first) sb.append(", ");
2156
    sb.append("sellingPrice:");
2157
    sb.append(this.sellingPrice);
2158
    first = false;
2159
    if (!first) sb.append(", ");
721 chandransh 2160
    sb.append("transferPrice:");
2161
    sb.append(this.transferPrice);
2162
    first = false;
2163
    if (!first) sb.append(", ");
483 rajveer 2164
    sb.append("weight:");
2165
    sb.append(this.weight);
2166
    first = false;
2167
    if (!first) sb.append(", ");
103 ashish 2168
    sb.append("addedOn:");
2169
    sb.append(this.addedOn);
2170
    first = false;
2171
    if (!first) sb.append(", ");
2172
    sb.append("startDate:");
2173
    sb.append(this.startDate);
2174
    first = false;
2175
    if (!first) sb.append(", ");
483 rajveer 2176
    sb.append("retireDate:");
2177
    sb.append(this.retireDate);
2178
    first = false;
2179
    if (!first) sb.append(", ");
103 ashish 2180
    sb.append("itemStatus:");
2181
    if (this.itemStatus == null) {
2182
      sb.append("null");
2183
    } else {
2184
      String itemStatus_name = itemStatus.name();
2185
      if (itemStatus_name != null) {
2186
        sb.append(itemStatus_name);
2187
        sb.append(" (");
2188
      }
2189
      sb.append(this.itemStatus);
2190
      if (itemStatus_name != null) {
2191
        sb.append(")");
2192
      }
2193
    }
2194
    first = false;
2195
    if (!first) sb.append(", ");
2196
    sb.append("otherInfo:");
2197
    if (this.otherInfo == null) {
2198
      sb.append("null");
2199
    } else {
2200
      sb.append(this.otherInfo);
2201
    }
2202
    first = false;
607 chandransh 2203
    if (!first) sb.append(", ");
2204
    sb.append("bestDealText:");
2205
    if (this.bestDealText == null) {
2206
      sb.append("null");
2207
    } else {
2208
      sb.append(this.bestDealText);
2209
    }
2210
    first = false;
2211
    if (!first) sb.append(", ");
2212
    sb.append("bestDealValue:");
2213
    sb.append(this.bestDealValue);
2214
    first = false;
2215
    if (!first) sb.append(", ");
2216
    sb.append("dealerPrice:");
2217
    sb.append(this.dealerPrice);
2218
    first = false;
2219
    if (!first) sb.append(", ");
1910 varun.gupt 2220
    sb.append("defaultForEntity:");
2221
    sb.append(this.defaultForEntity);
2222
    first = false;
2223
    if (!first) sb.append(", ");
607 chandransh 2224
    sb.append("updatedOn:");
2225
    sb.append(this.updatedOn);
2226
    first = false;
100 ashish 2227
    sb.append(")");
2228
    return sb.toString();
2229
  }
2230
 
2231
  public void validate() throws TException {
2232
    // check for required fields
2233
  }
2234
 
2235
}
2236