Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
100 ashish 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.catalog;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class Item implements TBase<Item._Fields>, java.io.Serializable, Cloneable {
27
  private static final TStruct STRUCT_DESC = new TStruct("Item");
28
 
29
  private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
483 rajveer 30
  private static final TField MANFUCTURER_NAME_FIELD_DESC = new TField("manfucturerName", TType.STRING, (short)2);
31
  private static final TField MODEL_NUMBER_FIELD_DESC = new TField("modelNumber", TType.STRING, (short)3);
32
  private static final TField MODEL_NAME_FIELD_DESC = new TField("modelName", TType.STRING, (short)4);
33
  private static final TField CATEGORY_FIELD_DESC = new TField("category", TType.STRING, (short)5);
34
  private static final TField COMMENTS_FIELD_DESC = new TField("comments", TType.STRING, (short)6);
35
  private static final TField CATALOG_ITEM_ID_FIELD_DESC = new TField("catalogItemId", TType.I64, (short)7);
36
  private static final TField VENDOR_ITEM_ID_FIELD_DESC = new TField("vendorItemId", TType.STRING, (short)8);
123 ashish 37
  private static final TField FEATURE_ID_FIELD_DESC = new TField("featureId", TType.I64, (short)10);
38
  private static final TField FEATURE_DESCRIPTION_FIELD_DESC = new TField("featureDescription", TType.STRING, (short)11);
483 rajveer 39
  private static final TField ITEM_INVENTORY_FIELD_DESC = new TField("itemInventory", TType.STRUCT, (short)12);
40
  private static final TField MRP_FIELD_DESC = new TField("mrp", TType.DOUBLE, (short)13);
41
  private static final TField MOP_FIELD_DESC = new TField("mop", TType.DOUBLE, (short)14);
42
  private static final TField SELLING_PRICE_FIELD_DESC = new TField("sellingPrice", TType.DOUBLE, (short)15);
43
  private static final TField WEIGHT_FIELD_DESC = new TField("weight", TType.DOUBLE, (short)16);
44
  private static final TField ADDED_ON_FIELD_DESC = new TField("addedOn", TType.I64, (short)17);
45
  private static final TField START_DATE_FIELD_DESC = new TField("startDate", TType.I64, (short)18);
46
  private static final TField RETIRE_DATE_FIELD_DESC = new TField("retireDate", TType.I64, (short)19);
47
  private static final TField ITEM_STATUS_FIELD_DESC = new TField("itemStatus", TType.I32, (short)20);
48
  private static final TField OTHER_INFO_FIELD_DESC = new TField("otherInfo", TType.MAP, (short)21);
100 ashish 49
 
50
  private long id;
483 rajveer 51
  private String manfucturerName;
52
  private String modelNumber;
53
  private String modelName;
54
  private String category;
55
  private String comments;
123 ashish 56
  private long catalogItemId;
483 rajveer 57
  private String vendorItemId;
58
  private long featureId;
59
  private String featureDescription;
100 ashish 60
  private ItemInventory itemInventory;
483 rajveer 61
  private double mrp;
62
  private double mop;
63
  private double sellingPrice;
64
  private double weight;
103 ashish 65
  private long addedOn;
66
  private long startDate;
483 rajveer 67
  private long retireDate;
103 ashish 68
  private status itemStatus;
69
  private Map<String,String> otherInfo;
100 ashish 70
 
71
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
72
  public enum _Fields implements TFieldIdEnum {
73
    ID((short)1, "id"),
483 rajveer 74
    MANFUCTURER_NAME((short)2, "manfucturerName"),
75
    MODEL_NUMBER((short)3, "modelNumber"),
76
    MODEL_NAME((short)4, "modelName"),
77
    CATEGORY((short)5, "category"),
78
    COMMENTS((short)6, "comments"),
79
    CATALOG_ITEM_ID((short)7, "catalogItemId"),
80
    VENDOR_ITEM_ID((short)8, "vendorItemId"),
81
    FEATURE_ID((short)10, "featureId"),
82
    FEATURE_DESCRIPTION((short)11, "featureDescription"),
83
    ITEM_INVENTORY((short)12, "itemInventory"),
84
    MRP((short)13, "mrp"),
85
    MOP((short)14, "mop"),
86
    SELLING_PRICE((short)15, "sellingPrice"),
87
    WEIGHT((short)16, "weight"),
88
    ADDED_ON((short)17, "addedOn"),
89
    START_DATE((short)18, "startDate"),
90
    RETIRE_DATE((short)19, "retireDate"),
103 ashish 91
    /**
92
     * 
93
     * @see status
94
     */
483 rajveer 95
    ITEM_STATUS((short)20, "itemStatus"),
96
    OTHER_INFO((short)21, "otherInfo");
100 ashish 97
 
98
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
99
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
100
 
101
    static {
102
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
103
        byId.put((int)field._thriftId, field);
104
        byName.put(field.getFieldName(), field);
105
      }
106
    }
107
 
108
    /**
109
     * Find the _Fields constant that matches fieldId, or null if its not found.
110
     */
111
    public static _Fields findByThriftId(int fieldId) {
112
      return byId.get(fieldId);
113
    }
114
 
115
    /**
116
     * Find the _Fields constant that matches fieldId, throwing an exception
117
     * if it is not found.
118
     */
119
    public static _Fields findByThriftIdOrThrow(int fieldId) {
120
      _Fields fields = findByThriftId(fieldId);
121
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
122
      return fields;
123
    }
124
 
125
    /**
126
     * Find the _Fields constant that matches name, or null if its not found.
127
     */
128
    public static _Fields findByName(String name) {
129
      return byName.get(name);
130
    }
131
 
132
    private final short _thriftId;
133
    private final String _fieldName;
134
 
135
    _Fields(short thriftId, String fieldName) {
136
      _thriftId = thriftId;
137
      _fieldName = fieldName;
138
    }
139
 
140
    public short getThriftFieldId() {
141
      return _thriftId;
142
    }
143
 
144
    public String getFieldName() {
145
      return _fieldName;
146
    }
147
  }
148
 
149
  // isset id assignments
150
  private static final int __ID_ISSET_ID = 0;
123 ashish 151
  private static final int __CATALOGITEMID_ISSET_ID = 1;
483 rajveer 152
  private static final int __FEATUREID_ISSET_ID = 2;
153
  private static final int __MRP_ISSET_ID = 3;
154
  private static final int __MOP_ISSET_ID = 4;
155
  private static final int __SELLINGPRICE_ISSET_ID = 5;
156
  private static final int __WEIGHT_ISSET_ID = 6;
157
  private static final int __ADDEDON_ISSET_ID = 7;
158
  private static final int __STARTDATE_ISSET_ID = 8;
159
  private static final int __RETIREDATE_ISSET_ID = 9;
160
  private BitSet __isset_bit_vector = new BitSet(10);
100 ashish 161
 
162
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
163
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
164
        new FieldValueMetaData(TType.I64)));
483 rajveer 165
    put(_Fields.MANFUCTURER_NAME, new FieldMetaData("manfucturerName", TFieldRequirementType.DEFAULT, 
166
        new FieldValueMetaData(TType.STRING)));
167
    put(_Fields.MODEL_NUMBER, new FieldMetaData("modelNumber", TFieldRequirementType.DEFAULT, 
168
        new FieldValueMetaData(TType.STRING)));
169
    put(_Fields.MODEL_NAME, new FieldMetaData("modelName", TFieldRequirementType.DEFAULT, 
170
        new FieldValueMetaData(TType.STRING)));
171
    put(_Fields.CATEGORY, new FieldMetaData("category", TFieldRequirementType.DEFAULT, 
172
        new FieldValueMetaData(TType.STRING)));
173
    put(_Fields.COMMENTS, new FieldMetaData("comments", TFieldRequirementType.DEFAULT, 
174
        new FieldValueMetaData(TType.STRING)));
123 ashish 175
    put(_Fields.CATALOG_ITEM_ID, new FieldMetaData("catalogItemId", TFieldRequirementType.DEFAULT, 
176
        new FieldValueMetaData(TType.I64)));
