Subversion Repositories SmartDukaan

Rev

Rev 8241 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
8182 amar.kumar 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.model.v1.order;
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 EbayOrder implements org.apache.thrift.TBase<EbayOrder, EbayOrder._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("EbayOrder");
25
 
26
  private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.I64, (short)1);
27
  private static final org.apache.thrift.protocol.TField SALES_RECORD_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("salesRecordNumber", org.apache.thrift.protocol.TType.I64, (short)2);
28
  private static final org.apache.thrift.protocol.TField PAISA_PAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("paisaPayId", org.apache.thrift.protocol.TType.STRING, (short)3);
29
  private static final org.apache.thrift.protocol.TField EBAY_LISTING_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ebayListingId", org.apache.thrift.protocol.TType.STRING, (short)4);
30
  private static final org.apache.thrift.protocol.TField SUBSIDY_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("subsidyAmount", org.apache.thrift.protocol.TType.DOUBLE, (short)5);
31
  private static final org.apache.thrift.protocol.TField EBAY_TXN_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("ebayTxnDate", org.apache.thrift.protocol.TType.I64, (short)6);
32
  private static final org.apache.thrift.protocol.TField TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionId", org.apache.thrift.protocol.TType.STRING, (short)7);
33
  private static final org.apache.thrift.protocol.TField LISTING_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("listingName", org.apache.thrift.protocol.TType.STRING, (short)8);
34
  private static final org.apache.thrift.protocol.TField LISTING_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("listingPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)9);
35
 
36
  private long orderId; // required
37
  private long salesRecordNumber; // required
38
  private String paisaPayId; // required
39
  private String ebayListingId; // required
40
  private double subsidyAmount; // required
41
  private long ebayTxnDate; // required
42
  private String transactionId; // required
43
  private String listingName; // required
44
  private double listingPrice; // required
45
 
46
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
47
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
48
    ORDER_ID((short)1, "orderId"),
49
    SALES_RECORD_NUMBER((short)2, "salesRecordNumber"),
50
    PAISA_PAY_ID((short)3, "paisaPayId"),
51
    EBAY_LISTING_ID((short)4, "ebayListingId"),
52
    SUBSIDY_AMOUNT((short)5, "subsidyAmount"),
53
    EBAY_TXN_DATE((short)6, "ebayTxnDate"),
54
    TRANSACTION_ID((short)7, "transactionId"),
55
    LISTING_NAME((short)8, "listingName"),
56
    LISTING_PRICE((short)9, "listingPrice");
57
 
58
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
59
 
60
    static {
61
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
62
        byName.put(field.getFieldName(), field);
63
      }
64
    }
65
 
66
    /**
67
     * Find the _Fields constant that matches fieldId, or null if its not found.
68
     */
69
    public static _Fields findByThriftId(int fieldId) {
70
      switch(fieldId) {
71
        case 1: // ORDER_ID
72
          return ORDER_ID;
73
        case 2: // SALES_RECORD_NUMBER
74
          return SALES_RECORD_NUMBER;
75
        case 3: // PAISA_PAY_ID
76
          return PAISA_PAY_ID;
77
        case 4: // EBAY_LISTING_ID
78
          return EBAY_LISTING_ID;
79
        case 5: // SUBSIDY_AMOUNT
80
          return SUBSIDY_AMOUNT;
81
        case 6: // EBAY_TXN_DATE
82
          return EBAY_TXN_DATE;
83
        case 7: // TRANSACTION_ID
84
          return TRANSACTION_ID;
85
        case 8: // LISTING_NAME
86
          return LISTING_NAME;
87
        case 9: // LISTING_PRICE
88
          return LISTING_PRICE;
89
        default:
90
          return null;
91
      }
92
    }
93
 
94
    /**
95
     * Find the _Fields constant that matches fieldId, throwing an exception
96
     * if it is not found.
97
     */
98
    public static _Fields findByThriftIdOrThrow(int fieldId) {
99
      _Fields fields = findByThriftId(fieldId);
100
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
101
      return fields;
102
    }
103
 
104
    /**
105
     * Find the _Fields constant that matches name, or null if its not found.
106
     */
107
    public static _Fields findByName(String name) {
108
      return byName.get(name);
109
    }
110
 
111
    private final short _thriftId;
112
    private final String _fieldName;
113
 
