Subversion Repositories SmartDukaan

Rev

Rev 5711 | Rev 8626 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5711 mandeep.dh 1
/**
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.warehouse;
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.nio.ByteBuffer;
19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
23
public class InventoryAge implements org.apache.thrift.TBase<InventoryAge, InventoryAge._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InventoryAge");
25
 
26
  private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);
27
  private static final org.apache.thrift.protocol.TField BRAND_FIELD_DESC = new org.apache.thrift.protocol.TField("brand", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  private static final org.apache.thrift.protocol.TField MODEL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("modelName", org.apache.thrift.protocol.TType.STRING, (short)3);
29
  private static final org.apache.thrift.protocol.TField MODEL_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("modelNumber", org.apache.thrift.protocol.TType.STRING, (short)4);
30
  private static final org.apache.thrift.protocol.TField COLOR_FIELD_DESC = new org.apache.thrift.protocol.TField("color", org.apache.thrift.protocol.TType.STRING, (short)5);
31
  private static final org.apache.thrift.protocol.TField FRESH_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("freshCount", org.apache.thrift.protocol.TType.I64, (short)6);
32
  private static final org.apache.thrift.protocol.TField ONE_TO_TWO_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("oneToTwoCount", org.apache.thrift.protocol.TType.I64, (short)7);
33
  private static final org.apache.thrift.protocol.TField TWO_TO_THREE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("TwoToThreeCount", org.apache.thrift.protocol.TType.I64, (short)8);
34
  private static final org.apache.thrift.protocol.TField THREE_TO_FOUR_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("ThreeToFourCount", org.apache.thrift.protocol.TType.I64, (short)9);
35
  private static final org.apache.thrift.protocol.TField FOUR_PLUS_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("FourPlusCount", org.apache.thrift.protocol.TType.I64, (short)10);
5768 mandeep.dh 36
  private static final org.apache.thrift.protocol.TField ZERO_PLUS_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("ZeroPlusCount", org.apache.thrift.protocol.TType.I64, (short)11);
37
  private static final org.apache.thrift.protocol.TField ONE_PLUS_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("OnePlusCount", org.apache.thrift.protocol.TType.I64, (short)12);
38
  private static final org.apache.thrift.protocol.TField ZERO_PLUS_COST_FIELD_DESC = new org.apache.thrift.protocol.TField("ZeroPlusCost", org.apache.thrift.protocol.TType.I64, (short)13);
39
  private static final org.apache.thrift.protocol.TField ONE_PLUS_COST_FIELD_DESC = new org.apache.thrift.protocol.TField("OnePlusCost", org.apache.thrift.protocol.TType.I64, (short)14);
40
  private static final org.apache.thrift.protocol.TField CATEGORY_FIELD_DESC = new org.apache.thrift.protocol.TField("category", org.apache.thrift.protocol.TType.STRING, (short)15);
5711 mandeep.dh 41
 
42
  private long itemId; // required
43
  private String brand; // required
44
  private String modelName; // required
45
  private String modelNumber; // required
46
  private String color; // required
47
  private long freshCount; // required
48
  private long oneToTwoCount; // required
49
  private long TwoToThreeCount; // required
50
  private long ThreeToFourCount; // required
51
  private long FourPlusCount; // required
5768 mandeep.dh 52
  private long ZeroPlusCount; // required
53
  private long OnePlusCount; // required
54
  private long ZeroPlusCost; // required
55
  private long OnePlusCost; // required
56
  private String category; // required
5711 mandeep.dh 57
 
58
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
59
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
60
    ITEM_ID((short)1, "itemId"),
61
    BRAND((short)2, "brand"),
62
    MODEL_NAME((short)3, "modelName"),
63
    MODEL_NUMBER((short)4, "modelNumber"),
64
    COLOR((short)5, "color"),
65
    FRESH_COUNT((short)6, "freshCount"),
66
    ONE_TO_TWO_COUNT((short)7, "oneToTwoCount"),
67
    TWO_TO_THREE_COUNT((short)8, "TwoToThreeCount"),
68
    THREE_TO_FOUR_COUNT((short)9, "ThreeToFourCount"),
5768 mandeep.dh 69
    FOUR_PLUS_COUNT((short)10, "FourPlusCount"),
70
    ZERO_PLUS_COUNT((short)11, "ZeroPlusCount"),
71
    ONE_PLUS_COUNT((short)12, "OnePlusCount"),
72
    ZERO_PLUS_COST((short)13, "ZeroPlusCost"),
73
    ONE_PLUS_COST((short)14, "OnePlusCost"),
74
    CATEGORY((short)15, "category");
5711 mandeep.dh 75
 
76
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
77
 
78
    static {
79
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
80
        byName.put(field.getFieldName(), field);
81
      }
82
    }
83
 
84
    /**
85
     * Find the _Fields constant that matches fieldId, or null if its not found.
86
     */
87
    public static _Fields findByThriftId(int fieldId) {
88
      switch(fieldId) {
89
        case 1: // ITEM_ID
90
          return ITEM_ID;
91
        case 2: // BRAND
92
          return BRAND;
93
        case 3: // MODEL_NAME
94
          return MODEL_NAME;
95
        case 4: // MODEL_NUMBER
96
          return MODEL_NUMBER;
97
        case 5: // COLOR
98
          return COLOR;
99
        case 6: // FRESH_COUNT
100
          return FRESH_COUNT;
101
        case 7: // ONE_TO_TWO_COUNT
102
          return ONE_TO_TWO_COUNT;
103
        case 8: // TWO_TO_THREE_COUNT
104
          return TWO_TO_THREE_COUNT;
105
        case 9: // THREE_TO_FOUR_COUNT
106
          return THREE_TO_FOUR_COUNT;
107
        case 10: // FOUR_PLUS_COUNT
108
          return FOUR_PLUS_COUNT;
5768 mandeep.dh 109
        case 11: // ZERO_PLUS_COUNT
110
          return ZERO_PLUS_COUNT;
111
        case 12: // ONE_PLUS_COUNT
112
          return ONE_PLUS_COUNT;
113
        case 13: // ZERO_PLUS_COST
114
          return ZERO_PLUS_COST;
115
        case 14: // ONE_PLUS_COST
116
          return ONE_PLUS_COST;
117
        case 15: // CATEGORY
118
          return CATEGORY;
5711 mandeep.dh 119
        default:
120
          return null;
121
      }
122
    }
123
 
124
    /**
125
     * Find the _Fields constant that matches fieldId, throwing an exception
126
     * if it is not found.
127
     */
128
    public static _Fields findByThriftIdOrThrow(int fieldId) {
129
      _Fields fields = findByThriftId(fieldId);
130
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
131
      return fields;
132
    }
133
 
134
    /**
135
     * Find the _Fields constant that matches name, or null if its not found.
136
     */
137
    public static _Fields findByName(String name) {
138
      return byName.get(name);
139
    }
140
 
141
    private final short _thriftId;
142
    private final String _fieldName;
143
 
144
    _Fields(short thriftId, String fieldName) {
145
      _thriftId = thriftId;
146
      _fieldName = fieldName;
147
    }
148
 