483 rajveer 177
    put(_Fields.VENDOR_ITEM_ID, new FieldMetaData("vendorItemId", TFieldRequirementType.DEFAULT, 
178
        new FieldValueMetaData(TType.STRING)));
179
    put(_Fields.FEATURE_ID, new FieldMetaData("featureId", TFieldRequirementType.DEFAULT, 
180
        new FieldValueMetaData(TType.I64)));
181
    put(_Fields.FEATURE_DESCRIPTION, new FieldMetaData("featureDescription", TFieldRequirementType.DEFAULT, 
182
        new FieldValueMetaData(TType.STRING)));
100 ashish 183
    put(_Fields.ITEM_INVENTORY, new FieldMetaData("itemInventory", TFieldRequirementType.DEFAULT, 
184
        new StructMetaData(TType.STRUCT, ItemInventory.class)));
483 rajveer 185
    put(_Fields.MRP, new FieldMetaData("mrp", TFieldRequirementType.DEFAULT, 
186
        new FieldValueMetaData(TType.DOUBLE)));
187
    put(_Fields.MOP, new FieldMetaData("mop", TFieldRequirementType.DEFAULT, 
188
        new FieldValueMetaData(TType.DOUBLE)));
189
    put(_Fields.SELLING_PRICE, new FieldMetaData("sellingPrice", TFieldRequirementType.DEFAULT, 
190
        new FieldValueMetaData(TType.DOUBLE)));
191
    put(_Fields.WEIGHT, new FieldMetaData("weight", TFieldRequirementType.DEFAULT, 
192
        new FieldValueMetaData(TType.DOUBLE)));
103 ashish 193
    put(_Fields.ADDED_ON, new FieldMetaData("addedOn", TFieldRequirementType.DEFAULT, 
194
        new FieldValueMetaData(TType.I64)));
195
    put(_Fields.START_DATE, new FieldMetaData("startDate", TFieldRequirementType.DEFAULT, 
196
        new FieldValueMetaData(TType.I64)));
483 rajveer 197
    put(_Fields.RETIRE_DATE, new FieldMetaData("retireDate", TFieldRequirementType.DEFAULT, 
198
        new FieldValueMetaData(TType.I64)));
103 ashish 199
    put(_Fields.ITEM_STATUS, new FieldMetaData("itemStatus", TFieldRequirementType.DEFAULT, 
200
        new EnumMetaData(TType.ENUM, status.class)));
201
    put(_Fields.OTHER_INFO, new FieldMetaData("otherInfo", TFieldRequirementType.DEFAULT, 
202
        new MapMetaData(TType.MAP, 
203
            new FieldValueMetaData(TType.STRING), 
204
            new FieldValueMetaData(TType.STRING))));
100 ashish 205
  }});
206
 
207
  static {
208
    FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
209
  }
210
 
211
  public Item() {
212
  }
213
 
214
  public Item(
215
    long id,
483 rajveer 216
    String manfucturerName,
217
    String modelNumber,
218
    String modelName,
219
    String category,
220
    String comments,
123 ashish 221
    long catalogItemId,
483 rajveer 222
    String vendorItemId,
223
    long featureId,
224
    String featureDescription,
103 ashish 225
    ItemInventory itemInventory,
483 rajveer 226
    double mrp,
227
    double mop,
228
    double sellingPrice,
229
    double weight,
103 ashish 230
    long addedOn,
231
    long startDate,
483 rajveer 232
    long retireDate,
103 ashish 233
    status itemStatus,
483 rajveer 234
    Map<String,String> otherInfo)
100 ashish 235
  {
236
    this();
237
    this.id = id;
238
    setIdIsSet(true);
483 rajveer 239
    this.manfucturerName = manfucturerName;
240
    this.modelNumber = modelNumber;
241
    this.modelName = modelName;
242
    this.category = category;
243
    this.comments = comments;
123 ashish 244
    this.catalogItemId = catalogItemId;
245
    setCatalogItemIdIsSet(true);
483 rajveer 246
    this.vendorItemId = vendorItemId;
247
    this.featureId = featureId;
248
    setFeatureIdIsSet(true);
249
    this.featureDescription = featureDescription;
100 ashish 250
    this.itemInventory = itemInventory;
483 rajveer 251
    this.mrp = mrp;
252
    setMrpIsSet(true);
253
    this.mop = mop;
254
    setMopIsSet(true);
255
    this.sellingPrice = sellingPrice;
256
    setSellingPriceIsSet(true);
257
    this.weight = weight;
258
    setWeightIsSet(true);
103 ashish 259
    this.addedOn = addedOn;
260
    setAddedOnIsSet(true);
261
    this.startDate = startDate;
262
    setStartDateIsSet(true);
483 rajveer 263
    this.retireDate = retireDate;
264
    setRetireDateIsSet(true);
103 ashish 265
    this.itemStatus = itemStatus;
266
    this.otherInfo = otherInfo;
100 ashish 267
  }
268
 
269
  /**
270
   * Performs a deep copy on <i>other</i>.
271
   */
272
  public Item(Item other) {
273
    __isset_bit_vector.clear();
274
    __isset_bit_vector.or(other.__isset_bit_vector);
275
    this.id = other.id;
483 rajveer 276
    if (other.isSetManfucturerName()) {
277
      this.manfucturerName = other.manfucturerName;
278
    }
279
    if (other.isSetModelNumber()) {
280
      this.modelNumber = other.modelNumber;
281
    }
282
    if (other.isSetModelName()) {
283
      this.modelName = other.modelName;
284
    }
285
    if (other.isSetCategory()) {
286
      this.category = other.category;
287
    }
288
    if (other.isSetComments()) {
289
      this.comments = other.comments;
290
    }
123 ashish 291
    this.catalogItemId = other.catalogItemId;
483 rajveer 292
    if (other.isSetVendorItemId()) {
293
      this.vendorItemId = other.vendorItemId;
294
    }
295
    this.featureId = other.featureId;
296
    if (other.isSetFeatureDescription()) {
297
      this.featureDescription = other.featureDescription;
298
    }
100 ashish 299
    if (other.isSetItemInventory()) {
300
      this.itemInventory = new ItemInventory(other.itemInventory);
301
    }
483 rajveer 302
    this.mrp = other.mrp;
303
    this.mop = other.mop;
304
    this.sellingPrice = other.sellingPrice;
305
    this.weight = other.weight;
103 ashish 306
    this.addedOn = other.addedOn;
307
    this.startDate = other.startDate;
483 rajveer 308
    this.retireDate = other.retireDate;
103 ashish 309
    if (other.isSetItemStatus()) {
310
      this.itemStatus = other.itemStatus;
311
    }
312
    if (other.isSetOtherInfo()) {
313
      Map<String,String> __this__otherInfo = new HashMap<String,String>();
314
      for (Map.Entry<String, String> other_element : other.otherInfo.entrySet()) {
315
 
316
        String other_element_key = other_element.getKey();
317
        String other_element_value = other_element.getValue();
318
 
319
        String __this__otherInfo_copy_key = other_element_key;
320
 
321
        String __this__otherInfo_copy_value = other_element_value;
322
 
323
        __this__otherInfo.put(__this__otherInfo_copy_key, __this__otherInfo_copy_value);
324
      }
325
      this.otherInfo = __this__otherInfo;
326
    }
100 ashish 327
  }
328
 
329
  public Item deepCopy() {
330
    return new Item(this);
331
  }
332
 
333
  @Deprecated
334
  public Item clone() {
335
    return new Item(this);
336
  }
337
 
338
  public long getId() {
339
    return this.id;
340
  }
341
 
342
  public Item setId(long id) {
343
    this.id = id;
344
    setIdIsSet(true);
345
    return this;
346
  }
347
 
348
  public void unsetId() {
349
    __isset_bit_vector.clear(__ID_ISSET_ID);
350
  }
351
 
352
  /** Returns true if field id is set (has been asigned a value) and false otherwise */
353
  public boolean isSetId() {
354
    return __isset_bit_vector.get(__ID_ISSET_ID);
355
  }
356
 
