Subversion Repositories SmartDukaan

Rev

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