114
    _Fields(short thriftId, String fieldName) {
115
      _thriftId = thriftId;
116
      _fieldName = fieldName;
117
    }
118
 
119
    public short getThriftFieldId() {
120
      return _thriftId;
121
    }
122
 
123
    public String getFieldName() {
124
      return _fieldName;
125
    }
126
  }
127
 
128
  // isset id assignments
129
  private static final int __ORDERID_ISSET_ID = 0;
130
  private static final int __SALESRECORDNUMBER_ISSET_ID = 1;
131
  private static final int __SUBSIDYAMOUNT_ISSET_ID = 2;
132
  private static final int __EBAYTXNDATE_ISSET_ID = 3;
133
  private static final int __LISTINGPRICE_ISSET_ID = 4;
134
  private BitSet __isset_bit_vector = new BitSet(5);
135
 
136
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
137
  static {
138
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
139
    tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
140
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
141
    tmpMap.put(_Fields.SALES_RECORD_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("salesRecordNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
142
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
143
    tmpMap.put(_Fields.PAISA_PAY_ID, new org.apache.thrift.meta_data.FieldMetaData("paisaPayId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
144
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
145
    tmpMap.put(_Fields.EBAY_LISTING_ID, new org.apache.thrift.meta_data.FieldMetaData("ebayListingId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
146
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
147
    tmpMap.put(_Fields.SUBSIDY_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("subsidyAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
148
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
149
    tmpMap.put(_Fields.EBAY_TXN_DATE, new org.apache.thrift.meta_data.FieldMetaData("ebayTxnDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
150
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
151
    tmpMap.put(_Fields.TRANSACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
152
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
153
    tmpMap.put(_Fields.LISTING_NAME, new org.apache.thrift.meta_data.FieldMetaData("listingName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
154
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
155
    tmpMap.put(_Fields.LISTING_PRICE, new org.apache.thrift.meta_data.FieldMetaData("listingPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
156
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
157
    metaDataMap = Collections.unmodifiableMap(tmpMap);
158
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(EbayOrder.class, metaDataMap);
159
  }
160
 
161
  public EbayOrder() {
162
  }
163
 
164
  public EbayOrder(
165
    long orderId,
166
    long salesRecordNumber,
167
    String paisaPayId,
168
    String ebayListingId,
169
    double subsidyAmount,
170
    long ebayTxnDate,
171
    String transactionId,
172
    String listingName,
173
    double listingPrice)
174
  {
175
    this();
176
    this.orderId = orderId;
177
    setOrderIdIsSet(true);
178
    this.salesRecordNumber = salesRecordNumber;
179
    setSalesRecordNumberIsSet(true);
180
    this.paisaPayId = paisaPayId;
181
    this.ebayListingId = ebayListingId;
182
    this.subsidyAmount = subsidyAmount;
183
    setSubsidyAmountIsSet(true);
184
    this.ebayTxnDate = ebayTxnDate;
185
    setEbayTxnDateIsSet(true);
186
    this.transactionId = transactionId;
187
    this.listingName = listingName;
188
    this.listingPrice = listingPrice;
189
    setListingPriceIsSet(true);
190
  }
191
 
192
  /**
193
   * Performs a deep copy on <i>other</i>.
194
   */
195
  public EbayOrder(EbayOrder other) {
196
    __isset_bit_vector.clear();
197
    __isset_bit_vector.or(other.__isset_bit_vector);
198
    this.orderId = other.orderId;
199
    this.salesRecordNumber = other.salesRecordNumber;
200
    if (other.isSetPaisaPayId()) {
201
      this.paisaPayId = other.paisaPayId;
202
    }
203
    if (other.isSetEbayListingId()) {
204
      this.ebayListingId = other.ebayListingId;
205
    }
206
    this.subsidyAmount = other.subsidyAmount;
207
    this.ebayTxnDate = other.ebayTxnDate;
208
    if (other.isSetTransactionId()) {
209
      this.transactionId = other.transactionId;
210
    }
211
    if (other.isSetListingName()) {
212
      this.listingName = other.listingName;
213
    }
214
    this.listingPrice = other.listingPrice;
215
  }
216
 
217
  public EbayOrder deepCopy() {
218
    return new EbayOrder(this);
219
  }
220
 
221
  @Override
222
  public void clear() {
223
    setOrderIdIsSet(false);
224
    this.orderId = 0;
225
    setSalesRecordNumberIsSet(false);
226
    this.salesRecordNumber = 0;
227
    this.paisaPayId = null;
228
    this.ebayListingId = null;
229
    setSubsidyAmountIsSet(false);
230
    this.subsidyAmount = 0.0;
231
    setEbayTxnDateIsSet(false);
232
    this.ebayTxnDate = 0;
233
    this.transactionId = null;
234
    this.listingName = null;
235
    setListingPriceIsSet(false);
236
    this.listingPrice = 0.0;
237
  }
238
 
239
  public long getOrderId() {
240
    return this.orderId;
241
  }
242
 
243
  public void setOrderId(long orderId) {
244
    this.orderId = orderId;
245
    setOrderIdIsSet(true);
246
  }
247
 
248
  public void unsetOrderId() {
249
    __isset_bit_vector.clear(__ORDERID_ISSET_ID);
250
  }
251
 
252
  /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
253
  public boolean isSetOrderId() {
254
    return __isset_bit_vector.get(__ORDERID_ISSET_ID);
255
  }
256
 
257
  public void setOrderIdIsSet(boolean value) {
258
    __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
259
  }
260
 
261
  public long getSalesRecordNumber() {
262
    return this.salesRecordNumber;
263
  }
264
 
265
  public void setSalesRecordNumber(long salesRecordNumber) {
266
    this.salesRecordNumber = salesRecordNumber;
267
    setSalesRecordNumberIsSet(true);
268
  }
269
 
270
  public void unsetSalesRecordNumber() {
271
    __isset_bit_vector.clear(__SALESRECORDNUMBER_ISSET_ID);
272
  }
273
 
274
  /** Returns true if field salesRecordNumber is set (has been assigned a value) and false otherwise */
275
  public boolean isSetSalesRecordNumber() {
276
    return __isset_bit_vector.get(__SALESRECORDNUMBER_ISSET_ID);
277
  }
278
 
279
  public void setSalesRecordNumberIsSet(boolean value) {
280
    __isset_bit_vector.set(__SALESRECORDNUMBER_ISSET_ID, value);
281
  }
282
 
283
  public String getPaisaPayId() {
284
    return this.paisaPayId;
285
  }
286
 
287
  public void setPaisaPayId(String paisaPayId) {
288
    this.paisaPayId = paisaPayId;
289
  }
290
 
291
  public void unsetPaisaPayId() {
292
    this.paisaPayId = null;
293
  }
294
 
295
  /** Returns true if field paisaPayId is set (has been assigned a value) and false otherwise */
296
  public boolean isSetPaisaPayId() {
297
    return this.paisaPayId != null;
298
  }
299
 
300
  public void setPaisaPayIdIsSet(boolean value) {
301
    if (!value) {
302
      this.paisaPayId = null;
303
    }
304
  }
305
 
306
  public String getEbayListingId() {
307
    return this.ebayListingId;
308
  }
309
 
310
  public void setEbayListingId(String ebayListingId) {
311
    this.ebayListingId = ebayListingId;
312
  }
313
 
314
  public void unsetEbayListingId() {
315
    this.ebayListingId = null;
316
  }
317
 
318
  /** Returns true if field ebayListingId is set (has been assigned a value) and false otherwise */
319
  public boolean isSetEbayListingId() {
320
    return this.ebayListingId != null;
321
  }
322
 
323
  public void setEbayListingIdIsSet(boolean value) {
324
    if (!value) {
325
      this.ebayListingId = null;
326
    }
327
  }
328
 
329
  public double getSubsidyAmount() {
330
    return this.subsidyAmount;
331
  }
332
 
333
  public void setSubsidyAmount(double subsidyAmount) {
334
    this.subsidyAmount = subsidyAmount;
335
    setSubsidyAmountIsSet(true);
336
  }
337
 
338
  public void unsetSubsidyAmount() {
339
    __isset_bit_vector.clear(__SUBSIDYAMOUNT_ISSET_ID);
340
  }
341
 
342
  /** Returns true if field subsidyAmount is set (has been assigned a value) and false otherwise */
343
  public boolean isSetSubsidyAmount() {
344
    return __isset_bit_vector.get(__SUBSIDYAMOUNT_ISSET_ID);
345
  }
346
 
347
  public void setSubsidyAmountIsSet(boolean value) {
348
    __isset_bit_vector.set(__SUBSIDYAMOUNT_ISSET_ID, value);
349
  }
350
 
351
  public long getEbayTxnDate() {
352
    return this.ebayTxnDate;
353
  }
354
 
355
  public void setEbayTxnDate(long ebayTxnDate) {
356
    this.ebayTxnDate = ebayTxnDate;
357
    setEbayTxnDateIsSet(true);
358
  }
359
 
360
  public void unsetEbayTxnDate() {
361
    __isset_bit_vector.clear(__EBAYTXNDATE_ISSET_ID);
362
  }
363
 
364
  /** Returns true if field ebayTxnDate is set (has been assigned a value) and false otherwise */
365
  public boolean isSetEbayTxnDate() {
366
    return __isset_bit_vector.get(__EBAYTXNDATE_ISSET_ID);
367
  }
368
 
369
  public void setEbayTxnDateIsSet(boolean value) {
370
    __isset_bit_vector.set(__EBAYTXNDATE_ISSET_ID, value);
371
  }
372
 
373
  public String getTransactionId() {
374
    return this.transactionId;
375
  }
376
 
377
  public void setTransactionId(String transactionId) {
378
    this.transactionId = transactionId;
379
  }
380
 
381
  public void unsetTransactionId() {
382
    this.transactionId = null;
383
  }
384
 
385
  /** Returns true if field transactionId is set (has been assigned a value) and false otherwise */
386
  public boolean isSetTransactionId() {
387
    return this.transactionId != null;
388
  }
389
 
390
  public void setTransactionIdIsSet(boolean value) {
391
    if (!value) {
392
      this.transactionId = null;
393
    }
394
  }
395
 
396
  public String getListingName() {
397
    return this.listingName;
398
  }
399
 
400
  public void setListingName(String listingName) {
401
    this.listingName = listingName;
402
  }
403
 
404
  public void unsetListingName() {
405
    this.listingName = null;
406
  }
407
 
408
  /** Returns true if field listingName is set (has been assigned a value) and false otherwise */
409
  public boolean isSetListingName() {
410
    return this.listingName != null;
411
  }
412
 
413
  public void setListingNameIsSet(boolean value) {
414
    if (!value) {
415
      this.listingName = null;
416
    }
417
  }
418
 
419
  public double getListingPrice() {
420
    return this.listingPrice;
421
  }
422
 
423
  public void setListingPrice(double listingPrice) {
424
    this.listingPrice = listingPrice;
425
    setListingPriceIsSet(true);
426
  }
427
 
428
  public void unsetListingPrice() {
429
    __isset_bit_vector.clear(__LISTINGPRICE_ISSET_ID);
430
  }
431
 
432
  /** Returns true if field listingPrice is set (has been assigned a value) and false otherwise */
433
  public boolean isSetListingPrice() {
434
    return __isset_bit_vector.get(__LISTINGPRICE_ISSET_ID);
435
  }
436
 
437
  public void setListingPriceIsSet(boolean value) {
438
    __isset_bit_vector.set(__LISTINGPRICE_ISSET_ID, value);
439
  }
440
 
441
  public void setFieldValue(_Fields field, Object value) {
442
    switch (field) {
443
    case ORDER_ID:
444
      if (value == null) {
445
        unsetOrderId();
446
      } else {
447
        setOrderId((Long)value);
448
      }
449
      break;
450
 
451
    case SALES_RECORD_NUMBER:
452
      if (value == null) {
453
        unsetSalesRecordNumber();
454
      } else {
455
        setSalesRecordNumber((Long)value);
456
      }
457
      break;
458
 
459
    case PAISA_PAY_ID:
460
      if (value == null) {
461
        unsetPaisaPayId();
462
      } else {
463
        setPaisaPayId((String)value);
464
      }
465
      break;
466
 
467
    case EBAY_LISTING_ID:
468
      if (value == null) {
469
        unsetEbayListingId();
470
      } else {
471
        setEbayListingId((String)value);
472
      }
473
      break;
474
 
475
    case SUBSIDY_AMOUNT:
476
      if (value == null) {
477
        unsetSubsidyAmount();
478
      } else {
479
        setSubsidyAmount((Double)value);
480
      }
481
      break;
482
 
483
    case EBAY_TXN_DATE:
484
      if (value == null) {
485
        unsetEbayTxnDate();
486
      } else {
487
        setEbayTxnDate((Long)value);
488
      }
489
      break;
490
 
491
    case TRANSACTION_ID:
492
      if (value == null) {
493
        unsetTransactionId();
494
      } else {
495
        setTransactionId((String)value);
496
      }
497
      break;
498
 
499
    case LISTING_NAME:
500
      if (value == null) {
501
        unsetListingName();
502
      } else {
503
        setListingName((String)value);
504
      }
505
      break;
506
 
507
    case LISTING_PRICE:
508
      if (value == null) {
509
        unsetListingPrice();
510
      } else {
511
        setListingPrice((Double)value);
512
      }
513
      break;
514
 
515
    }
516
  }
517
 
518
  public Object getFieldValue(_Fields field) {
519
    switch (field) {
520
    case ORDER_ID:
521
      return Long.valueOf(getOrderId());
522
 
523
    case SALES_RECORD_NUMBER:
524
      return Long.valueOf(getSalesRecordNumber());
525
 
526
    case PAISA_PAY_ID:
527
      return getPaisaPayId();
528
 
529
    case EBAY_LISTING_ID:
530
      return getEbayListingId();
531
 
532
    case SUBSIDY_AMOUNT:
533
      return Double.valueOf(getSubsidyAmount());
534
 
535
    case EBAY_TXN_DATE:
536
      return Long.valueOf(getEbayTxnDate());
537
 
538
    case TRANSACTION_ID:
539
      return getTransactionId();
540
 
541
    case LISTING_NAME:
542
      return getListingName();
543
 
544
    case LISTING_PRICE:
545
      return Double.valueOf(getListingPrice());
546
 
547
    }
548
    throw new IllegalStateException();
549
  }
550
 
551
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
552
  public boolean isSet(_Fields field) {
553
    if (field == null) {
554
      throw new IllegalArgumentException();
555
    }
556
 
557
    switch (field) {
558
    case ORDER_ID:
559
      return isSetOrderId();
560
    case SALES_RECORD_NUMBER:
561
      return isSetSalesRecordNumber();
562
    case PAISA_PAY_ID:
563
      return isSetPaisaPayId();
564
    case EBAY_LISTING_ID:
565
      return isSetEbayListingId();
566
    case SUBSIDY_AMOUNT:
567
      return isSetSubsidyAmount();
568
    case EBAY_TXN_DATE:
569
      return isSetEbayTxnDate();
570
    case TRANSACTION_ID:
571
      return isSetTransactionId();
572
    case LISTING_NAME:
573
      return isSetListingName();
574
    case LISTING_PRICE:
575
      return isSetListingPrice();
576
    }
577
    throw new IllegalStateException();
578
  }
579
 
580
  @Override
581
  public boolean equals(Object that) {
582
    if (that == null)
583
      return false;
584
    if (that instanceof EbayOrder)
585
      return this.equals((EbayOrder)that);
586
    return false;
587
  }
588
 
589
  public boolean equals(EbayOrder that) {
590
    if (that == null)
591
      return false;
592
 
593
    boolean this_present_orderId = true;
594
    boolean that_present_orderId = true;
595
    if (this_present_orderId || that_present_orderId) {
596
      if (!(this_present_orderId && that_present_orderId))
597
        return false;
598
      if (this.orderId != that.orderId)
599
        return false;
600
    }
601
 
602
    boolean this_present_salesRecordNumber = true;
603
    boolean that_present_salesRecordNumber = true;
604
    if (this_present_salesRecordNumber || that_present_salesRecordNumber) {
605
      if (!(this_present_salesRecordNumber && that_present_salesRecordNumber))
606
        return false;
607
      if (this.salesRecordNumber != that.salesRecordNumber)
608
        return false;
609
    }
610
 
611
    boolean this_present_paisaPayId = true && this.isSetPaisaPayId();
612
    boolean that_present_paisaPayId = true && that.isSetPaisaPayId();
613
    if (this_present_paisaPayId || that_present_paisaPayId) {
614
      if (!(this_present_paisaPayId && that_present_paisaPayId))
615
        return false;
616
      if (!this.paisaPayId.equals(that.paisaPayId))
617
        return false;
618
    }
619
 
620
    boolean this_present_ebayListingId = true && this.isSetEbayListingId();
621
    boolean that_present_ebayListingId = true && that.isSetEbayListingId();
622
    if (this_present_ebayListingId || that_present_ebayListingId) {
623
      if (!(this_present_ebayListingId && that_present_ebayListingId))
624
        return false;
625
      if (!this.ebayListingId.equals(that.ebayListingId))
626
        return false;
627
    }
628
 
629
    boolean this_present_subsidyAmount = true;
630
    boolean that_present_subsidyAmount = true;
631
    if (this_present_subsidyAmount || that_present_subsidyAmount) {
632
      if (!(this_present_subsidyAmount && that_present_subsidyAmount))
633
        return false;
634
      if (this.subsidyAmount != that.subsidyAmount)
635
        return false;
636
    }
637
 
638
    boolean this_present_ebayTxnDate = true;
639
    boolean that_present_ebayTxnDate = true;
640
    if (this_present_ebayTxnDate || that_present_ebayTxnDate) {
641
      if (!(this_present_ebayTxnDate && that_present_ebayTxnDate))
642
        return false;
643
      if (this.ebayTxnDate != that.ebayTxnDate)
644
        return false;
645
    }
646
 
647
    boolean this_present_transactionId = true && this.isSetTransactionId();
648
    boolean that_present_transactionId = true && that.isSetTransactionId();
649
    if (this_present_transactionId || that_present_transactionId) {
650
      if (!(this_present_transactionId && that_present_transactionId))
651
        return false;
652
      if (!this.transactionId.equals(that.transactionId))
653
        return false;
654
    }
655
 
656
    boolean this_present_listingName = true && this.isSetListingName();
657
    boolean that_present_listingName = true && that.isSetListingName();
658
    if (this_present_listingName || that_present_listingName) {
659
      if (!(this_present_listingName && that_present_listingName))
660
        return false;
661
      if (!this.listingName.equals(that.listingName))
662
        return false;
663
    }
664
 
665
    boolean this_present_listingPrice = true;
666
    boolean that_present_listingPrice = true;
667
    if (this_present_listingPrice || that_present_listingPrice) {
668
      if (!(this_present_listingPrice && that_present_listingPrice))
669
        return false;
670
      if (this.listingPrice != that.listingPrice)
671
        return false;
672
    }
673
 
674
    return true;
675
  }
676
 
677
  @Override
678
  public int hashCode() {
679
    return 0;
680
  }
681
 
682
  public int compareTo(EbayOrder other) {
683
    if (!getClass().equals(other.getClass())) {
684
      return getClass().getName().compareTo(other.getClass().getName());
685
    }
686
 
687
    int lastComparison = 0;
688
    EbayOrder typedOther = (EbayOrder)other;
689
 
690
    lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
691
    if (lastComparison != 0) {
692
      return lastComparison;
693
    }
694
    if (isSetOrderId()) {
695
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
696
      if (lastComparison != 0) {
697
        return lastComparison;
698
      }
699
    }
700
    lastComparison = Boolean.valueOf(isSetSalesRecordNumber()).compareTo(typedOther.isSetSalesRecordNumber());
701
    if (lastComparison != 0) {
702
      return lastComparison;
703
    }
704
    if (isSetSalesRecordNumber()) {
705
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.salesRecordNumber, typedOther.salesRecordNumber);
706
      if (lastComparison != 0) {
707
        return lastComparison;
708
      }
709
    }
710
    lastComparison = Boolean.valueOf(isSetPaisaPayId()).compareTo(typedOther.isSetPaisaPayId());
711
    if (lastComparison != 0) {
712
      return lastComparison;
713
    }
714
    if (isSetPaisaPayId()) {
715
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paisaPayId, typedOther.paisaPayId);
716
      if (lastComparison != 0) {
717
        return lastComparison;
718
      }
719
    }
720
    lastComparison = Boolean.valueOf(isSetEbayListingId()).compareTo(typedOther.isSetEbayListingId());
721
    if (lastComparison != 0) {
722
      return lastComparison;
723
    }
724
    if (isSetEbayListingId()) {
725
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ebayListingId, typedOther.ebayListingId);
726
      if (lastComparison != 0) {
727
        return lastComparison;
728
      }
729
    }
730
    lastComparison = Boolean.valueOf(isSetSubsidyAmount()).compareTo(typedOther.isSetSubsidyAmount());
731
    if (lastComparison != 0) {
732
      return lastComparison;
733
    }
734
    if (isSetSubsidyAmount()) {
735
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.subsidyAmount, typedOther.subsidyAmount);
736
      if (lastComparison != 0) {
737
        return lastComparison;
738
      }
739
    }
740
    lastComparison = Boolean.valueOf(isSetEbayTxnDate()).compareTo(typedOther.isSetEbayTxnDate());
741
    if (lastComparison != 0) {
742
      return lastComparison;
743
    }
744
    if (isSetEbayTxnDate()) {
745
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ebayTxnDate, typedOther.ebayTxnDate);
746
      if (lastComparison != 0) {
747
        return lastComparison;
748
      }
749
    }
750
    lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(typedOther.isSetTransactionId());
751
    if (lastComparison != 0) {
752
      return lastComparison;
753
    }
754
    if (isSetTransactionId()) {
755
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionId, typedOther.transactionId);
756
      if (lastComparison != 0) {
757
        return lastComparison;
758
      }
759
    }
760
    lastComparison = Boolean.valueOf(isSetListingName()).compareTo(typedOther.isSetListingName());
761
    if (lastComparison != 0) {
762
      return lastComparison;
763
    }
764
    if (isSetListingName()) {
765
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.listingName, typedOther.listingName);
766
      if (lastComparison != 0) {
767
        return lastComparison;
768
      }
769
    }
770
    lastComparison = Boolean.valueOf(isSetListingPrice()).compareTo(typedOther.isSetListingPrice());
771
    if (lastComparison != 0) {
772
      return lastComparison;
773
    }
774
    if (isSetListingPrice()) {
775
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.listingPrice, typedOther.listingPrice);
776
      if (lastComparison != 0) {
777
        return lastComparison;
778
      }
779
    }
780
    return 0;
781
  }
782
 
783
  public _Fields fieldForId(int fieldId) {
784
    return _Fields.findByThriftId(fieldId);
785
  }
786
 
787
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
788
    org.apache.thrift.protocol.TField field;
789
    iprot.readStructBegin();
790
    while (true)
791
    {
792
      field = iprot.readFieldBegin();
793
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
794
        break;
795
      }
796
      switch (field.id) {
797
        case 1: // ORDER_ID
798
          if (field.type == org.apache.thrift.protocol.TType.I64) {
799
            this.orderId = iprot.readI64();
800
            setOrderIdIsSet(true);
801
          } else { 
802
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
803
          }
804
          break;
805
        case 2: // SALES_RECORD_NUMBER
806
          if (field.type == org.apache.thrift.protocol.TType.I64) {
807
            this.salesRecordNumber = iprot.readI64();
808
            setSalesRecordNumberIsSet(true);
809
          } else { 
810
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
811
          }
812
          break;
813
        case 3: // PAISA_PAY_ID
814
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
815
            this.paisaPayId = iprot.readString();
816
          } else { 
817
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
818
          }
819
          break;
820
        case 4: // EBAY_LISTING_ID
821
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
822
            this.ebayListingId = iprot.readString();
823
          } else { 
824
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
825
          }
826
          break;
827
        case 5: // SUBSIDY_AMOUNT
828
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
829
            this.subsidyAmount = iprot.readDouble();
830
            setSubsidyAmountIsSet(true);
831
          } else { 
832
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
833
          }
834
          break;
835
        case 6: // EBAY_TXN_DATE
836
          if (field.type == org.apache.thrift.protocol.TType.I64) {
837
            this.ebayTxnDate = iprot.readI64();
838
            setEbayTxnDateIsSet(true);
839
          } else { 
840
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
841
          }
842
          break;
843
        case 7: // TRANSACTION_ID
844
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
845
            this.transactionId = iprot.readString();
846
          } else { 
847
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
848
          }
849
          break;
850
        case 8: // LISTING_NAME
851
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
852
            this.listingName = iprot.readString();
853
          } else { 
854
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
855
          }
856
          break;
857
        case 9: // LISTING_PRICE
858
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
859
            this.listingPrice = iprot.readDouble();
860
            setListingPriceIsSet(true);
861
          } else { 
862
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
863
          }
864
          break;
865
        default:
866
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
867
      }
868
      iprot.readFieldEnd();
869
    }