357
  public void setIdIsSet(boolean value) {
358
    __isset_bit_vector.set(__ID_ISSET_ID, value);
359
  }
360
 
483 rajveer 361
  public String getManfucturerName() {
362
    return this.manfucturerName;
363
  }
364
 
365
  public Item setManfucturerName(String manfucturerName) {
366
    this.manfucturerName = manfucturerName;
367
    return this;
368
  }
369
 
370
  public void unsetManfucturerName() {
371
    this.manfucturerName = null;
372
  }
373
 
374
  /** Returns true if field manfucturerName is set (has been asigned a value) and false otherwise */
375
  public boolean isSetManfucturerName() {
376
    return this.manfucturerName != null;
377
  }
378
 
379
  public void setManfucturerNameIsSet(boolean value) {
380
    if (!value) {
381
      this.manfucturerName = null;
382
    }
383
  }
384
 
385
  public String getModelNumber() {
386
    return this.modelNumber;
387
  }
388
 
389
  public Item setModelNumber(String modelNumber) {
390
    this.modelNumber = modelNumber;
391
    return this;
392
  }
393
 
394
  public void unsetModelNumber() {
395
    this.modelNumber = null;
396
  }
397
 
398
  /** Returns true if field modelNumber is set (has been asigned a value) and false otherwise */
399
  public boolean isSetModelNumber() {
400
    return this.modelNumber != null;
401
  }
402
 
403
  public void setModelNumberIsSet(boolean value) {
404
    if (!value) {
405
      this.modelNumber = null;
406
    }
407
  }
408
 
409
  public String getModelName() {
410
    return this.modelName;
411
  }
412
 
413
  public Item setModelName(String modelName) {
414
    this.modelName = modelName;
415
    return this;
416
  }
417
 
418
  public void unsetModelName() {
419
    this.modelName = null;
420
  }
421
 
422
  /** Returns true if field modelName is set (has been asigned a value) and false otherwise */
423
  public boolean isSetModelName() {
424
    return this.modelName != null;
425
  }
426
 
427
  public void setModelNameIsSet(boolean value) {
428
    if (!value) {
429
      this.modelName = null;
430
    }
431
  }
432
 
433
  public String getCategory() {
434
    return this.category;
435
  }
436
 
437
  public Item setCategory(String category) {
438
    this.category = category;
439
    return this;
440
  }
441
 
442
  public void unsetCategory() {
443
    this.category = null;
444
  }
445
 
446
  /** Returns true if field category is set (has been asigned a value) and false otherwise */
447
  public boolean isSetCategory() {
448
    return this.category != null;
449
  }
450
 
451
  public void setCategoryIsSet(boolean value) {
452
    if (!value) {
453
      this.category = null;
454
    }
455
  }
456
 
457
  public String getComments() {
458
    return this.comments;
459
  }
460
 
461
  public Item setComments(String comments) {
462
    this.comments = comments;
463
    return this;
464
  }
465
 
466
  public void unsetComments() {
467
    this.comments = null;
468
  }
469
 
470
  /** Returns true if field comments is set (has been asigned a value) and false otherwise */
471
  public boolean isSetComments() {
472
    return this.comments != null;
473
  }
474
 
475
  public void setCommentsIsSet(boolean value) {
476
    if (!value) {
477
      this.comments = null;
478
    }
479
  }
480
 
123 ashish 481
  public long getCatalogItemId() {
482
    return this.catalogItemId;
100 ashish 483
  }
484
 
123 ashish 485
  public Item setCatalogItemId(long catalogItemId) {
486
    this.catalogItemId = catalogItemId;
487
    setCatalogItemIdIsSet(true);
100 ashish 488
    return this;
489
  }
490
 
123 ashish 491
  public void unsetCatalogItemId() {
492
    __isset_bit_vector.clear(__CATALOGITEMID_ISSET_ID);
100 ashish 493
  }
494
 
123 ashish 495
  /** Returns true if field catalogItemId is set (has been asigned a value) and false otherwise */
496
  public boolean isSetCatalogItemId() {
497
    return __isset_bit_vector.get(__CATALOGITEMID_ISSET_ID);
100 ashish 498
  }
499
 
123 ashish 500
  public void setCatalogItemIdIsSet(boolean value) {
501
    __isset_bit_vector.set(__CATALOGITEMID_ISSET_ID, value);
100 ashish 502
  }
503
 
483 rajveer 504
  public String getVendorItemId() {
505
    return this.vendorItemId;
506
  }
507
 
508
  public Item setVendorItemId(String vendorItemId) {
509
    this.vendorItemId = vendorItemId;
510
    return this;
511
  }
512
 
513
  public void unsetVendorItemId() {
514
    this.vendorItemId = null;
515
  }
516
 
517
  /** Returns true if field vendorItemId is set (has been asigned a value) and false otherwise */
518
  public boolean isSetVendorItemId() {
519
    return this.vendorItemId != null;
520
  }
521
 
522
  public void setVendorItemIdIsSet(boolean value) {
523
    if (!value) {
524
      this.vendorItemId = null;
525
    }
526
  }
527
 
528
  public long getFeatureId() {
529
    return this.featureId;
530
  }
531
 
532
  public Item setFeatureId(long featureId) {
533
    this.featureId = featureId;
534
    setFeatureIdIsSet(true);
535
    return this;
536
  }
537
 
538
  public void unsetFeatureId() {
539
    __isset_bit_vector.clear(__FEATUREID_ISSET_ID);
540
  }
541
 
542
  /** Returns true if field featureId is set (has been asigned a value) and false otherwise */
543
  public boolean isSetFeatureId() {
544
    return __isset_bit_vector.get(__FEATUREID_ISSET_ID);
545
  }
546
 
547
  public void setFeatureIdIsSet(boolean value) {
548
    __isset_bit_vector.set(__FEATUREID_ISSET_ID, value);
549
  }
550
 
551
  public String getFeatureDescription() {
552
    return this.featureDescription;
553
  }
554
 
555
  public Item setFeatureDescription(String featureDescription) {
556
    this.featureDescription = featureDescription;
557
    return this;
558
  }
559
 
560
  public void unsetFeatureDescription() {
561
    this.featureDescription = null;
562
  }
563
 
564
  /** Returns true if field featureDescription is set (has been asigned a value) and false otherwise */
565
  public boolean isSetFeatureDescription() {
566
    return this.featureDescription != null;
567
  }
568
 
569
  public void setFeatureDescriptionIsSet(boolean value) {
570
    if (!value) {
571
      this.featureDescription = null;
572
    }
573
  }
574
 
100 ashish 575
  public ItemInventory getItemInventory() {
576
    return this.itemInventory;
577
  }
578
 
579
  public Item setItemInventory(ItemInventory itemInventory) {
580
    this.itemInventory = itemInventory;
581
    return this;
582
  }
583
 
584
  public void unsetItemInventory() {
585
    this.itemInventory = null;
586
  }
587
 
588
  /** Returns true if field itemInventory is set (has been asigned a value) and false otherwise */
589
  public boolean isSetItemInventory() {
590
    return this.itemInventory != null;
591
  }
592
 
593
  public void setItemInventoryIsSet(boolean value) {
594
    if (!value) {
595
      this.itemInventory = null;
596
    }
597
  }
598
 
483 rajveer 599
  public double getMrp() {
600
    return this.mrp;
601
  }
602
 
603
  public Item setMrp(double mrp) {
604
    this.mrp = mrp;
605
    setMrpIsSet(true);
606
    return this;
607
  }
608
 
609
  public void unsetMrp() {
610
    __isset_bit_vector.clear(__MRP_ISSET_ID);
611
  }
612
 
613
  /** Returns true if field mrp is set (has been asigned a value) and false otherwise */
614
  public boolean isSetMrp() {
615
    return __isset_bit_vector.get(__MRP_ISSET_ID);
616
  }
617
 
618
  public void setMrpIsSet(boolean value) {
619
    __isset_bit_vector.set(__MRP_ISSET_ID, value);
620
  }
621
 
622
  public double getMop() {
623
    return this.mop;
624
  }
625
 
