Subversion Repositories SmartDukaan

Rev

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