149
    public short getThriftFieldId() {
150
      return _thriftId;
151
    }
152
 
153
    public String getFieldName() {
154
      return _fieldName;
155
    }
156
  }
157
 
158
  // isset id assignments
159
  private static final int __ITEMID_ISSET_ID = 0;
160
  private static final int __FRESHCOUNT_ISSET_ID = 1;
161
  private static final int __ONETOTWOCOUNT_ISSET_ID = 2;
162
  private static final int __TWOTOTHREECOUNT_ISSET_ID = 3;
163
  private static final int __THREETOFOURCOUNT_ISSET_ID = 4;
164
  private static final int __FOURPLUSCOUNT_ISSET_ID = 5;
5768 mandeep.dh 165
  private static final int __ZEROPLUSCOUNT_ISSET_ID = 6;
166
  private static final int __ONEPLUSCOUNT_ISSET_ID = 7;
167
  private static final int __ZEROPLUSCOST_ISSET_ID = 8;
168
  private static final int __ONEPLUSCOST_ISSET_ID = 9;
169
  private BitSet __isset_bit_vector = new BitSet(10);
5711 mandeep.dh 170
 
171
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
172
  static {
173
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
174
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
175
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
176
    tmpMap.put(_Fields.BRAND, new org.apache.thrift.meta_data.FieldMetaData("brand", org.apache.thrift.TFieldRequirementType.DEFAULT, 
177
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
178
    tmpMap.put(_Fields.MODEL_NAME, new org.apache.thrift.meta_data.FieldMetaData("modelName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
179
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
180
    tmpMap.put(_Fields.MODEL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("modelNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
181
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
182
    tmpMap.put(_Fields.COLOR, new org.apache.thrift.meta_data.FieldMetaData("color", org.apache.thrift.TFieldRequirementType.DEFAULT, 
183
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
184
    tmpMap.put(_Fields.FRESH_COUNT, new org.apache.thrift.meta_data.FieldMetaData("freshCount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
185
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
186
    tmpMap.put(_Fields.ONE_TO_TWO_COUNT, new org.apache.thrift.meta_data.FieldMetaData("oneToTwoCount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
187
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
188
    tmpMap.put(_Fields.TWO_TO_THREE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("TwoToThreeCount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
189
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
190
    tmpMap.put(_Fields.THREE_TO_FOUR_COUNT, new org.apache.thrift.meta_data.FieldMetaData("ThreeToFourCount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
191
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
192
    tmpMap.put(_Fields.FOUR_PLUS_COUNT, new org.apache.thrift.meta_data.FieldMetaData("FourPlusCount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
193
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5768 mandeep.dh 194
    tmpMap.put(_Fields.ZERO_PLUS_COUNT, new org.apache.thrift.meta_data.FieldMetaData("ZeroPlusCount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
195
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
196
    tmpMap.put(_Fields.ONE_PLUS_COUNT, new org.apache.thrift.meta_data.FieldMetaData("OnePlusCount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
197
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
198
    tmpMap.put(_Fields.ZERO_PLUS_COST, new org.apache.thrift.meta_data.FieldMetaData("ZeroPlusCost", org.apache.thrift.TFieldRequirementType.DEFAULT, 
199
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
200
    tmpMap.put(_Fields.ONE_PLUS_COST, new org.apache.thrift.meta_data.FieldMetaData("OnePlusCost", org.apache.thrift.TFieldRequirementType.DEFAULT, 
201
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
202
    tmpMap.put(_Fields.CATEGORY, new org.apache.thrift.meta_data.FieldMetaData("category", org.apache.thrift.TFieldRequirementType.DEFAULT, 
203
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
5711 mandeep.dh 204
    metaDataMap = Collections.unmodifiableMap(tmpMap);
205
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InventoryAge.class, metaDataMap);
206
  }
207
 
208
  public InventoryAge() {
209
  }
210
 
211
  public InventoryAge(
212
    long itemId,
213
    String brand,
214
    String modelName,
215
    String modelNumber,
216
    String color,
217
    long freshCount,
218
    long oneToTwoCount,
219
    long TwoToThreeCount,
220
    long ThreeToFourCount,
5768 mandeep.dh 221
    long FourPlusCount,
222
    long ZeroPlusCount,
223
    long OnePlusCount,
224
    long ZeroPlusCost,
225
    long OnePlusCost,
226
    String category)
5711 mandeep.dh 227
  {
228
    this();
229
    this.itemId = itemId;
230
    setItemIdIsSet(true);
231
    this.brand = brand;
232
    this.modelName = modelName;
233
    this.modelNumber = modelNumber;
234
    this.color = color;
235
    this.freshCount = freshCount;
236
    setFreshCountIsSet(true);
237
    this.oneToTwoCount = oneToTwoCount;
238
    setOneToTwoCountIsSet(true);
239
    this.TwoToThreeCount = TwoToThreeCount;
240
    setTwoToThreeCountIsSet(true);
241
    this.ThreeToFourCount = ThreeToFourCount;
242
    setThreeToFourCountIsSet(true);
243
    this.FourPlusCount = FourPlusCount;
244
    setFourPlusCountIsSet(true);
5768 mandeep.dh 245
    this.ZeroPlusCount = ZeroPlusCount;
246
    setZeroPlusCountIsSet(true);
247
    this.OnePlusCount = OnePlusCount;
248
    setOnePlusCountIsSet(true);
249
    this.ZeroPlusCost = ZeroPlusCost;
250
    setZeroPlusCostIsSet(true);
251
    this.OnePlusCost = OnePlusCost;
252
    setOnePlusCostIsSet(true);
253
    this.category = category;
5711 mandeep.dh 254
  }
255
 
256
  /**
257
   * Performs a deep copy on <i>other</i>.
258
   */
259
  public InventoryAge(InventoryAge other) {
260
    __isset_bit_vector.clear();
261
    __isset_bit_vector.or(other.__isset_bit_vector);
262
    this.itemId = other.itemId;
263
    if (other.isSetBrand()) {
264
      this.brand = other.brand;
265
    }
266
    if (other.isSetModelName()) {
267
      this.modelName = other.modelName;
268
    }
269
    if (other.isSetModelNumber()) {
270
      this.modelNumber = other.modelNumber;
271
    }
272
    if (other.isSetColor()) {
273
      this.color = other.color;
274
    }
275
    this.freshCount = other.freshCount;
276
    this.oneToTwoCount = other.oneToTwoCount;
277
    this.TwoToThreeCount = other.TwoToThreeCount;
278
    this.ThreeToFourCount = other.ThreeToFourCount;
279
    this.FourPlusCount = other.FourPlusCount;
5768 mandeep.dh 280
    this.ZeroPlusCount = other.ZeroPlusCount;
281
    this.OnePlusCount = other.OnePlusCount;
282
    this.ZeroPlusCost = other.ZeroPlusCost;
283
    this.OnePlusCost = other.OnePlusCost;
284
    if (other.isSetCategory()) {
285
      this.category = other.category;
286
    }
5711 mandeep.dh 287
  }
288
 
289
  public InventoryAge deepCopy() {
290
    return new InventoryAge(this);
291
  }
292
 
293
  @Override
294
  public void clear() {
295
    setItemIdIsSet(false);
296
    this.itemId = 0;
297
    this.brand = null;
298
    this.modelName = null;
299
    this.modelNumber = null;
300
    this.color = null;
301
    setFreshCountIsSet(false);
302
    this.freshCount = 0;
303
    setOneToTwoCountIsSet(false);
304
    this.oneToTwoCount = 0;
305
    setTwoToThreeCountIsSet(false);
306
    this.TwoToThreeCount = 0;
307
    setThreeToFourCountIsSet(false);
308
    this.ThreeToFourCount = 0;
309
    setFourPlusCountIsSet(false);
310
    this.FourPlusCount = 0;
5768 mandeep.dh 311
    setZeroPlusCountIsSet(false);
312
    this.ZeroPlusCount = 0;
313
    setOnePlusCountIsSet(false);
314
    this.OnePlusCount = 0;
315
    setZeroPlusCostIsSet(false);
316
    this.ZeroPlusCost = 0;
317
    setOnePlusCostIsSet(false);
318
    this.OnePlusCost = 0;
319
    this.category = null;
5711 mandeep.dh 320
  }
321
 
322
  public long getItemId() {
323
    return this.itemId;
324
  }
325
 
326
  public void setItemId(long itemId) {
327
    this.itemId = itemId;
328
    setItemIdIsSet(true);
329
  }
330
 
331
  public void unsetItemId() {
332
    __isset_bit_vector.clear(__ITEMID_ISSET_ID);
333
  }
334
 
335
  /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
336
  public boolean isSetItemId() {
337
    return __isset_bit_vector.get(__ITEMID_ISSET_ID);
338
  }
339
 
340
  public void setItemIdIsSet(boolean value) {
341
    __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
342
  }
343
 
344
  public String getBrand() {
345
    return this.brand;
346
  }
347
 
348
  public void setBrand(String brand) {
349
    this.brand = brand;
350
  }
351
 
352
  public void unsetBrand() {
353
    this.brand = null;
354
  }
355
 
356
  /** Returns true if field brand is set (has been assigned a value) and false otherwise */
357
  public boolean isSetBrand() {
358
    return this.brand != null;
359
  }
360
 
361
  public void setBrandIsSet(boolean value) {
362
    if (!value) {
363
      this.brand = null;
364
    }
365
  }
366
 
367
  public String getModelName() {
368
    return this.modelName;
369
  }
370
 
371
  public void setModelName(String modelName) {
372
    this.modelName = modelName;
373
  }
374
 
375
  public void unsetModelName() {
376
    this.modelName = null;
377
  }
378
 
379
  /** Returns true if field modelName is set (has been assigned a value) and false otherwise */
380
  public boolean isSetModelName() {
381
    return this.modelName != null;
382
  }
383
 
384
  public void setModelNameIsSet(boolean value) {
385
    if (!value) {
386
      this.modelName = null;
387
    }
388
  }
389
 
390
  public String getModelNumber() {
391
    return this.modelNumber;
392
  }
393
 
394
  public void setModelNumber(String modelNumber) {
395
    this.modelNumber = modelNumber;
396
  }
397
 
398
  public void unsetModelNumber() {
399
    this.modelNumber = null;
400
  }
401
 
402
  /** Returns true if field modelNumber is set (has been assigned a value) and false otherwise */
403
  public boolean isSetModelNumber() {
404
    return this.modelNumber != null;
405
  }
406
 
407
  public void setModelNumberIsSet(boolean value) {
408
    if (!value) {
409
      this.modelNumber = null;
410
    }
411
  }
412
 
413
  public String getColor() {
414
    return this.color;
415
  }
416
 
417
  public void setColor(String color) {
418
    this.color = color;
419
  }
420
 
421
  public void unsetColor() {
422
    this.color = null;
423
  }
424
 
425
  /** Returns true if field color is set (has been assigned a value) and false otherwise */
426
  public boolean isSetColor() {
427
    return this.color != null;
428
  }
429
 
430
  public void setColorIsSet(boolean value) {
431
    if (!value) {
432
      this.color = null;
433
    }
434
  }
435
 
436
  public long getFreshCount() {
437
    return this.freshCount;
438
  }
439
 
440
  public void setFreshCount(long freshCount) {
441
    this.freshCount = freshCount;
442
    setFreshCountIsSet(true);
443
  }
444
 
445
  public void unsetFreshCount() {
446
    __isset_bit_vector.clear(__FRESHCOUNT_ISSET_ID);
447
  }
448
 
449
  /** Returns true if field freshCount is set (has been assigned a value) and false otherwise */
450
  public boolean isSetFreshCount() {
451
    return __isset_bit_vector.get(__FRESHCOUNT_ISSET_ID);
452
  }
453
 
454
  public void setFreshCountIsSet(boolean value) {
455
    __isset_bit_vector.set(__FRESHCOUNT_ISSET_ID, value);
456
  }
457
 
458
  public long getOneToTwoCount() {
459
    return this.oneToTwoCount;
460
  }
461
 
462
  public void setOneToTwoCount(long oneToTwoCount) {
463
    this.oneToTwoCount = oneToTwoCount;
464
    setOneToTwoCountIsSet(true);
465
  }
466
 
467
  public void unsetOneToTwoCount() {
468
    __isset_bit_vector.clear(__ONETOTWOCOUNT_ISSET_ID);
469
  }
470
 
471
  /** Returns true if field oneToTwoCount is set (has been assigned a value) and false otherwise */
472
  public boolean isSetOneToTwoCount() {
473
    return __isset_bit_vector.get(__ONETOTWOCOUNT_ISSET_ID);
474
  }
475
 
476
  public void setOneToTwoCountIsSet(boolean value) {
477
    __isset_bit_vector.set(__ONETOTWOCOUNT_ISSET_ID, value);
478
  }
479
 
480
  public long getTwoToThreeCount() {
481
    return this.TwoToThreeCount;
482
  }
483
 
484
  public void setTwoToThreeCount(long TwoToThreeCount) {
485
    this.TwoToThreeCount = TwoToThreeCount;
486
    setTwoToThreeCountIsSet(true);
487
  }
488
 
489
  public void unsetTwoToThreeCount() {
490
    __isset_bit_vector.clear(__TWOTOTHREECOUNT_ISSET_ID);
491
  }
492
 
493
  /** Returns true if field TwoToThreeCount is set (has been assigned a value) and false otherwise */
494
  public boolean isSetTwoToThreeCount() {
495
    return __isset_bit_vector.get(__TWOTOTHREECOUNT_ISSET_ID);
496
  }
497
 
498
  public void setTwoToThreeCountIsSet(boolean value) {
499
    __isset_bit_vector.set(__TWOTOTHREECOUNT_ISSET_ID, value);
500
  }
501
 
502
  public long getThreeToFourCount() {
503
    return this.ThreeToFourCount;
504
  }
505
 
506
  public void setThreeToFourCount(long ThreeToFourCount) {
507
    this.ThreeToFourCount = ThreeToFourCount;
508
    setThreeToFourCountIsSet(true);
509
  }
510
 
511
  public void unsetThreeToFourCount() {
512
    __isset_bit_vector.clear(__THREETOFOURCOUNT_ISSET_ID);
513
  }
514
 
515
  /** Returns true if field ThreeToFourCount is set (has been assigned a value) and false otherwise */
516
  public boolean isSetThreeToFourCount() {
517
    return __isset_bit_vector.get(__THREETOFOURCOUNT_ISSET_ID);
518
  }
519
 
520
  public void setThreeToFourCountIsSet(boolean value) {
521
    __isset_bit_vector.set(__THREETOFOURCOUNT_ISSET_ID, value);
522
  }
523
 
524
  public long getFourPlusCount() {
525
    return this.FourPlusCount;
526
  }
527
 
528
  public void setFourPlusCount(long FourPlusCount) {
529
    this.FourPlusCount = FourPlusCount;
530
    setFourPlusCountIsSet(true);
531
  }
532
 
533
  public void unsetFourPlusCount() {
534
    __isset_bit_vector.clear(__FOURPLUSCOUNT_ISSET_ID);
535
  }
536
 
537
  /** Returns true if field FourPlusCount is set (has been assigned a value) and false otherwise */
538
  public boolean isSetFourPlusCount() {
539
    return __isset_bit_vector.get(__FOURPLUSCOUNT_ISSET_ID);
540
  }
541
 
542
  public void setFourPlusCountIsSet(boolean value) {
543
    __isset_bit_vector.set(__FOURPLUSCOUNT_ISSET_ID, value);
544
  }
545
 
5768 mandeep.dh 546
  public long getZeroPlusCount() {
547
    return this.ZeroPlusCount;
548
  }
549
 
550
  public void setZeroPlusCount(long ZeroPlusCount) {
551
    this.ZeroPlusCount = ZeroPlusCount;
552
    setZeroPlusCountIsSet(true);
553
  }
554
 
555
  public void unsetZeroPlusCount() {
556
    __isset_bit_vector.clear(__ZEROPLUSCOUNT_ISSET_ID);
557
  }
558
 
559
  /** Returns true if field ZeroPlusCount is set (has been assigned a value) and false otherwise */
560
  public boolean isSetZeroPlusCount() {
561
    return __isset_bit_vector.get(__ZEROPLUSCOUNT_ISSET_ID);
562
  }
563
 
564
  public void setZeroPlusCountIsSet(boolean value) {
565
    __isset_bit_vector.set(__ZEROPLUSCOUNT_ISSET_ID, value);
566
  }
567
 
568
  public long getOnePlusCount() {
569
    return this.OnePlusCount;
570
  }
571
 
572
  public void setOnePlusCount(long OnePlusCount) {
573
    this.OnePlusCount = OnePlusCount;
574
    setOnePlusCountIsSet(true);
575
  }
576
 
577
  public void unsetOnePlusCount() {
578
    __isset_bit_vector.clear(__ONEPLUSCOUNT_ISSET_ID);
579
  }
580
 
581
  /** Returns true if field OnePlusCount is set (has been assigned a value) and false otherwise */
582
  public boolean isSetOnePlusCount() {
583
    return __isset_bit_vector.get(__ONEPLUSCOUNT_ISSET_ID);
584
  }
585
 
586
  public void setOnePlusCountIsSet(boolean value) {
587
    __isset_bit_vector.set(__ONEPLUSCOUNT_ISSET_ID, value);
588
  }
589
 
590
  public long getZeroPlusCost() {
591
    return this.ZeroPlusCost;
592
  }
593
 
594
  public void setZeroPlusCost(long ZeroPlusCost) {
595
    this.ZeroPlusCost = ZeroPlusCost;
596
    setZeroPlusCostIsSet(true);
597
  }
598
 
599
  public void unsetZeroPlusCost() {
600
    __isset_bit_vector.clear(__ZEROPLUSCOST_ISSET_ID);
601
  }
602
 
603
  /** Returns true if field ZeroPlusCost is set (has been assigned a value) and false otherwise */
604
  public boolean isSetZeroPlusCost() {
605
    return __isset_bit_vector.get(__ZEROPLUSCOST_ISSET_ID);
606
  }
607
 
608
  public void setZeroPlusCostIsSet(boolean value) {
609
    __isset_bit_vector.set(__ZEROPLUSCOST_ISSET_ID, value);
610
  }
611
 
612
  public long getOnePlusCost() {
613
    return this.OnePlusCost;
614
  }
615
 
616
  public void setOnePlusCost(long OnePlusCost) {
617
    this.OnePlusCost = OnePlusCost;
618
    setOnePlusCostIsSet(true);
619
  }
620
 
621
  public void unsetOnePlusCost() {
622
    __isset_bit_vector.clear(__ONEPLUSCOST_ISSET_ID);
623
  }
624
 
625
  /** Returns true if field OnePlusCost is set (has been assigned a value) and false otherwise */
626
  public boolean isSetOnePlusCost() {
627
    return __isset_bit_vector.get(__ONEPLUSCOST_ISSET_ID);
628
  }
629
 
630
  public void setOnePlusCostIsSet(boolean value) {
631
    __isset_bit_vector.set(__ONEPLUSCOST_ISSET_ID, value);
632
  }
633
 
634
  public String getCategory() {
635
    return this.category;
636
  }
637
 
638
  public void setCategory(String category) {
639
    this.category = category;
640
  }
641
 
642
  public void unsetCategory() {
643
    this.category = null;
644
  }
645
 
646
  /** Returns true if field category is set (has been assigned a value) and false otherwise */
647
  public boolean isSetCategory() {
648
    return this.category != null;
649
  }
650
 
651
  public void setCategoryIsSet(boolean value) {
652
    if (!value) {
653
      this.category = null;
654
    }
655
  }
656
 
5711 mandeep.dh 657
  public void setFieldValue(_Fields field, Object value) {
658
    switch (field) {
659
    case ITEM_ID:
660
      if (value == null) {
661
        unsetItemId();
662
      } else {
663
        setItemId((Long)value);
664
      }
665
      break;
666
 
667
    case BRAND:
668
      if (value == null) {
669
        unsetBrand();
670
      } else {
671
        setBrand((String)value);
672
      }
673
      break;
674
 
675
    case MODEL_NAME:
676
      if (value == null) {
677
        unsetModelName();
678
      } else {
679
        setModelName((String)value);
680
      }
681
      break;
682
 
683
    case MODEL_NUMBER:
684
      if (value == null) {
685
        unsetModelNumber();
686
      } else {
687
        setModelNumber((String)value);
688
      }
689
      break;
690
 
691
    case COLOR:
692
      if (value == null) {
693
        unsetColor();
694
      } else {
695
        setColor((String)value);
696
      }
697
      break;
698
 
699
    case FRESH_COUNT:
700
      if (value == null) {
701
        unsetFreshCount();
702
      } else {
703
        setFreshCount((Long)value);
704
      }
705
      break;
706
 
707
    case ONE_TO_TWO_COUNT:
708
      if (value == null) {
709
        unsetOneToTwoCount();
710
      } else {
711
        setOneToTwoCount((Long)value);
712
      }
713
      break;
714
 
715
    case TWO_TO_THREE_COUNT:
716
      if (value == null) {
717
        unsetTwoToThreeCount();
718
      } else {
719
        setTwoToThreeCount((Long)value);
720
      }
721
      break;
722
 
723
    case THREE_TO_FOUR_COUNT:
724
      if (value == null) {
725
        unsetThreeToFourCount();
726
      } else {
727
        setThreeToFourCount((Long)value);
728
      }
729
      break;
730
 
731
    case FOUR_PLUS_COUNT:
732
      if (value == null) {
733
        unsetFourPlusCount();
734
      } else {
735
        setFourPlusCount((Long)value);
736
      }
737
      break;
738
 
5768 mandeep.dh 739
    case ZERO_PLUS_COUNT:
740
      if (value == null) {
741
        unsetZeroPlusCount();
742
      } else {
743
        setZeroPlusCount((Long)value);
744
      }
745
      break;
746
 
747
    case ONE_PLUS_COUNT:
748
      if (value == null) {
749
        unsetOnePlusCount();
750
      } else {
751
        setOnePlusCount((Long)value);
752
      }
753
      break;
754
 
755
    case ZERO_PLUS_COST:
756
      if (value == null) {
757
        unsetZeroPlusCost();
758
      } else {
759
        setZeroPlusCost((Long)value);
760
      }
761
      break;
762
 
763
    case ONE_PLUS_COST:
764
      if (value == null) {
765
        unsetOnePlusCost();
766
      } else {
767
        setOnePlusCost((Long)value);
768
      }
769
      break;
770
 
771
    case CATEGORY:
772
      if (value == null) {
773
        unsetCategory();
774
      } else {
775
        setCategory((String)value);
776
      }
777
      break;
778
 
5711 mandeep.dh 779
    }
780
  }
781
 
782
  public Object getFieldValue(_Fields field) {
783
    switch (field) {
784
    case ITEM_ID:
785
      return Long.valueOf(getItemId());
786
 
787
    case BRAND:
788
      return getBrand();
789
 
790
    case MODEL_NAME:
791
      return getModelName();
792
 
793
    case MODEL_NUMBER:
794
      return getModelNumber();
795
 
796
    case COLOR:
797
      return getColor();
798
 
799
    case FRESH_COUNT:
800
      return Long.valueOf(getFreshCount());
801
 
802
    case ONE_TO_TWO_COUNT:
803
      return Long.valueOf(getOneToTwoCount());
804
 
805
    case TWO_TO_THREE_COUNT:
806
      return Long.valueOf(getTwoToThreeCount());
807
 
808
    case THREE_TO_FOUR_COUNT:
809
      return Long.valueOf(getThreeToFourCount());
810
 
811
    case FOUR_PLUS_COUNT:
812
      return Long.valueOf(getFourPlusCount());
813
 
5768 mandeep.dh 814
    case ZERO_PLUS_COUNT:
815
      return Long.valueOf(getZeroPlusCount());
816
 
817
    case ONE_PLUS_COUNT:
818
      return Long.valueOf(getOnePlusCount());
819
 
820
    case ZERO_PLUS_COST:
821
      return Long.valueOf(getZeroPlusCost());
822
 
823
    case ONE_PLUS_COST:
824
      return Long.valueOf(getOnePlusCost());
825
 
826
    case CATEGORY:
827
      return getCategory();
828
 
5711 mandeep.dh 829
    }
830
    throw new IllegalStateException();
831
  }
832
 
833
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
834
  public boolean isSet(_Fields field) {
835
    if (field == null) {
836
      throw new IllegalArgumentException();
837
    }
838
 
839
    switch (field) {
840
    case ITEM_ID:
841
      return isSetItemId();
842
    case BRAND:
843
      return isSetBrand();
844
    case MODEL_NAME:
845
      return isSetModelName();
846
    case MODEL_NUMBER:
847
      return isSetModelNumber();
848
    case COLOR:
849
      return isSetColor();
850
    case FRESH_COUNT:
851
      return isSetFreshCount();
852
    case ONE_TO_TWO_COUNT:
853
      return isSetOneToTwoCount();
854
    case TWO_TO_THREE_COUNT:
855
      return isSetTwoToThreeCount();
856
    case THREE_TO_FOUR_COUNT:
857
      return isSetThreeToFourCount();
858
    case FOUR_PLUS_COUNT:
859
      return isSetFourPlusCount();
5768 mandeep.dh 860
    case ZERO_PLUS_COUNT:
861
      return isSetZeroPlusCount();
862
    case ONE_PLUS_COUNT:
863
      return isSetOnePlusCount();
864
    case ZERO_PLUS_COST:
865
      return isSetZeroPlusCost();
866
    case ONE_PLUS_COST:
867
      return isSetOnePlusCost();
868
    case CATEGORY:
869
      return isSetCategory();
5711 mandeep.dh 870
    }
871
    throw new IllegalStateException();
872
  }
873
 
874
  @Override
875
  public boolean equals(Object that) {
876
    if (that == null)
877
      return false;
878
    if (that instanceof InventoryAge)
879
      return this.equals((InventoryAge)that);
880
    return false;
881
  }
882
 
883
  public boolean equals(InventoryAge that) {
884
    if (that == null)
885
      return false;
886
 
887
    boolean this_present_itemId = true;
888
    boolean that_present_itemId = true;
889
    if (this_present_itemId || that_present_itemId) {
890
      if (!(this_present_itemId && that_present_itemId))
891
        return false;
892
      if (this.itemId != that.itemId)
893
        return false;
894
    }
895
 
896
    boolean this_present_brand = true && this.isSetBrand();
897
    boolean that_present_brand = true && that.isSetBrand();
898
    if (this_present_brand || that_present_brand) {
899
      if (!(this_present_brand && that_present_brand))
900
        return false;
901
      if (!this.brand.equals(that.brand))
902
        return false;
903
    }
904
 
905
    boolean this_present_modelName = true && this.isSetModelName();
906
    boolean that_present_modelName = true && that.isSetModelName();
907
    if (this_present_modelName || that_present_modelName) {
908
      if (!(this_present_modelName && that_present_modelName))
909
        return false;
910
      if (!this.modelName.equals(that.modelName))
911
        return false;
912
    }
913
 
914
    boolean this_present_modelNumber = true && this.isSetModelNumber();
915
    boolean that_present_modelNumber = true && that.isSetModelNumber();
916
    if (this_present_modelNumber || that_present_modelNumber) {
917
      if (!(this_present_modelNumber && that_present_modelNumber))
918
        return false;
919
      if (!this.modelNumber.equals(that.modelNumber))
920
        return false;
921
    }
922
 
923
    boolean this_present_color = true && this.isSetColor();
924
    boolean that_present_color = true && that.isSetColor();
925
    if (this_present_color || that_present_color) {
926
      if (!(this_present_color && that_present_color))
927
        return false;
928
      if (!this.color.equals(that.color))
929
        return false;
930
    }
931
 
932
    boolean this_present_freshCount = true;
933
    boolean that_present_freshCount = true;
934
    if (this_present_freshCount || that_present_freshCount) {
935
      if (!(this_present_freshCount && that_present_freshCount))
936
        return false;
937
      if (this.freshCount != that.freshCount)
938
        return false;
939
    }
940
 
941
    boolean this_present_oneToTwoCount = true;
942
    boolean that_present_oneToTwoCount = true;
943
    if (this_present_oneToTwoCount || that_present_oneToTwoCount) {
944
      if (!(this_present_oneToTwoCount && that_present_oneToTwoCount))
945
        return false;
946
      if (this.oneToTwoCount != that.oneToTwoCount)
947
        return false;
948
    }
949
 
950
    boolean this_present_TwoToThreeCount = true;
951
    boolean that_present_TwoToThreeCount = true;
952
    if (this_present_TwoToThreeCount || that_present_TwoToThreeCount) {
953
      if (!(this_present_TwoToThreeCount && that_present_TwoToThreeCount))
954
        return false;
955
      if (this.TwoToThreeCount != that.TwoToThreeCount)
956
        return false;
957
    }
958
 
959
    boolean this_present_ThreeToFourCount = true;
960
    boolean that_present_ThreeToFourCount = true;
961
    if (this_present_ThreeToFourCount || that_present_ThreeToFourCount) {
962
      if (!(this_present_ThreeToFourCount && that_present_ThreeToFourCount))
963
        return false;
964
      if (this.ThreeToFourCount != that.ThreeToFourCount)
965
        return false;
966
    }
967
 
968
    boolean this_present_FourPlusCount = true;
969
    boolean that_present_FourPlusCount = true;
970
    if (this_present_FourPlusCount || that_present_FourPlusCount) {
971
      if (!(this_present_FourPlusCount && that_present_FourPlusCount))
972
        return false;
973
      if (this.FourPlusCount != that.FourPlusCount)
974
        return false;
975
    }
976
 
5768 mandeep.dh 977
    boolean this_present_ZeroPlusCount = true;
978
    boolean that_present_ZeroPlusCount = true;
979
    if (this_present_ZeroPlusCount || that_present_ZeroPlusCount) {
980
      if (!(this_present_ZeroPlusCount && that_present_ZeroPlusCount))
981
        return false;
982
      if (this.ZeroPlusCount != that.ZeroPlusCount)
983
        return false;
984
    }
985
 
986
    boolean this_present_OnePlusCount = true;
987
    boolean that_present_OnePlusCount = true;
988
    if (this_present_OnePlusCount || that_present_OnePlusCount) {
989
      if (!(this_present_OnePlusCount && that_present_OnePlusCount))
990
        return false;
991
      if (this.OnePlusCount != that.OnePlusCount)
992
        return false;
993
    }
994
 
995
    boolean this_present_ZeroPlusCost = true;
996
    boolean that_present_ZeroPlusCost = true;
997
    if (this_present_ZeroPlusCost || that_present_ZeroPlusCost) {
998
      if (!(this_present_ZeroPlusCost && that_present_ZeroPlusCost))
999
        return false;
1000
      if (this.ZeroPlusCost != that.ZeroPlusCost)
1001
        return false;
1002
    }
1003
 
1004
    boolean this_present_OnePlusCost = true;
1005
    boolean that_present_OnePlusCost = true;
1006
    if (this_present_OnePlusCost || that_present_OnePlusCost) {
1007
      if (!(this_present_OnePlusCost && that_present_OnePlusCost))
1008
        return false;
1009
      if (this.OnePlusCost != that.OnePlusCost)
1010
        return false;
1011
    }
1012
 
1013
    boolean this_present_category = true && this.isSetCategory();
1014
    boolean that_present_category = true && that.isSetCategory();
1015
    if (this_present_category || that_present_category) {
1016
      if (!(this_present_category && that_present_category))
1017
        return false;
1018
      if (!this.category.equals(that.category))
1019
        return false;
1020
    }
1021
 
5711 mandeep.dh 1022
    return true;
1023
  }
1024
 
1025
  @Override
1026
  public int hashCode() {
1027
    return 0;
1028
  }
1029
 
1030
  public int compareTo(InventoryAge other) {
1031
    if (!getClass().equals(other.getClass())) {
1032
      return getClass().getName().compareTo(other.getClass().getName());
1033
    }
1034
 
1035
    int lastComparison = 0;
1036
    InventoryAge typedOther = (InventoryAge)other;
1037
 
1038
    lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
1039
    if (lastComparison != 0) {
1040
      return lastComparison;
1041
    }
1042
    if (isSetItemId()) {
1043
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
1044
      if (lastComparison != 0) {
1045
        return lastComparison;
1046
      }
1047
    }
1048
    lastComparison = Boolean.valueOf(isSetBrand()).compareTo(typedOther.isSetBrand());
1049
    if (lastComparison != 0) {
1050
      return lastComparison;
1051
    }
1052
    if (isSetBrand()) {
1053
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.brand, typedOther.brand);
1054
      if (lastComparison != 0) {
1055
        return lastComparison;
1056
      }
1057
    }
1058
    lastComparison = Boolean.valueOf(isSetModelName()).compareTo(typedOther.isSetModelName());
1059
    if (lastComparison != 0) {
1060
      return lastComparison;
1061
    }
1062
    if (isSetModelName()) {
1063
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modelName, typedOther.modelName);
1064
      if (lastComparison != 0) {
1065
        return lastComparison;
1066
      }
1067
    }
1068
    lastComparison = Boolean.valueOf(isSetModelNumber()).compareTo(typedOther.isSetModelNumber());
1069
    if (lastComparison != 0) {
1070
      return lastComparison;
1071
    }
1072
    if (isSetModelNumber()) {
1073
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modelNumber, typedOther.modelNumber);
1074
      if (lastComparison != 0) {
1075
        return lastComparison;
1076
      }
1077
    }
1078
    lastComparison = Boolean.valueOf(isSetColor()).compareTo(typedOther.isSetColor());
1079
    if (lastComparison != 0) {
1080
      return lastComparison;
1081
    }
1082
    if (isSetColor()) {
1083
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.color, typedOther.color);
1084
      if (lastComparison != 0) {
1085
        return lastComparison;
1086
      }
1087
    }
1088
    lastComparison = Boolean.valueOf(isSetFreshCount()).compareTo(typedOther.isSetFreshCount());
1089
    if (lastComparison != 0) {
1090
      return lastComparison;
1091
    }
1092
    if (isSetFreshCount()) {
1093
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freshCount, typedOther.freshCount);
1094
      if (lastComparison != 0) {
1095
        return lastComparison;
1096
      }
1097
    }
1098
    lastComparison = Boolean.valueOf(isSetOneToTwoCount()).compareTo(typedOther.isSetOneToTwoCount());
1099
    if (lastComparison != 0) {
1100
      return lastComparison;
1101
    }
1102
    if (isSetOneToTwoCount()) {
1103
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.oneToTwoCount, typedOther.oneToTwoCount);
1104
      if (lastComparison != 0) {
1105
        return lastComparison;
1106
      }
1107
    }
1108
    lastComparison = Boolean.valueOf(isSetTwoToThreeCount()).compareTo(typedOther.isSetTwoToThreeCount());
1109
    if (lastComparison != 0) {
1110
      return lastComparison;
1111
    }
1112
    if (isSetTwoToThreeCount()) {
1113
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.TwoToThreeCount, typedOther.TwoToThreeCount);
1114
      if (lastComparison != 0) {
1115
        return lastComparison;
1116
      }
1117
    }
1118
    lastComparison = Boolean.valueOf(isSetThreeToFourCount()).compareTo(typedOther.isSetThreeToFourCount());
1119
    if (lastComparison != 0) {
1120
      return lastComparison;
1121
    }
1122
    if (isSetThreeToFourCount()) {
1123
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ThreeToFourCount, typedOther.ThreeToFourCount);
1124
      if (lastComparison != 0) {
1125
        return lastComparison;
1126
      }
1127
    }
1128
    lastComparison = Boolean.valueOf(isSetFourPlusCount()).compareTo(typedOther.isSetFourPlusCount());
1129
    if (lastComparison != 0) {
1130
      return lastComparison;
1131
    }
1132
    if (isSetFourPlusCount()) {
1133
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.FourPlusCount, typedOther.FourPlusCount);
1134
      if (lastComparison != 0) {
1135
        return lastComparison;
1136
      }
1137
    }
5768 mandeep.dh 1138
    lastComparison = Boolean.valueOf(isSetZeroPlusCount()).compareTo(typedOther.isSetZeroPlusCount());
1139
    if (lastComparison != 0) {
1140
      return lastComparison;
1141
    }
1142
    if (isSetZeroPlusCount()) {
1143
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ZeroPlusCount, typedOther.ZeroPlusCount);
1144
      if (lastComparison != 0) {
1145
        return lastComparison;
1146
      }
1147
    }
1148
    lastComparison = Boolean.valueOf(isSetOnePlusCount()).compareTo(typedOther.isSetOnePlusCount());
1149
    if (lastComparison != 0) {
1150
      return lastComparison;
1151
    }
1152
    if (isSetOnePlusCount()) {
1153
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.OnePlusCount, typedOther.OnePlusCount);
1154
      if (lastComparison != 0) {
1155
        return lastComparison;
1156
      }
1157
    }
1158
    lastComparison = Boolean.valueOf(isSetZeroPlusCost()).compareTo(typedOther.isSetZeroPlusCost());
1159
    if (lastComparison != 0) {
1160
      return lastComparison;
1161
    }
1162
    if (isSetZeroPlusCost()) {
1163
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ZeroPlusCost, typedOther.ZeroPlusCost);
1164
      if (lastComparison != 0) {
1165
        return lastComparison;
1166
      }
1167
    }
1168
    lastComparison = Boolean.valueOf(isSetOnePlusCost()).compareTo(typedOther.isSetOnePlusCost());
1169
    if (lastComparison != 0) {
1170
      return lastComparison;
1171
    }
1172
    if (isSetOnePlusCost()) {
1173
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.OnePlusCost, typedOther.OnePlusCost);
1174
      if (lastComparison != 0) {
1175
        return lastComparison;
1176
      }
1177
    }
1178
    lastComparison = Boolean.valueOf(isSetCategory()).compareTo(typedOther.isSetCategory());
1179
    if (lastComparison != 0) {
1180
      return lastComparison;
1181
    }
1182
    if (isSetCategory()) {
1183
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.category, typedOther.category);
1184
      if (lastComparison != 0) {
1185
        return lastComparison;
1186
      }
1187
    }
5711 mandeep.dh 1188
    return 0;
1189
  }
1190
 
1191
  public _Fields fieldForId(int fieldId) {
1192
    return _Fields.findByThriftId(fieldId);
1193
  }
1194
 
1195
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1196
    org.apache.thrift.protocol.TField field;
1197
    iprot.readStructBegin();
1198
    while (true)
1199
    {
1200
      field = iprot.readFieldBegin();
1201
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1202
        break;
1203
      }
1204
      switch (field.id) {
1205
        case 1: // ITEM_ID
1206
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1207
            this.itemId = iprot.readI64();
1208
            setItemIdIsSet(true);
1209
          } else { 
1210
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1211
          }
1212
          break;
1213
        case 2: // BRAND
1214
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1215
            this.brand = iprot.readString();
1216
          } else { 
1217
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1218
          }
1219
          break;
1220
        case 3: // MODEL_NAME
1221
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1222
            this.modelName = iprot.readString();
1223
          } else { 
1224
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1225
          }
1226
          break;
1227
        case 4: // MODEL_NUMBER
1228
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1229
            this.modelNumber = iprot.readString();
1230
          } else { 
1231
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1232
          }
1233
          break;
1234
        case 5: // COLOR
1235
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1236
            this.color = iprot.readString();
1237
          } else { 
1238
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1239
          }
1240
          break;
1241
        case 6: // FRESH_COUNT
1242
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1243
            this.freshCount = iprot.readI64();
1244
            setFreshCountIsSet(true);
1245
          } else { 
1246
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1247
          }
1248
          break;
1249
        case 7: // ONE_TO_TWO_COUNT
1250
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1251
            this.oneToTwoCount = iprot.readI64();
1252
            setOneToTwoCountIsSet(true);
1253
          } else { 
1254
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1255
          }
1256
          break;
1257
        case 8: // TWO_TO_THREE_COUNT
1258
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1259
            this.TwoToThreeCount = iprot.readI64();
1260
            setTwoToThreeCountIsSet(true);
1261
          } else { 
1262
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1263
          }
1264
          break;
1265
        case 9: // THREE_TO_FOUR_COUNT
1266
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1267
            this.ThreeToFourCount = iprot.readI64();
1268
            setThreeToFourCountIsSet(true);
1269
          } else { 
1270
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1271
          }
1272
          break;
1273
        case 10: // FOUR_PLUS_COUNT
1274
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1275
            this.FourPlusCount = iprot.readI64();
1276
            setFourPlusCountIsSet(true);
1277
          } else { 
1278
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1279
          }
1280
          break;
5768 mandeep.dh 1281
        case 11: // ZERO_PLUS_COUNT
1282
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1283
            this.ZeroPlusCount = iprot.readI64();
1284
            setZeroPlusCountIsSet(true);
1285
          } else { 
1286
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1287
          }
1288
          break;
1289
        case 12: // ONE_PLUS_COUNT
1290
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1291
            this.OnePlusCount = iprot.readI64();
1292
            setOnePlusCountIsSet(true);
1293
          } else { 
1294
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1295
          }
1296
          break;
1297
        case 13: // ZERO_PLUS_COST
1298
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1299
            this.ZeroPlusCost = iprot.readI64();
1300
            setZeroPlusCostIsSet(true);
1301
          } else { 
1302
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1303
          }
1304
          break;
1305
        case 14: // ONE_PLUS_COST
1306
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1307
            this.OnePlusCost = iprot.readI64();
1308
            setOnePlusCostIsSet(true);
1309
          } else { 
1310
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1311
          }