626
  public Item setMop(double mop) {
627
    this.mop = mop;
628
    setMopIsSet(true);
629
    return this;
630
  }
631
 
632
  public void unsetMop() {
633
    __isset_bit_vector.clear(__MOP_ISSET_ID);
634
  }
635
 
636
  /** Returns true if field mop is set (has been asigned a value) and false otherwise */
637
  public boolean isSetMop() {
638
    return __isset_bit_vector.get(__MOP_ISSET_ID);
639
  }
640
 
641
  public void setMopIsSet(boolean value) {
642
    __isset_bit_vector.set(__MOP_ISSET_ID, value);
643
  }
644
 
645
  public double getSellingPrice() {
646
    return this.sellingPrice;
647
  }
648
 
649
  public Item setSellingPrice(double sellingPrice) {
650
    this.sellingPrice = sellingPrice;
651
    setSellingPriceIsSet(true);
652
    return this;
653
  }
654
 
655
  public void unsetSellingPrice() {
656
    __isset_bit_vector.clear(__SELLINGPRICE_ISSET_ID);
657
  }
658
 
659
  /** Returns true if field sellingPrice is set (has been asigned a value) and false otherwise */
660
  public boolean isSetSellingPrice() {
661
    return __isset_bit_vector.get(__SELLINGPRICE_ISSET_ID);
662
  }
663
 
664
  public void setSellingPriceIsSet(boolean value) {
665
    __isset_bit_vector.set(__SELLINGPRICE_ISSET_ID, value);
666
  }
667
 
668
  public double getWeight() {
669
    return this.weight;
670
  }
671
 
672
  public Item setWeight(double weight) {
673
    this.weight = weight;
674
    setWeightIsSet(true);
675
    return this;
676
  }
677
 
678
  public void unsetWeight() {
679
    __isset_bit_vector.clear(__WEIGHT_ISSET_ID);
680
  }
681
 
682
  /** Returns true if field weight is set (has been asigned a value) and false otherwise */
683
  public boolean isSetWeight() {
684
    return __isset_bit_vector.get(__WEIGHT_ISSET_ID);
685
  }
686
 
687
  public void setWeightIsSet(boolean value) {
688
    __isset_bit_vector.set(__WEIGHT_ISSET_ID, value);
689
  }
690
 
103 ashish 691
  public long getAddedOn() {
692
    return this.addedOn;
693
  }
694
 
695
  public Item setAddedOn(long addedOn) {
696
    this.addedOn = addedOn;
697
    setAddedOnIsSet(true);
698
    return this;
699
  }
700
 
701
  public void unsetAddedOn() {
702
    __isset_bit_vector.clear(__ADDEDON_ISSET_ID);
703
  }
704
 
705
  /** Returns true if field addedOn is set (has been asigned a value) and false otherwise */
706
  public boolean isSetAddedOn() {
707
    return __isset_bit_vector.get(__ADDEDON_ISSET_ID);
708
  }
709
 
710
  public void setAddedOnIsSet(boolean value) {
711
    __isset_bit_vector.set(__ADDEDON_ISSET_ID, value);
712
  }
713
 
714
  public long getStartDate() {
715
    return this.startDate;
716
  }
717
 
718
  public Item setStartDate(long startDate) {
719
    this.startDate = startDate;
720
    setStartDateIsSet(true);
721
    return this;
722
  }
723
 
724
  public void unsetStartDate() {
725
    __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
726
  }
727
 
728
  /** Returns true if field startDate is set (has been asigned a value) and false otherwise */
729
  public boolean isSetStartDate() {
730
    return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
731
  }
732
 
733
  public void setStartDateIsSet(boolean value) {
734
    __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
735
  }
736
 
483 rajveer 737
  public long getRetireDate() {
738
    return this.retireDate;
739
  }
740
 
741
  public Item setRetireDate(long retireDate) {
742
    this.retireDate = retireDate;
743
    setRetireDateIsSet(true);
744
    return this;
745
  }
746
 
747
  public void unsetRetireDate() {
748
    __isset_bit_vector.clear(__RETIREDATE_ISSET_ID);
749
  }
750
 
751
  /** Returns true if field retireDate is set (has been asigned a value) and false otherwise */
752
  public boolean isSetRetireDate() {
753
    return __isset_bit_vector.get(__RETIREDATE_ISSET_ID);
754
  }
755
 
756
  public void setRetireDateIsSet(boolean value) {
757
    __isset_bit_vector.set(__RETIREDATE_ISSET_ID, value);
758
  }
759
 
103 ashish 760
  /**
761
   * 
762
   * @see status
763
   */
764
  public status getItemStatus() {
765
    return this.itemStatus;
766
  }
767
 
768
  /**
769
   * 
770
   * @see status
771
   */
772
  public Item setItemStatus(status itemStatus) {
773
    this.itemStatus = itemStatus;
774
    return this;
775
  }
776
 
777
  public void unsetItemStatus() {
778
    this.itemStatus = null;
779
  }
780
 
781
  /** Returns true if field itemStatus is set (has been asigned a value) and false otherwise */
782
  public boolean isSetItemStatus() {
783
    return this.itemStatus != null;
784
  }
785
 
786
  public void setItemStatusIsSet(boolean value) {
787
    if (!value) {
788
      this.itemStatus = null;
789
    }
790
  }
791
 
792
  public int getOtherInfoSize() {
793
    return (this.otherInfo == null) ? 0 : this.otherInfo.size();
794
  }
795
 
796
  public void putToOtherInfo(String key, String val) {
797
    if (this.otherInfo == null) {
798
      this.otherInfo = new HashMap<String,String>();
799
    }
800
    this.otherInfo.put(key, val);
801
  }
802
 
803
  public Map<String,String> getOtherInfo() {
804
    return this.otherInfo;
805
  }
806
 
807
  public Item setOtherInfo(Map<String,String> otherInfo) {
808
    this.otherInfo = otherInfo;
809
    return this;
810
  }
811
 
812
  public void unsetOtherInfo() {
813
    this.otherInfo = null;
814
  }
815
 
816
  /** Returns true if field otherInfo is set (has been asigned a value) and false otherwise */
817
  public boolean isSetOtherInfo() {
818
    return this.otherInfo != null;
819
  }
820
 
821
  public void setOtherInfoIsSet(boolean value) {
822
    if (!value) {
823
      this.otherInfo = null;
824
    }
825
  }
826
 