870
    iprot.readStructEnd();
871
    validate();
872
  }
873
 
874
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
875
    validate();
876
 
877
    oprot.writeStructBegin(STRUCT_DESC);
878
    oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
879
    oprot.writeI64(this.orderId);
880
    oprot.writeFieldEnd();
881
    oprot.writeFieldBegin(SALES_RECORD_NUMBER_FIELD_DESC);
882
    oprot.writeI64(this.salesRecordNumber);
883
    oprot.writeFieldEnd();
884
    if (this.paisaPayId != null) {
885
      oprot.writeFieldBegin(PAISA_PAY_ID_FIELD_DESC);
886
      oprot.writeString(this.paisaPayId);
887
      oprot.writeFieldEnd();
888
    }
889
    if (this.ebayListingId != null) {
890
      oprot.writeFieldBegin(EBAY_LISTING_ID_FIELD_DESC);
891
      oprot.writeString(this.ebayListingId);
892
      oprot.writeFieldEnd();
893
    }
894
    oprot.writeFieldBegin(SUBSIDY_AMOUNT_FIELD_DESC);
895
    oprot.writeDouble(this.subsidyAmount);
896
    oprot.writeFieldEnd();
897
    oprot.writeFieldBegin(EBAY_TXN_DATE_FIELD_DESC);
