Subversion Repositories SmartDukaan

Rev

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