100 ashish 827
  public void setFieldValue(_Fields field, Object value) {
828
    switch (field) {
829
    case ID:
830
      if (value == null) {
831
        unsetId();
832
      } else {
833
        setId((Long)value);
834
      }
835
      break;
836
 
483 rajveer 837
    case MANFUCTURER_NAME:
838
      if (value == null) {
839
        unsetManfucturerName();
840
      } else {
841
        setManfucturerName((String)value);
842
      }
843
      break;
844
 
845
    case MODEL_NUMBER:
846
      if (value == null) {
847
        unsetModelNumber();
848
      } else {
849
        setModelNumber((String)value);
850
      }
851
      break;
852
 
853
    case MODEL_NAME:
854
      if (value == null) {
855
        unsetModelName();
856
      } else {
857
        setModelName((String)value);
858
      }
859
      break;
860
 
861
    case CATEGORY:
862
      if (value == null) {
863
        unsetCategory();
864
      } else {
865
        setCategory((String)value);
866
      }
867
      break;
868
 
869
    case COMMENTS:
870
      if (value == null) {
871
        unsetComments();
872
      } else {
873
        setComments((String)value);
874
      }
875
      break;
876
 
123 ashish 877
    case CATALOG_ITEM_ID:
100 ashish 878
      if (value == null) {
123 ashish 879
        unsetCatalogItemId();
100 ashish 880
      } else {
123 ashish 881
        setCatalogItemId((Long)value);
100 ashish 882
      }
883
      break;
884
 
483 rajveer 885
    case VENDOR_ITEM_ID:
100 ashish 886
      if (value == null) {
483 rajveer 887
        unsetVendorItemId();
100 ashish 888
      } else {
483 rajveer 889
        setVendorItemId((String)value);
100 ashish 890
      }
891
      break;
892
 
483 rajveer 893
    case FEATURE_ID:
100 ashish 894
      if (value == null) {
483 rajveer 895
        unsetFeatureId();
100 ashish 896
      } else {
483 rajveer 897
        setFeatureId((Long)value);
100 ashish 898
      }
899
      break;
900
 
483 rajveer 901
    case FEATURE_DESCRIPTION:
103 ashish 902
      if (value == null) {
483 rajveer 903
        unsetFeatureDescription();
103 ashish 904
      } else {
483 rajveer 905
        setFeatureDescription((String)value);
103 ashish 906
      }
907
      break;
908
 
483 rajveer 909
    case ITEM_INVENTORY:
103 ashish 910
      if (value == null) {
483 rajveer 911
        unsetItemInventory();
103 ashish 912
      } else {
483 rajveer 913
        setItemInventory((ItemInventory)value);
103 ashish 914
      }
915
      break;
916
 
483 rajveer 917
    case MRP:
103 ashish 918
      if (value == null) {
483 rajveer 919
        unsetMrp();
103 ashish 920
      } else {
483 rajveer 921
        setMrp((Double)value);
103 ashish 922
      }
923
      break;
924
 
483 rajveer 925
    case MOP:
103 ashish 926
      if (value == null) {
483 rajveer 927
        unsetMop();
103 ashish 928
      } else {
483 rajveer 929
        setMop((Double)value);
103 ashish 930
      }
931
      break;
932
 
483 rajveer 933
    case SELLING_PRICE:
934
      if (value == null) {
935
        unsetSellingPrice();
936
      } else {
937
        setSellingPrice((Double)value);
938
      }
939
      break;
940
 
123 ashish 941
    case WEIGHT:
942
      if (value == null) {
943
        unsetWeight();
944
      } else {
945
        setWeight((Double)value);
946
      }
947
      break;
948
 
483 rajveer 949
    case ADDED_ON:
123 ashish 950
      if (value == null) {
483 rajveer 951
        unsetAddedOn();
123 ashish 952
      } else {
483 rajveer 953
        setAddedOn((Long)value);
123 ashish 954
      }
955
      break;
956
 
483 rajveer 957
    case START_DATE:
123 ashish 958
      if (value == null) {
483 rajveer 959
        unsetStartDate();
123 ashish 960
      } else {
483 rajveer 961
        setStartDate((Long)value);
123 ashish 962
      }
963
      break;
964
 
483 rajveer 965
    case RETIRE_DATE:
123 ashish 966
      if (value == null) {
483 rajveer 967
        unsetRetireDate();
123 ashish 968
      } else {
483 rajveer 969
        setRetireDate((Long)value);
123 ashish 970
      }
971
      break;
972
 
483 rajveer 973
    case ITEM_STATUS:
974
      if (value == null) {
975
        unsetItemStatus();
976
      } else {
977
        setItemStatus((status)value);
978
      }
979
      break;
980
 
981
    case OTHER_INFO:
982
      if (value == null) {
983
        unsetOtherInfo();
984
      } else {
985
        setOtherInfo((Map<String,String>)value);
986
      }
987
      break;
988
 
100 ashish 989
    }
990
  }
991
 
992
  public void setFieldValue(int fieldID, Object value) {
993
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
994
  }
995
 
996
  public Object getFieldValue(_Fields field) {
997
    switch (field) {
998
    case ID:
999
      return new Long(getId());
1000
 
483 rajveer 1001
    case MANFUCTURER_NAME:
1002
      return getManfucturerName();
1003
 
1004
    case MODEL_NUMBER:
1005
      return getModelNumber();
1006
 
1007
    case MODEL_NAME:
1008
      return getModelName();
1009
 
1010
    case CATEGORY:
1011
      return getCategory();
1012
 
1013
    case COMMENTS:
1014
      return getComments();
1015
 
123 ashish 1016
    case CATALOG_ITEM_ID:
1017
      return new Long(getCatalogItemId());
100 ashish 1018
 
483 rajveer 1019
    case VENDOR_ITEM_ID:
1020
      return getVendorItemId();
1021
 
1022
    case FEATURE_ID:
1023
      return new Long(getFeatureId());
1024
 
1025
    case FEATURE_DESCRIPTION:
1026
      return getFeatureDescription();
1027
 
100 ashish 1028
    case ITEM_INVENTORY:
1029
      return getItemInventory();
1030
 
483 rajveer 1031
    case MRP:
1032
      return new Double(getMrp());
1033
 
1034
    case MOP:
1035
      return new Double(getMop());
1036
 
1037
    case SELLING_PRICE:
1038
      return new Double(getSellingPrice());
1039
 
1040
    case WEIGHT:
1041
      return new Double(getWeight());
1042
 
103 ashish 1043
    case ADDED_ON:
1044
      return new Long(getAddedOn());
1045
 
1046
    case START_DATE:
1047
      return new Long(getStartDate());
1048
 
483 rajveer 1049
    case RETIRE_DATE:
1050
      return new Long(getRetireDate());
1051
 
103 ashish 1052
    case ITEM_STATUS:
1053
      return getItemStatus();
1054
 
1055
    case OTHER_INFO:
1056
      return getOtherInfo();
1057
 
100 ashish 1058
    }
1059
    throw new IllegalStateException();
1060
  }
1061
 
1062
  public Object getFieldValue(int fieldId) {
1063
    return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1064
  }
1065
 
1066
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1067
  public boolean isSet(_Fields field) {
1068
    switch (field) {
1069
    case ID:
1070
      return isSetId();
483 rajveer 1071
    case MANFUCTURER_NAME:
1072
      return isSetManfucturerName();
1073
    case MODEL_NUMBER:
1074
      return isSetModelNumber();
1075
    case MODEL_NAME:
1076
      return isSetModelName();
1077
    case CATEGORY:
1078
      return isSetCategory();
1079
    case COMMENTS:
1080
      return isSetComments();
123 ashish 1081
    case CATALOG_ITEM_ID:
1082
      return isSetCatalogItemId();
483 rajveer 1083
    case VENDOR_ITEM_ID:
1084
      return isSetVendorItemId();
1085
    case FEATURE_ID:
1086
      return isSetFeatureId();
1087
    case FEATURE_DESCRIPTION:
1088
      return isSetFeatureDescription();
100 ashish 1089
    case ITEM_INVENTORY:
1090
      return isSetItemInventory();
483 rajveer 1091
    case MRP:
1092
      return isSetMrp();
1093
    case MOP:
1094
      return isSetMop();
1095
    case SELLING_PRICE:
1096
      return isSetSellingPrice();
1097
    case WEIGHT:
1098
      return isSetWeight();
103 ashish 1099
    case ADDED_ON:
1100
      return isSetAddedOn();
1101
    case START_DATE:
1102
      return isSetStartDate();
483 rajveer 1103
    case RETIRE_DATE:
1104
      return isSetRetireDate();
103 ashish 1105
    case ITEM_STATUS:
1106
      return isSetItemStatus();
1107
    case OTHER_INFO:
1108
      return isSetOtherInfo();
100 ashish 1109
    }
1110
    throw new IllegalStateException();
1111
  }
1112
 
1113
  public boolean isSet(int fieldID) {
1114
    return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1115
  }
1116
 
1117
  @Override
1118
  public boolean equals(Object that) {
1119
    if (that == null)
1120
      return false;
1121
    if (that instanceof Item)
1122
      return this.equals((Item)that);
1123
    return false;
1124
  }
1125
 