898
    oprot.writeI64(this.ebayTxnDate);
899
    oprot.writeFieldEnd();
900
    if (this.transactionId != null) {
901
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
902
      oprot.writeString(this.transactionId);
903
      oprot.writeFieldEnd();
904
    }
905
    if (this.listingName != null) {
906
      oprot.writeFieldBegin(LISTING_NAME_FIELD_DESC);
907
      oprot.writeString(this.listingName);
908
      oprot.writeFieldEnd();
909
    }
910
    oprot.writeFieldBegin(LISTING_PRICE_FIELD_DESC);
911
    oprot.writeDouble(this.listingPrice);
912
    oprot.writeFieldEnd();
913
    oprot.writeFieldStop();
914
    oprot.writeStructEnd();
915
  }
916
 
917
  @Override
918
  public String toString() {
919
    StringBuilder sb = new StringBuilder("EbayOrder(");
920
    boolean first = true;
921
 
922
    sb.append("orderId:");
923
    sb.append(this.orderId);
924
    first = false;
925
    if (!first) sb.append(", ");
926
    sb.append("salesRecordNumber:");
927
    sb.append(this.salesRecordNumber);
928
    first = false;
929
    if (!first) sb.append(", ");
930
    sb.append("paisaPayId:");
931
    if (this.paisaPayId == null) {
932
      sb.append("null");
933
    } else {
934
      sb.append(this.paisaPayId);
935
    }
936
    first = false;
937
    if (!first) sb.append(", ");
938
    sb.append("ebayListingId:");
939
    if (this.ebayListingId == null) {
940
      sb.append("null");
941
    } else {
942
      sb.append(this.ebayListingId);
943
    }
944
    first = false;
945
    if (!first) sb.append(", ");
946
    sb.append("subsidyAmount:");
947
    sb.append(this.subsidyAmount);
948
    first = false;
949
    if (!first) sb.append(", ");
950
    sb.append("ebayTxnDate:");
951
    sb.append(this.ebayTxnDate);
952
    first = false;
953
    if (!first) sb.append(", ");
954
    sb.append("transactionId:");
955
    if (this.transactionId == null) {
956
      sb.append("null");
957
    } else {
958
      sb.append(this.transactionId);
959
    }
960
    first = false;
961
    if (!first) sb.append(", ");
962
    sb.append("listingName:");
963
    if (this.listingName == null) {
964
      sb.append("null");
965
    } else {
966
      sb.append(this.listingName);
967
    }
968
    first = false;
969
    if (!first) sb.append(", ");
970
    sb.append("listingPrice:");
971
    sb.append(this.listingPrice);
972
    first = false;
973
    sb.append(")");
974
    return sb.toString();
975
  }
976
 
977
  public void validate() throws org.apache.thrift.TException {
978
    // check for required fields
979
  }
980
 
981
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
982
    try {
983
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
984
    } catch (org.apache.thrift.TException te) {
985
      throw new java.io.IOException(te);
986
    }
987
  }
988
 
989
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
990
    try {
991
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
992
      __isset_bit_vector = new BitSet(1);
993
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
994
    } catch (org.apache.thrift.TException te) {
995
      throw new java.io.IOException(te);
996
    }
997
  }
998
 
999
}
1000