1312
          break;
1313
        case 15: // CATEGORY
1314
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1315
            this.category = iprot.readString();
1316
          } else { 
1317
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1318
          }
1319
          break;
5711 mandeep.dh 1320
        default:
1321
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1322
      }
1323
      iprot.readFieldEnd();
1324
    }
1325
    iprot.readStructEnd();
1326
    validate();
1327
  }
1328
 
1329
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1330
    validate();
1331
 
1332
    oprot.writeStructBegin(STRUCT_DESC);
1333
    oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
1334
    oprot.writeI64(this.itemId);
1335
    oprot.writeFieldEnd();
1336
    if (this.brand != null) {
1337
      oprot.writeFieldBegin(BRAND_FIELD_DESC);
1338
      oprot.writeString(this.brand);
1339
      oprot.writeFieldEnd();
1340
    }
1341
    if (this.modelName != null) {
1342
      oprot.writeFieldBegin(MODEL_NAME_FIELD_DESC);
1343
      oprot.writeString(this.modelName);
1344
      oprot.writeFieldEnd();
1345
    }
1346
    if (this.modelNumber != null) {
1347
      oprot.writeFieldBegin(MODEL_NUMBER_FIELD_DESC);
1348
      oprot.writeString(this.modelNumber);
1349
      oprot.writeFieldEnd();
1350
    }
