Subversion Repositories SmartDukaan

Rev

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

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