Subversion Repositories SmartDukaan

Rev

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

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