1126
  public boolean equals(Item that) {
1127
    if (that == null)
1128
      return false;
1129
 
1130
    boolean this_present_id = true;
1131
    boolean that_present_id = true;
1132
    if (this_present_id || that_present_id) {
1133
      if (!(this_present_id && that_present_id))
1134
        return false;
1135
      if (this.id != that.id)
1136
        return false;
1137
    }
1138
 
483 rajveer 1139
    boolean this_present_manfucturerName = true && this.isSetManfucturerName();
1140
    boolean that_present_manfucturerName = true && that.isSetManfucturerName();
1141
    if (this_present_manfucturerName || that_present_manfucturerName) {
1142
      if (!(this_present_manfucturerName && that_present_manfucturerName))
1143
        return false;
1144
      if (!this.manfucturerName.equals(that.manfucturerName))
1145
        return false;
1146
    }
1147
 
1148
    boolean this_present_modelNumber = true && this.isSetModelNumber();
1149
    boolean that_present_modelNumber = true && that.isSetModelNumber();
1150
    if (this_present_modelNumber || that_present_modelNumber) {
1151
      if (!(this_present_modelNumber && that_present_modelNumber))
1152
        return false;
1153
      if (!this.modelNumber.equals(that.modelNumber))
1154
        return false;
1155
    }
1156
 
1157
    boolean this_present_modelName = true && this.isSetModelName();
1158
    boolean that_present_modelName = true && that.isSetModelName();
1159
    if (this_present_modelName || that_present_modelName) {
1160
      if (!(this_present_modelName && that_present_modelName))
1161
        return false;
1162
      if (!this.modelName.equals(that.modelName))
1163
        return false;
1164
    }
1165
 
1166
    boolean this_present_category = true && this.isSetCategory();
1167
    boolean that_present_category = true && that.isSetCategory();
1168
    if (this_present_category || that_present_category) {
1169
      if (!(this_present_category && that_present_category))
1170
        return false;
1171
      if (!this.category.equals(that.category))
1172
        return false;
1173
    }
1174
 
1175
    boolean this_present_comments = true && this.isSetComments();
1176
    boolean that_present_comments = true && that.isSetComments();
1177
    if (this_present_comments || that_present_comments) {
1178
      if (!(this_present_comments && that_present_comments))
1179
        return false;
1180
      if (!this.comments.equals(that.comments))
1181
        return false;
1182
    }
1183
 
123 ashish 1184
    boolean this_present_catalogItemId = true;
1185
    boolean that_present_catalogItemId = true;
1186
    if (this_present_catalogItemId || that_present_catalogItemId) {
1187
      if (!(this_present_catalogItemId && that_present_catalogItemId))
100 ashish 1188
        return false;
123 ashish 1189
      if (this.catalogItemId != that.catalogItemId)
100 ashish 1190
        return false;
1191
    }
1192
 
483 rajveer 1193
    boolean this_present_vendorItemId = true && this.isSetVendorItemId();
1194
    boolean that_present_vendorItemId = true && that.isSetVendorItemId();
1195
    if (this_present_vendorItemId || that_present_vendorItemId) {
1196
      if (!(this_present_vendorItemId && that_present_vendorItemId))
1197
        return false;
1198
      if (!this.vendorItemId.equals(that.vendorItemId))
1199
        return false;
1200
    }
1201
 
1202
    boolean this_present_featureId = true;
1203
    boolean that_present_featureId = true;
1204
    if (this_present_featureId || that_present_featureId) {
1205
      if (!(this_present_featureId && that_present_featureId))
1206
        return false;
1207
      if (this.featureId != that.featureId)
1208
        return false;
1209
    }
1210
 
1211
    boolean this_present_featureDescription = true && this.isSetFeatureDescription();
1212
    boolean that_present_featureDescription = true && that.isSetFeatureDescription();
1213
    if (this_present_featureDescription || that_present_featureDescription) {
1214
      if (!(this_present_featureDescription && that_present_featureDescription))
1215
        return false;
1216
      if (!this.featureDescription.equals(that.featureDescription))
1217
        return false;
1218
    }
1219
 
100 ashish 1220
    boolean this_present_itemInventory = true && this.isSetItemInventory();
1221
    boolean that_present_itemInventory = true && that.isSetItemInventory();
1222
    if (this_present_itemInventory || that_present_itemInventory) {
1223
      if (!(this_present_itemInventory && that_present_itemInventory))
1224
        return false;
1225
      if (!this.itemInventory.equals(that.itemInventory))
1226
        return false;
1227
    }
1228
 
483 rajveer 1229
    boolean this_present_mrp = true;
1230
    boolean that_present_mrp = true;
1231
    if (this_present_mrp || that_present_mrp) {
1232
      if (!(this_present_mrp && that_present_mrp))
1233
        return false;
1234
      if (this.mrp != that.mrp)
1235
        return false;
1236
    }
1237
 
1238
    boolean this_present_mop = true;
1239
    boolean that_present_mop = true;
1240
    if (this_present_mop || that_present_mop) {
1241
      if (!(this_present_mop && that_present_mop))
1242
        return false;
1243
      if (this.mop != that.mop)
1244
        return false;
1245
    }
1246
 
1247
    boolean this_present_sellingPrice = true;
1248
    boolean that_present_sellingPrice = true;
1249
    if (this_present_sellingPrice || that_present_sellingPrice) {
1250
      if (!(this_present_sellingPrice && that_present_sellingPrice))
1251
        return false;
1252
      if (this.sellingPrice != that.sellingPrice)
1253
        return false;
1254
    }
1255
 
1256
    boolean this_present_weight = true;
1257
    boolean that_present_weight = true;
1258
    if (this_present_weight || that_present_weight) {
1259
      if (!(this_present_weight && that_present_weight))
1260
        return false;
1261
      if (this.weight != that.weight)
1262
        return false;
1263
    }
1264
 
103 ashish 1265
    boolean this_present_addedOn = true;
1266
    boolean that_present_addedOn = true;
1267
    if (this_present_addedOn || that_present_addedOn) {
1268
      if (!(this_present_addedOn && that_present_addedOn))
1269
        return false;
1270
      if (this.addedOn != that.addedOn)
1271
        return false;
1272
    }
1273
 
1274
    boolean this_present_startDate = true;
1275
    boolean that_present_startDate = true;
1276
    if (this_present_startDate || that_present_startDate) {
1277
      if (!(this_present_startDate && that_present_startDate))
1278
        return false;
1279
      if (this.startDate != that.startDate)
1280
        return false;
1281
    }
1282
 
483 rajveer 1283
    boolean this_present_retireDate = true;
1284
    boolean that_present_retireDate = true;
1285
    if (this_present_retireDate || that_present_retireDate) {
1286
      if (!(this_present_retireDate && that_present_retireDate))
1287
        return false;
1288
      if (this.retireDate != that.retireDate)
1289
        return false;
1290
    }
1291
 
103 ashish 1292
    boolean this_present_itemStatus = true && this.isSetItemStatus();
1293
    boolean that_present_itemStatus = true && that.isSetItemStatus();
1294
    if (this_present_itemStatus || that_present_itemStatus) {
1295
      if (!(this_present_itemStatus && that_present_itemStatus))
1296
        return false;
1297
      if (!this.itemStatus.equals(that.itemStatus))
1298
        return false;
1299
    }
1300
 
1301
    boolean this_present_otherInfo = true && this.isSetOtherInfo();
1302
    boolean that_present_otherInfo = true && that.isSetOtherInfo();
1303
    if (this_present_otherInfo || that_present_otherInfo) {
1304
      if (!(this_present_otherInfo && that_present_otherInfo))
1305
        return false;
1306
      if (!this.otherInfo.equals(that.otherInfo))
1307
        return false;
1308
    }
1309
 
100 ashish 1310
    return true;
1311
  }
1312
 
1313
  @Override
1314
  public int hashCode() {
1315
    return 0;
1316
  }
1317
 