1351
    if (this.color != null) {
1352
      oprot.writeFieldBegin(COLOR_FIELD_DESC);
1353
      oprot.writeString(this.color);
1354
      oprot.writeFieldEnd();
1355
    }
1356
    oprot.writeFieldBegin(FRESH_COUNT_FIELD_DESC);
1357
    oprot.writeI64(this.freshCount);
1358
    oprot.writeFieldEnd();
1359
    oprot.writeFieldBegin(ONE_TO_TWO_COUNT_FIELD_DESC);
1360
    oprot.writeI64(this.oneToTwoCount);
1361
    oprot.writeFieldEnd();
1362
    oprot.writeFieldBegin(TWO_TO_THREE_COUNT_FIELD_DESC);
1363
    oprot.writeI64(this.TwoToThreeCount);
1364
    oprot.writeFieldEnd();
1365
    oprot.writeFieldBegin(THREE_TO_FOUR_COUNT_FIELD_DESC);
1366
    oprot.writeI64(this.ThreeToFourCount);
1367
    oprot.writeFieldEnd();
1368
    oprot.writeFieldBegin(FOUR_PLUS_COUNT_FIELD_DESC);
1369
    oprot.writeI64(this.FourPlusCount);
1370
    oprot.writeFieldEnd();
5768 mandeep.dh 1371
    oprot.writeFieldBegin(ZERO_PLUS_COUNT_FIELD_DESC);
