Subversion Repositories SmartDukaan

Rev

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