Subversion Repositories SmartDukaan

Rev

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