1372
    oprot.writeI64(this.ZeroPlusCount);
1373
    oprot.writeFieldEnd();
1374
    oprot.writeFieldBegin(ONE_PLUS_COUNT_FIELD_DESC);
1375
    oprot.writeI64(this.OnePlusCount);
1376
    oprot.writeFieldEnd();
1377
    oprot.writeFieldBegin(ZERO_PLUS_COST_FIELD_DESC);
1378
    oprot.writeI64(this.ZeroPlusCost);
1379
    oprot.writeFieldEnd();
1380
    oprot.writeFieldBegin(ONE_PLUS_COST_FIELD_DESC);
1381
    oprot.writeI64(this.OnePlusCost);
1382
    oprot.writeFieldEnd();
1383
    if (this.category != null) {
1384
      oprot.writeFieldBegin(CATEGORY_FIELD_DESC);
1385
      oprot.writeString(this.category);
1386
      oprot.writeFieldEnd();
1387
    }
5711 mandeep.dh 1388
    oprot.writeFieldStop();
1389
    oprot.writeStructEnd();
1390
  }
1391
 
1392
  @Override
1393
  public String toString() {
1394
    StringBuilder sb = new StringBuilder("InventoryAge(");
1395
    boolean first = true;
1396
 
1397
    sb.append("itemId:");
1398
    sb.append(this.itemId);
1399
    first = false;
1400
    if (!first) sb.append(", ");
1401
    sb.append("brand:");
1402
    if (this.brand == null) {
1403
      sb.append("null");
1404
    } else {
1405
      sb.append(this.brand);
1406
    }
1407
    first = false;
1408
    if (!first) sb.append(", ");
1409
    sb.append("modelName:");
1410
    if (this.modelName == null) {
1411
      sb.append("null");
1412
    } else {
1413
      sb.append(this.modelName);
1414
    }
1415
    first = false;
1416
    if (!first) sb.append(", ");
1417
    sb.append("modelNumber:");
1418
    if (this.modelNumber == null) {
1419
      sb.append("null");
1420
    } else {
1421
      sb.append(this.modelNumber);
1422
    }
1423
    first = false;
1424
    if (!first) sb.append(", ");
1425
    sb.append("color:");
1426
    if (this.color == null) {
1427
      sb.append("null");
1428
    } else {
1429
      sb.append(this.color);
1430
    }
1431
    first = false;
1432
    if (!first) sb.append(", ");
1433
    sb.append("freshCount:");
1434
    sb.append(this.freshCount);
1435
    first = false;
1436
    if (!first) sb.append(", ");
1437
    sb.append("oneToTwoCount:");
1438
    sb.append(this.oneToTwoCount);
1439
    first = false;
1440
    if (!first) sb.append(", ");
1441
    sb.append("TwoToThreeCount:");
1442
    sb.append(this.TwoToThreeCount);
1443
    first = false;
1444
    if (!first) sb.append(", ");
1445
    sb.append("ThreeToFourCount:");
1446
    sb.append(this.ThreeToFourCount);
1447
    first = false;
1448
    if (!first) sb.append(", ");
1449
    sb.append("FourPlusCount:");
1450
    sb.append(this.FourPlusCount);
1451
    first = false;
5768 mandeep.dh 1452
    if (!first) sb.append(", ");
1453
    sb.append("ZeroPlusCount:");
1454
    sb.append(this.ZeroPlusCount);
1455
    first = false;
1456
    if (!first) sb.append(", ");
1457
    sb.append("OnePlusCount:");
1458
    sb.append(this.OnePlusCount);
1459
    first = false;
1460
    if (!first) sb.append(", ");
1461
    sb.append("ZeroPlusCost:");
1462
    sb.append(this.ZeroPlusCost);
1463
    first = false;
1464
    if (!first) sb.append(", ");
1465
    sb.append("OnePlusCost:");
1466
    sb.append(this.OnePlusCost);
1467
    first = false;
1468
    if (!first) sb.append(", ");
1469
    sb.append("category:");
1470
    if (this.category == null) {
1471
      sb.append("null");
1472
    } else {
1473
      sb.append(this.category);
1474
    }
1475
    first = false;
5711 mandeep.dh 1476
    sb.append(")");
1477
    return sb.toString();
1478
  }
1479
 
1480
  public void validate() throws org.apache.thrift.TException {
1481
    // check for required fields
1482
  }
1483
 
1484
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1485
    try {
1486
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1487
    } catch (org.apache.thrift.TException te) {
1488
      throw new java.io.IOException(te);
1489
    }
1490
  }
1491
 
1492
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1493
    try {
1494
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1495
      __isset_bit_vector = new BitSet(1);
1496
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1497
    } catch (org.apache.thrift.TException te) {
1498
      throw new java.io.IOException(te);
1499
    }
1500
  }
1501
 
1502
}
1503