1318
  public void read(TProtocol iprot) throws TException {
1319
    TField field;
1320
    iprot.readStructBegin();
1321
    while (true)
1322
    {
1323
      field = iprot.readFieldBegin();
1324
      if (field.type == TType.STOP) { 
1325
        break;
1326
      }
1327
      _Fields fieldId = _Fields.findByThriftId(field.id);
1328
      if (fieldId == null) {
1329
        TProtocolUtil.skip(iprot, field.type);
1330
      } else {
1331
        switch (fieldId) {
1332
          case ID:
1333
            if (field.type == TType.I64) {
1334
              this.id = iprot.readI64();
1335
              setIdIsSet(true);
1336
            } else { 
1337
              TProtocolUtil.skip(iprot, field.type);
1338
            }
1339
            break;
483 rajveer 1340
          case MANFUCTURER_NAME:
1341
            if (field.type == TType.STRING) {
1342
              this.manfucturerName = iprot.readString();
1343
            } else { 
1344
              TProtocolUtil.skip(iprot, field.type);
1345
            }
1346
            break;
1347
          case MODEL_NUMBER:
1348
            if (field.type == TType.STRING) {
1349
              this.modelNumber = iprot.readString();
1350
            } else { 
1351
              TProtocolUtil.skip(iprot, field.type);
1352
            }
1353
            break;
1354
          case MODEL_NAME:
1355
            if (field.type == TType.STRING) {
1356
              this.modelName = iprot.readString();
1357
            } else { 
1358
              TProtocolUtil.skip(iprot, field.type);
1359
            }
1360
            break;
1361
          case CATEGORY:
1362
            if (field.type == TType.STRING) {
1363
              this.category = iprot.readString();
1364
            } else { 
1365
              TProtocolUtil.skip(iprot, field.type);
1366
            }
1367
            break;
1368
          case COMMENTS:
1369
            if (field.type == TType.STRING) {
1370
              this.comments = iprot.readString();
1371
            } else { 
1372
              TProtocolUtil.skip(iprot, field.type);
1373
            }
1374
            break;
123 ashish 1375
          case CATALOG_ITEM_ID:
1376
            if (field.type == TType.I64) {
1377
              this.catalogItemId = iprot.readI64();
1378
              setCatalogItemIdIsSet(true);
100 ashish 1379
            } else { 
1380
              TProtocolUtil.skip(iprot, field.type);
1381
            }
1382
            break;
483 rajveer 1383
          case VENDOR_ITEM_ID:
1384
            if (field.type == TType.STRING) {
1385
              this.vendorItemId = iprot.readString();
1386
            } else { 
1387
              TProtocolUtil.skip(iprot, field.type);
1388
            }
1389
            break;
1390
          case FEATURE_ID:
1391
            if (field.type == TType.I64) {
1392
              this.featureId = iprot.readI64();
1393
              setFeatureIdIsSet(true);
1394
            } else { 
1395
              TProtocolUtil.skip(iprot, field.type);
1396
            }
1397
            break;
1398
          case FEATURE_DESCRIPTION:
1399
            if (field.type == TType.STRING) {
1400
              this.featureDescription = iprot.readString();
1401
            } else { 
1402
              TProtocolUtil.skip(iprot, field.type);
1403
            }
1404
            break;
103 ashish 1405
          case ITEM_INVENTORY:
100 ashish 1406
            if (field.type == TType.STRUCT) {
103 ashish 1407
              this.itemInventory = new ItemInventory();
1408
              this.itemInventory.read(iprot);
100 ashish 1409
            } else { 
1410
              TProtocolUtil.skip(iprot, field.type);
1411
            }
1412
            break;
483 rajveer 1413
          case MRP:
1414
            if (field.type == TType.DOUBLE) {
1415
              this.mrp = iprot.readDouble();
1416
              setMrpIsSet(true);
1417
            } else { 
1418
              TProtocolUtil.skip(iprot, field.type);
1419
            }
1420
            break;
1421
          case MOP:
1422
            if (field.type == TType.DOUBLE) {
1423
              this.mop = iprot.readDouble();
1424
              setMopIsSet(true);
1425
            } else { 
1426
              TProtocolUtil.skip(iprot, field.type);
1427
            }
1428
            break;
1429
          case SELLING_PRICE:
1430
            if (field.type == TType.DOUBLE) {
1431
              this.sellingPrice = iprot.readDouble();
1432
              setSellingPriceIsSet(true);
1433
            } else { 
1434
              TProtocolUtil.skip(iprot, field.type);
1435
            }
1436
            break;
1437
          case WEIGHT:
1438
            if (field.type == TType.DOUBLE) {
1439
              this.weight = iprot.readDouble();
1440
              setWeightIsSet(true);
1441
            } else { 
1442
              TProtocolUtil.skip(iprot, field.type);
1443
            }
1444
            break;
103 ashish 1445
          case ADDED_ON:
1446
            if (field.type == TType.I64) {
1447
              this.addedOn = iprot.readI64();
1448
              setAddedOnIsSet(true);
100 ashish 1449
            } else { 
1450
              TProtocolUtil.skip(iprot, field.type);
1451
            }
1452
            break;
103 ashish 1453
          case START_DATE:
1454
            if (field.type == TType.I64) {
1455
              this.startDate = iprot.readI64();
1456
              setStartDateIsSet(true);
1457
            } else { 
1458
              TProtocolUtil.skip(iprot, field.type);
1459
            }
1460
            break;
483 rajveer 1461
          case RETIRE_DATE:
1462
            if (field.type == TType.I64) {
1463
              this.retireDate = iprot.readI64();
1464
              setRetireDateIsSet(true);
1465
            } else { 
1466
              TProtocolUtil.skip(iprot, field.type);
1467
            }
1468
            break;
103 ashish 1469
          case ITEM_STATUS:
1470
            if (field.type == TType.I32) {
1471
              this.itemStatus = status.findByValue(iprot.readI32());
1472
            } else { 
1473
              TProtocolUtil.skip(iprot, field.type);
1474
            }
1475
            break;
1476
          case OTHER_INFO:
1477
            if (field.type == TType.MAP) {
1478
              {
123 ashish 1479
                TMap _map5 = iprot.readMapBegin();
1480
                this.otherInfo = new HashMap<String,String>(2*_map5.size);
1481
                for (int _i6 = 0; _i6 < _map5.size; ++_i6)
103 ashish 1482
                {
123 ashish 1483
                  String _key7;
1484
                  String _val8;
1485
                  _key7 = iprot.readString();
1486
                  _val8 = iprot.readString();
1487
                  this.otherInfo.put(_key7, _val8);
103 ashish 1488
                }
1489
                iprot.readMapEnd();
1490
              }
1491
            } else { 
1492
              TProtocolUtil.skip(iprot, field.type);
1493
            }
1494
            break;
100 ashish 1495
        }
1496
        iprot.readFieldEnd();
1497
      }
1498
    }
1499
    iprot.readStructEnd();
1500
    validate();
1501
  }
1502
 
