Subversion Repositories SmartDukaan

Rev

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