Subversion Repositories SmartDukaan

Rev

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

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