1503
  public void write(TProtocol oprot) throws TException {
1504
    validate();
1505
 
1506
    oprot.writeStructBegin(STRUCT_DESC);
1507
    oprot.writeFieldBegin(ID_FIELD_DESC);
1508
    oprot.writeI64(this.id);
1509
    oprot.writeFieldEnd();
483 rajveer 1510
    if (this.manfucturerName != null) {
1511
      oprot.writeFieldBegin(MANFUCTURER_NAME_FIELD_DESC);
1512
      oprot.writeString(this.manfucturerName);
1513
      oprot.writeFieldEnd();
1514
    }
1515
    if (this.modelNumber != null) {
1516
      oprot.writeFieldBegin(MODEL_NUMBER_FIELD_DESC);
1517
      oprot.writeString(this.modelNumber);
1518
      oprot.writeFieldEnd();
1519
    }
1520
    if (this.modelName != null) {
1521
      oprot.writeFieldBegin(MODEL_NAME_FIELD_DESC);
1522
      oprot.writeString(this.modelName);
1523
      oprot.writeFieldEnd();
1524
    }
1525
    if (this.category != null) {
1526
      oprot.writeFieldBegin(CATEGORY_FIELD_DESC);
1527
      oprot.writeString(this.category);
1528
      oprot.writeFieldEnd();
1529
    }
1530
    if (this.comments != null) {
1531
      oprot.writeFieldBegin(COMMENTS_FIELD_DESC);
1532
      oprot.writeString(this.comments);
1533
      oprot.writeFieldEnd();
1534
    }
123 ashish 1535
    oprot.writeFieldBegin(CATALOG_ITEM_ID_FIELD_DESC);
1536
    oprot.writeI64(this.catalogItemId);
1537
    oprot.writeFieldEnd();
483 rajveer 1538
    if (this.vendorItemId != null) {
1539
      oprot.writeFieldBegin(VENDOR_ITEM_ID_FIELD_DESC);
1540
      oprot.writeString(this.vendorItemId);
1541
      oprot.writeFieldEnd();
1542
    }
1543
    oprot.writeFieldBegin(FEATURE_ID_FIELD_DESC);
1544
    oprot.writeI64(this.featureId);
1545
    oprot.writeFieldEnd();
1546
    if (this.featureDescription != null) {
1547
      oprot.writeFieldBegin(FEATURE_DESCRIPTION_FIELD_DESC);
1548
      oprot.writeString(this.featureDescription);
1549
      oprot.writeFieldEnd();
1550
    }
100 ashish 1551
    if (this.itemInventory != null) {
1552
      oprot.writeFieldBegin(ITEM_INVENTORY_FIELD_DESC);
1553
      this.itemInventory.write(oprot);
1554
      oprot.writeFieldEnd();
1555
    }
483 rajveer 1556
    oprot.writeFieldBegin(MRP_FIELD_DESC);
1557
    oprot.writeDouble(this.mrp);
1558
    oprot.writeFieldEnd();
1559
    oprot.writeFieldBegin(MOP_FIELD_DESC);
1560
    oprot.writeDouble(this.mop);
1561
    oprot.writeFieldEnd();
1562
    oprot.writeFieldBegin(SELLING_PRICE_FIELD_DESC);
1563
    oprot.writeDouble(this.sellingPrice);
1564
    oprot.writeFieldEnd();
1565
    oprot.writeFieldBegin(WEIGHT_FIELD_DESC);
1566
    oprot.writeDouble(this.weight);
1567
    oprot.writeFieldEnd();
103 ashish 1568
    oprot.writeFieldBegin(ADDED_ON_FIELD_DESC);
1569
    oprot.writeI64(this.addedOn);
1570
    oprot.writeFieldEnd();
1571
    oprot.writeFieldBegin(START_DATE_FIELD_DESC);
1572
    oprot.writeI64(this.startDate);
1573
    oprot.writeFieldEnd();
483 rajveer 1574
    oprot.writeFieldBegin(RETIRE_DATE_FIELD_DESC);
1575
    oprot.writeI64(this.retireDate);
1576
    oprot.writeFieldEnd();
103 ashish 1577
    if (this.itemStatus != null) {
1578
      oprot.writeFieldBegin(ITEM_STATUS_FIELD_DESC);
1579
      oprot.writeI32(this.itemStatus.getValue());
1580
      oprot.writeFieldEnd();
1581
    }
1582
    if (this.otherInfo != null) {
1583
      oprot.writeFieldBegin(OTHER_INFO_FIELD_DESC);
1584
      {
1585
        oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.otherInfo.size()));
483 rajveer 1586
        for (Map.Entry<String, String> _iter9 : this.otherInfo.entrySet())
103 ashish 1587
        {
483 rajveer 1588
          oprot.writeString(_iter9.getKey());
1589
          oprot.writeString(_iter9.getValue());
103 ashish 1590
        }
1591
        oprot.writeMapEnd();
1592
      }
1593
      oprot.writeFieldEnd();
1594
    }
100 ashish 1595
    oprot.writeFieldStop();
1596
    oprot.writeStructEnd();
1597
  }
1598
 
1599
  @Override
1600
  public String toString() {
1601
    StringBuilder sb = new StringBuilder("Item(");
1602
    boolean first = true;
1603
 
1604
    sb.append("id:");
1605
    sb.append(this.id);
1606
    first = false;
1607
    if (!first) sb.append(", ");
483 rajveer 1608
    sb.append("manfucturerName:");
1609
    if (this.manfucturerName == null) {
1610
      sb.append("null");
1611
    } else {
1612
      sb.append(this.manfucturerName);
1613
    }
1614
    first = false;
1615
    if (!first) sb.append(", ");
1616
    sb.append("modelNumber:");
1617
    if (this.modelNumber == null) {
1618
      sb.append("null");
1619
    } else {
1620
      sb.append(this.modelNumber);
1621
    }
1622
    first = false;
1623
    if (!first) sb.append(", ");
1624
    sb.append("modelName:");
1625
    if (this.modelName == null) {
1626
      sb.append("null");
1627
    } else {
1628
      sb.append(this.modelName);
1629
    }
1630
    first = false;
1631
    if (!first) sb.append(", ");
1632
    sb.append("category:");
1633
    if (this.category == null) {
1634
      sb.append("null");
1635
    } else {
1636
      sb.append(this.category);
1637
    }
1638
    first = false;
1639
    if (!first) sb.append(", ");
1640
    sb.append("comments:");
1641
    if (this.comments == null) {
1642
      sb.append("null");
1643
    } else {
1644
      sb.append(this.comments);
1645
    }
1646
    first = false;
1647
    if (!first) sb.append(", ");
123 ashish 1648
    sb.append("catalogItemId:");
1649
    sb.append(this.catalogItemId);
100 ashish 1650
    first = false;
1651
    if (!first) sb.append(", ");
483 rajveer 1652
    sb.append("vendorItemId:");
1653
    if (this.vendorItemId == null) {
1654
      sb.append("null");
1655
    } else {
1656
      sb.append(this.vendorItemId);
1657
    }
1658
    first = false;
1659
    if (!first) sb.append(", ");
1660
    sb.append("featureId:");
1661
    sb.append(this.featureId);
1662
    first = false;
1663
    if (!first) sb.append(", ");
1664
    sb.append("featureDescription:");
1665
    if (this.featureDescription == null) {
1666
      sb.append("null");
1667
    } else {
1668
      sb.append(this.featureDescription);
1669
    }
1670
    first = false;
1671
    if (!first) sb.append(", ");
100 ashish 1672
    sb.append("itemInventory:");
1673
    if (this.itemInventory == null) {
1674
      sb.append("null");
1675
    } else {
1676
      sb.append(this.itemInventory);
1677
    }
1678
    first = false;
103 ashish 1679
    if (!first) sb.append(", ");
483 rajveer 1680
    sb.append("mrp:");
1681
    sb.append(this.mrp);
1682
    first = false;
1683
    if (!first) sb.append(", ");
1684
    sb.append("mop:");
1685
    sb.append(this.mop);
1686
    first = false;
1687
    if (!first) sb.append(", ");
1688
    sb.append("sellingPrice:");
1689
    sb.append(this.sellingPrice);
1690
    first = false;
1691
    if (!first) sb.append(", ");
1692
    sb.append("weight:");
1693
    sb.append(this.weight);
1694
    first = false;
1695
    if (!first) sb.append(", ");
103 ashish 1696
    sb.append("addedOn:");
1697
    sb.append(this.addedOn);
1698
    first = false;
1699
    if (!first) sb.append(", ");
1700
    sb.append("startDate:");
1701
    sb.append(this.startDate);
1702
    first = false;
1703
    if (!first) sb.append(", ");
483 rajveer 1704
    sb.append("retireDate:");
1705
    sb.append(this.retireDate);
1706
    first = false;
1707
    if (!first) sb.append(", ");
103 ashish 1708
    sb.append("itemStatus:");
1709
    if (this.itemStatus == null) {
1710
      sb.append("null");
1711
    } else {
1712
      String itemStatus_name = itemStatus.name();
1713
      if (itemStatus_name != null) {
1714
        sb.append(itemStatus_name);
1715
        sb.append(" (");
1716
      }
1717
      sb.append(this.itemStatus);
1718
      if (itemStatus_name != null) {
1719
        sb.append(")");
1720
      }
1721
    }
1722
    first = false;
1723
    if (!first) sb.append(", ");
1724
    sb.append("otherInfo:");
1725
    if (this.otherInfo == null) {
1726
      sb.append("null");
1727
    } else {
1728
      sb.append(this.otherInfo);
1729
    }
1730
    first = false;
100 ashish 1731
    sb.append(")");
1732
    return sb.toString();
1733
  }
1734
 
1735
  public void validate() throws TException {
1736
    // check for required fields
1737
  }
1738
 
1739
}
1740