Subversion Repositories SmartDukaan

Rev

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