Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
4496 mandeep.dh 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.purchase;
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 Supplier implements org.apache.thrift.TBase<Supplier, Supplier._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Supplier");
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 NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  private static final org.apache.thrift.protocol.TField PHONE_FIELD_DESC = new org.apache.thrift.protocol.TField("phone", org.apache.thrift.protocol.TType.STRING, (short)3);
29
  private static final org.apache.thrift.protocol.TField FAX_FIELD_DESC = new org.apache.thrift.protocol.TField("fax", org.apache.thrift.protocol.TType.STRING, (short)4);
30
  private static final org.apache.thrift.protocol.TField TIN_FIELD_DESC = new org.apache.thrift.protocol.TField("tin", org.apache.thrift.protocol.TType.STRING, (short)5);
31
  private static final org.apache.thrift.protocol.TField PAN_FIELD_DESC = new org.apache.thrift.protocol.TField("pan", org.apache.thrift.protocol.TType.STRING, (short)6);
32
  private static final org.apache.thrift.protocol.TField HEAD_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("headName", org.apache.thrift.protocol.TType.STRING, (short)7);
33
  private static final org.apache.thrift.protocol.TField HEAD_DESIGNATION_FIELD_DESC = new org.apache.thrift.protocol.TField("headDesignation", org.apache.thrift.protocol.TType.STRING, (short)8);
34
  private static final org.apache.thrift.protocol.TField HEAD_EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("headEmail", org.apache.thrift.protocol.TType.STRING, (short)9);
35
  private static final org.apache.thrift.protocol.TField CONTACT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("contactName", org.apache.thrift.protocol.TType.STRING, (short)10);
36
  private static final org.apache.thrift.protocol.TField CONTACT_PHONE_FIELD_DESC = new org.apache.thrift.protocol.TField("contactPhone", org.apache.thrift.protocol.TType.STRING, (short)11);
37
  private static final org.apache.thrift.protocol.TField CONTACT_FAX_FIELD_DESC = new org.apache.thrift.protocol.TField("contactFax", org.apache.thrift.protocol.TType.STRING, (short)12);
38
  private static final org.apache.thrift.protocol.TField CONTACT_EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("contactEmail", org.apache.thrift.protocol.TType.STRING, (short)13);
39
  private static final org.apache.thrift.protocol.TField REGISTERED_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("registeredAddress", org.apache.thrift.protocol.TType.STRING, (short)14);
40
  private static final org.apache.thrift.protocol.TField COMMUNICATION_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("communicationAddress", org.apache.thrift.protocol.TType.STRING, (short)15);
41
 
42
  private long id; // required
43
  private String name; // required
44
  private String phone; // required
45
  private String fax; // required
46
  private String tin; // required
47
  private String pan; // required
48
  private String headName; // required
49
  private String headDesignation; // required
50
  private String headEmail; // required
51
  private String contactName; // required
52
  private String contactPhone; // required
53
  private String contactFax; // required
54
  private String contactEmail; // required
55
  private String registeredAddress; // required
56
  private String communicationAddress; // required
57
 
58
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
59
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
60
    ID((short)1, "id"),
61
    NAME((short)2, "name"),
62
    PHONE((short)3, "phone"),
63
    FAX((short)4, "fax"),
64
    TIN((short)5, "tin"),
65
    PAN((short)6, "pan"),
66
    HEAD_NAME((short)7, "headName"),
67
    HEAD_DESIGNATION((short)8, "headDesignation"),
68
    HEAD_EMAIL((short)9, "headEmail"),
69
    CONTACT_NAME((short)10, "contactName"),
70
    CONTACT_PHONE((short)11, "contactPhone"),
71
    CONTACT_FAX((short)12, "contactFax"),
72
    CONTACT_EMAIL((short)13, "contactEmail"),
73
    REGISTERED_ADDRESS((short)14, "registeredAddress"),
74
    COMMUNICATION_ADDRESS((short)15, "communicationAddress");
75
 
76
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
77
 
78
    static {
79
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
80
        byName.put(field.getFieldName(), field);
81
      }
82
    }
83
 
84
    /**
85
     * Find the _Fields constant that matches fieldId, or null if its not found.
86
     */
87
    public static _Fields findByThriftId(int fieldId) {
88
      switch(fieldId) {
89
        case 1: // ID
90
          return ID;
91
        case 2: // NAME
92
          return NAME;
93
        case 3: // PHONE
94
          return PHONE;
95
        case 4: // FAX
96
          return FAX;
97
        case 5: // TIN
98
          return TIN;
99
        case 6: // PAN
100
          return PAN;
101
        case 7: // HEAD_NAME
102
          return HEAD_NAME;
103
        case 8: // HEAD_DESIGNATION
104
          return HEAD_DESIGNATION;
105
        case 9: // HEAD_EMAIL
106
          return HEAD_EMAIL;
107
        case 10: // CONTACT_NAME
108
          return CONTACT_NAME;
109
        case 11: // CONTACT_PHONE
110
          return CONTACT_PHONE;
111
        case 12: // CONTACT_FAX
112
          return CONTACT_FAX;
113
        case 13: // CONTACT_EMAIL
114
          return CONTACT_EMAIL;
115
        case 14: // REGISTERED_ADDRESS
116
          return REGISTERED_ADDRESS;
117
        case 15: // COMMUNICATION_ADDRESS
118
          return COMMUNICATION_ADDRESS;
119
        default:
120
          return null;
121
      }
122
    }
123
 
124
    /**
125
     * Find the _Fields constant that matches fieldId, throwing an exception
126
     * if it is not found.
127
     */
128
    public static _Fields findByThriftIdOrThrow(int fieldId) {
129
      _Fields fields = findByThriftId(fieldId);
130
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
131
      return fields;
132
    }
133
 
134
    /**
135
     * Find the _Fields constant that matches name, or null if its not found.
136
     */
137
    public static _Fields findByName(String name) {
138
      return byName.get(name);
139
    }
140
 
141
    private final short _thriftId;
142
    private final String _fieldName;
143
 
144
    _Fields(short thriftId, String fieldName) {
145
      _thriftId = thriftId;
146
      _fieldName = fieldName;
147
    }
148
 
149
    public short getThriftFieldId() {
150
      return _thriftId;
151
    }
152
 
153
    public String getFieldName() {
154
      return _fieldName;
155
    }
156
  }
157
 
158
  // isset id assignments
159
  private static final int __ID_ISSET_ID = 0;
160
  private BitSet __isset_bit_vector = new BitSet(1);
161
 
162
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
163
  static {
164
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
165
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
166
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
167
    tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
168
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
169
    tmpMap.put(_Fields.PHONE, new org.apache.thrift.meta_data.FieldMetaData("phone", org.apache.thrift.TFieldRequirementType.DEFAULT, 
170
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
171
    tmpMap.put(_Fields.FAX, new org.apache.thrift.meta_data.FieldMetaData("fax", org.apache.thrift.TFieldRequirementType.DEFAULT, 
172
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
173
    tmpMap.put(_Fields.TIN, new org.apache.thrift.meta_data.FieldMetaData("tin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
174
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
175
    tmpMap.put(_Fields.PAN, new org.apache.thrift.meta_data.FieldMetaData("pan", org.apache.thrift.TFieldRequirementType.DEFAULT, 
176
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
177
    tmpMap.put(_Fields.HEAD_NAME, new org.apache.thrift.meta_data.FieldMetaData("headName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
178
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
179
    tmpMap.put(_Fields.HEAD_DESIGNATION, new org.apache.thrift.meta_data.FieldMetaData("headDesignation", org.apache.thrift.TFieldRequirementType.DEFAULT, 
180
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
181
    tmpMap.put(_Fields.HEAD_EMAIL, new org.apache.thrift.meta_data.FieldMetaData("headEmail", org.apache.thrift.TFieldRequirementType.DEFAULT, 
182
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
183
    tmpMap.put(_Fields.CONTACT_NAME, new org.apache.thrift.meta_data.FieldMetaData("contactName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
184
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
185
    tmpMap.put(_Fields.CONTACT_PHONE, new org.apache.thrift.meta_data.FieldMetaData("contactPhone", org.apache.thrift.TFieldRequirementType.DEFAULT, 
186
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
187
    tmpMap.put(_Fields.CONTACT_FAX, new org.apache.thrift.meta_data.FieldMetaData("contactFax", org.apache.thrift.TFieldRequirementType.DEFAULT, 
188
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
189
    tmpMap.put(_Fields.CONTACT_EMAIL, new org.apache.thrift.meta_data.FieldMetaData("contactEmail", org.apache.thrift.TFieldRequirementType.DEFAULT, 
190
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
191
    tmpMap.put(_Fields.REGISTERED_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("registeredAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, 
192
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
193
    tmpMap.put(_Fields.COMMUNICATION_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("communicationAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, 
194
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
195
    metaDataMap = Collections.unmodifiableMap(tmpMap);
196
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Supplier.class, metaDataMap);
197
  }
198
 
199
  public Supplier() {
200
  }
201
 
202
  public Supplier(
203
    long id,
204
    String name,
205
    String phone,
206
    String fax,
207
    String tin,
208
    String pan,
209
    String headName,
210
    String headDesignation,
211
    String headEmail,
212
    String contactName,
213
    String contactPhone,
214
    String contactFax,
215
    String contactEmail,
216
    String registeredAddress,
217
    String communicationAddress)
218
  {
219
    this();
220
    this.id = id;
221
    setIdIsSet(true);
222
    this.name = name;
223
    this.phone = phone;
224
    this.fax = fax;
225
    this.tin = tin;
226
    this.pan = pan;
227
    this.headName = headName;
228
    this.headDesignation = headDesignation;
229
    this.headEmail = headEmail;
230
    this.contactName = contactName;
231
    this.contactPhone = contactPhone;
232
    this.contactFax = contactFax;
233
    this.contactEmail = contactEmail;
234
    this.registeredAddress = registeredAddress;
235
    this.communicationAddress = communicationAddress;
236
  }
237
 
238
  /**
239
   * Performs a deep copy on <i>other</i>.
240
   */
241
  public Supplier(Supplier other) {
242
    __isset_bit_vector.clear();
243
    __isset_bit_vector.or(other.__isset_bit_vector);
244
    this.id = other.id;
245
    if (other.isSetName()) {
246
      this.name = other.name;
247
    }
248
    if (other.isSetPhone()) {
249
      this.phone = other.phone;
250
    }
251
    if (other.isSetFax()) {
252
      this.fax = other.fax;
253
    }
254
    if (other.isSetTin()) {
255
      this.tin = other.tin;
256
    }
257
    if (other.isSetPan()) {
258
      this.pan = other.pan;
259
    }
260
    if (other.isSetHeadName()) {
261
      this.headName = other.headName;
262
    }
263
    if (other.isSetHeadDesignation()) {
264
      this.headDesignation = other.headDesignation;
265
    }
266
    if (other.isSetHeadEmail()) {
267
      this.headEmail = other.headEmail;
268
    }
269
    if (other.isSetContactName()) {
270
      this.contactName = other.contactName;
271
    }
272
    if (other.isSetContactPhone()) {
273
      this.contactPhone = other.contactPhone;
274
    }
275
    if (other.isSetContactFax()) {
276
      this.contactFax = other.contactFax;
277
    }
278
    if (other.isSetContactEmail()) {
279
      this.contactEmail = other.contactEmail;
280
    }
281
    if (other.isSetRegisteredAddress()) {
282
      this.registeredAddress = other.registeredAddress;
283
    }
284
    if (other.isSetCommunicationAddress()) {
285
      this.communicationAddress = other.communicationAddress;
286
    }
287
  }
288
 
289
  public Supplier deepCopy() {
290
    return new Supplier(this);
291
  }
292
 
293
  @Override
294
  public void clear() {
295
    setIdIsSet(false);
296
    this.id = 0;
297
    this.name = null;
298
    this.phone = null;
299
    this.fax = null;
300
    this.tin = null;
301
    this.pan = null;
302
    this.headName = null;
303
    this.headDesignation = null;
304
    this.headEmail = null;
305
    this.contactName = null;
306
    this.contactPhone = null;
307
    this.contactFax = null;
308
    this.contactEmail = null;
309
    this.registeredAddress = null;
310
    this.communicationAddress = null;
311
  }
312
 
313
  public long getId() {
314
    return this.id;
315
  }
316
 
317
  public void setId(long id) {
318
    this.id = id;
319
    setIdIsSet(true);
320
  }
321
 
322
  public void unsetId() {
323
    __isset_bit_vector.clear(__ID_ISSET_ID);
324
  }
325
 
326
  /** Returns true if field id is set (has been assigned a value) and false otherwise */
327
  public boolean isSetId() {
328
    return __isset_bit_vector.get(__ID_ISSET_ID);
329
  }
330
 
331
  public void setIdIsSet(boolean value) {
332
    __isset_bit_vector.set(__ID_ISSET_ID, value);
333
  }
334
 
335
  public String getName() {
336
    return this.name;
337
  }
338
 
339
  public void setName(String name) {
340
    this.name = name;
341
  }
342
 
343
  public void unsetName() {
344
    this.name = null;
345
  }
346
 
347
  /** Returns true if field name is set (has been assigned a value) and false otherwise */
348
  public boolean isSetName() {
349
    return this.name != null;
350
  }
351
 
352
  public void setNameIsSet(boolean value) {
353
    if (!value) {
354
      this.name = null;
355
    }
356
  }
357
 
358
  public String getPhone() {
359
    return this.phone;
360
  }
361
 
362
  public void setPhone(String phone) {
363
    this.phone = phone;
364
  }
365
 
366
  public void unsetPhone() {
367
    this.phone = null;
368
  }
369
 
370
  /** Returns true if field phone is set (has been assigned a value) and false otherwise */
371
  public boolean isSetPhone() {
372
    return this.phone != null;
373
  }
374
 
375
  public void setPhoneIsSet(boolean value) {
376
    if (!value) {
377
      this.phone = null;
378
    }
379
  }
380
 
381
  public String getFax() {
382
    return this.fax;
383
  }
384
 
385
  public void setFax(String fax) {
386
    this.fax = fax;
387
  }
388
 
389
  public void unsetFax() {
390
    this.fax = null;
391
  }
392
 
393
  /** Returns true if field fax is set (has been assigned a value) and false otherwise */
394
  public boolean isSetFax() {
395
    return this.fax != null;
396
  }
397
 
398
  public void setFaxIsSet(boolean value) {
399
    if (!value) {
400
      this.fax = null;
401
    }
402
  }
403
 
404
  public String getTin() {
405
    return this.tin;
406
  }
407
 
408
  public void setTin(String tin) {
409
    this.tin = tin;
410
  }
411
 
412
  public void unsetTin() {
413
    this.tin = null;
414
  }
415
 
416
  /** Returns true if field tin is set (has been assigned a value) and false otherwise */
417
  public boolean isSetTin() {
418
    return this.tin != null;
419
  }
420
 
421
  public void setTinIsSet(boolean value) {
422
    if (!value) {
423
      this.tin = null;
424
    }
425
  }
426
 
427
  public String getPan() {
428
    return this.pan;
429
  }
430
 
431
  public void setPan(String pan) {
432
    this.pan = pan;
433
  }
434
 
435
  public void unsetPan() {
436
    this.pan = null;
437
  }
438
 
439
  /** Returns true if field pan is set (has been assigned a value) and false otherwise */
440
  public boolean isSetPan() {
441
    return this.pan != null;
442
  }
443
 
444
  public void setPanIsSet(boolean value) {
445
    if (!value) {
446
      this.pan = null;
447
    }
448
  }
449
 
450
  public String getHeadName() {
451
    return this.headName;
452
  }
453
 
454
  public void setHeadName(String headName) {
455
    this.headName = headName;
456
  }
457
 
458
  public void unsetHeadName() {
459
    this.headName = null;
460
  }
461
 
462
  /** Returns true if field headName is set (has been assigned a value) and false otherwise */
463
  public boolean isSetHeadName() {
464
    return this.headName != null;
465
  }
466
 
467
  public void setHeadNameIsSet(boolean value) {
468
    if (!value) {
469
      this.headName = null;
470
    }
471
  }
472
 
473
  public String getHeadDesignation() {
474
    return this.headDesignation;
475
  }
476
 
477
  public void setHeadDesignation(String headDesignation) {
478
    this.headDesignation = headDesignation;
479
  }
480
 
481
  public void unsetHeadDesignation() {
482
    this.headDesignation = null;
483
  }
484
 
485
  /** Returns true if field headDesignation is set (has been assigned a value) and false otherwise */
486
  public boolean isSetHeadDesignation() {
487
    return this.headDesignation != null;
488
  }
489
 
490
  public void setHeadDesignationIsSet(boolean value) {
491
    if (!value) {
492
      this.headDesignation = null;
493
    }
494
  }
495
 
496
  public String getHeadEmail() {
497
    return this.headEmail;
498
  }
499
 
500
  public void setHeadEmail(String headEmail) {
501
    this.headEmail = headEmail;
502
  }
503
 
504
  public void unsetHeadEmail() {
505
    this.headEmail = null;
506
  }
507
 
508
  /** Returns true if field headEmail is set (has been assigned a value) and false otherwise */
509
  public boolean isSetHeadEmail() {
510
    return this.headEmail != null;
511
  }
512
 
513
  public void setHeadEmailIsSet(boolean value) {
514
    if (!value) {
515
      this.headEmail = null;
516
    }
517
  }
518
 
519
  public String getContactName() {
520
    return this.contactName;
521
  }
522
 
523
  public void setContactName(String contactName) {
524
    this.contactName = contactName;
525
  }
526
 
527
  public void unsetContactName() {
528
    this.contactName = null;
529
  }
530
 
531
  /** Returns true if field contactName is set (has been assigned a value) and false otherwise */
532
  public boolean isSetContactName() {
533
    return this.contactName != null;
534
  }
535
 
536
  public void setContactNameIsSet(boolean value) {
537
    if (!value) {
538
      this.contactName = null;
539
    }
540
  }
541
 
542
  public String getContactPhone() {
543
    return this.contactPhone;
544
  }
545
 
546
  public void setContactPhone(String contactPhone) {
547
    this.contactPhone = contactPhone;
548
  }
549
 
550
  public void unsetContactPhone() {
551
    this.contactPhone = null;
552
  }
553
 
554
  /** Returns true if field contactPhone is set (has been assigned a value) and false otherwise */
555
  public boolean isSetContactPhone() {
556
    return this.contactPhone != null;
557
  }
558
 
559
  public void setContactPhoneIsSet(boolean value) {
560
    if (!value) {
561
      this.contactPhone = null;
562
    }
563
  }
564
 
565
  public String getContactFax() {
566
    return this.contactFax;
567
  }
568
 
569
  public void setContactFax(String contactFax) {
570
    this.contactFax = contactFax;
571
  }
572
 
573
  public void unsetContactFax() {
574
    this.contactFax = null;
575
  }
576
 
577
  /** Returns true if field contactFax is set (has been assigned a value) and false otherwise */
578
  public boolean isSetContactFax() {
579
    return this.contactFax != null;
580
  }
581
 
582
  public void setContactFaxIsSet(boolean value) {
583
    if (!value) {
584
      this.contactFax = null;
585
    }
586
  }
587
 
588
  public String getContactEmail() {
589
    return this.contactEmail;
590
  }
591
 
592
  public void setContactEmail(String contactEmail) {
593
    this.contactEmail = contactEmail;
594
  }
595
 
596
  public void unsetContactEmail() {
597
    this.contactEmail = null;
598
  }
599
 
600
  /** Returns true if field contactEmail is set (has been assigned a value) and false otherwise */
601
  public boolean isSetContactEmail() {
602
    return this.contactEmail != null;
603
  }
604
 
605
  public void setContactEmailIsSet(boolean value) {
606
    if (!value) {
607
      this.contactEmail = null;
608
    }
609
  }
610
 
611
  public String getRegisteredAddress() {
612
    return this.registeredAddress;
613
  }
614
 
615
  public void setRegisteredAddress(String registeredAddress) {
616
    this.registeredAddress = registeredAddress;
617
  }
618
 
619
  public void unsetRegisteredAddress() {
620
    this.registeredAddress = null;
621
  }
622
 
623
  /** Returns true if field registeredAddress is set (has been assigned a value) and false otherwise */
624
  public boolean isSetRegisteredAddress() {
625
    return this.registeredAddress != null;
626
  }
627
 
628
  public void setRegisteredAddressIsSet(boolean value) {
629
    if (!value) {
630
      this.registeredAddress = null;
631
    }
632
  }
633
 
634
  public String getCommunicationAddress() {
635
    return this.communicationAddress;
636
  }
637
 
638
  public void setCommunicationAddress(String communicationAddress) {
639
    this.communicationAddress = communicationAddress;
640
  }
641
 
642
  public void unsetCommunicationAddress() {
643
    this.communicationAddress = null;
644
  }
645
 
646
  /** Returns true if field communicationAddress is set (has been assigned a value) and false otherwise */
647
  public boolean isSetCommunicationAddress() {
648
    return this.communicationAddress != null;
649
  }
650
 
651
  public void setCommunicationAddressIsSet(boolean value) {
652
    if (!value) {
653
      this.communicationAddress = null;
654
    }
655
  }
656
 
657
  public void setFieldValue(_Fields field, Object value) {
658
    switch (field) {
659
    case ID:
660
      if (value == null) {
661
        unsetId();
662
      } else {
663
        setId((Long)value);
664
      }
665
      break;
666
 
667
    case NAME:
668
      if (value == null) {
669
        unsetName();
670
      } else {
671
        setName((String)value);
672
      }
673
      break;
674
 
675
    case PHONE:
676
      if (value == null) {
677
        unsetPhone();
678
      } else {
679
        setPhone((String)value);
680
      }
681
      break;
682
 
683
    case FAX:
684
      if (value == null) {
685
        unsetFax();
686
      } else {
687
        setFax((String)value);
688
      }
689
      break;
690
 
691
    case TIN:
692
      if (value == null) {
693
        unsetTin();
694
      } else {
695
        setTin((String)value);
696
      }
697
      break;
698
 
699
    case PAN:
700
      if (value == null) {
701
        unsetPan();
702
      } else {
703
        setPan((String)value);
704
      }
705
      break;
706
 
707
    case HEAD_NAME:
708
      if (value == null) {
709
        unsetHeadName();
710
      } else {
711
        setHeadName((String)value);
712
      }
713
      break;
714
 
715
    case HEAD_DESIGNATION:
716
      if (value == null) {
717
        unsetHeadDesignation();
718
      } else {
719
        setHeadDesignation((String)value);
720
      }
721
      break;
722
 
723
    case HEAD_EMAIL:
724
      if (value == null) {
725
        unsetHeadEmail();
726
      } else {
727
        setHeadEmail((String)value);
728
      }
729
      break;
730
 
731
    case CONTACT_NAME:
732
      if (value == null) {
733
        unsetContactName();
734
      } else {
735
        setContactName((String)value);
736
      }
737
      break;
738
 
739
    case CONTACT_PHONE:
740
      if (value == null) {
741
        unsetContactPhone();
742
      } else {
743
        setContactPhone((String)value);
744
      }
745
      break;
746
 
747
    case CONTACT_FAX:
748
      if (value == null) {
749
        unsetContactFax();
750
      } else {
751
        setContactFax((String)value);
752
      }
753
      break;
754
 
755
    case CONTACT_EMAIL:
756
      if (value == null) {
757
        unsetContactEmail();
758
      } else {
759
        setContactEmail((String)value);
760
      }
761
      break;
762
 
763
    case REGISTERED_ADDRESS:
764
      if (value == null) {
765
        unsetRegisteredAddress();
766
      } else {
767
        setRegisteredAddress((String)value);
768
      }
769
      break;
770
 
771
    case COMMUNICATION_ADDRESS:
772
      if (value == null) {
773
        unsetCommunicationAddress();
774
      } else {
775
        setCommunicationAddress((String)value);
776
      }
777
      break;
778
 
779
    }
780
  }
781
 
782
  public Object getFieldValue(_Fields field) {
783
    switch (field) {
784
    case ID:
785
      return Long.valueOf(getId());
786
 
787
    case NAME:
788
      return getName();
789
 
790
    case PHONE:
791
      return getPhone();
792
 
793
    case FAX:
794
      return getFax();
795
 
796
    case TIN:
797
      return getTin();
798
 
799
    case PAN:
800
      return getPan();
801
 
802
    case HEAD_NAME:
803
      return getHeadName();
804
 
805
    case HEAD_DESIGNATION:
806
      return getHeadDesignation();
807
 
808
    case HEAD_EMAIL:
809
      return getHeadEmail();
810
 
811
    case CONTACT_NAME:
812
      return getContactName();
813
 
814
    case CONTACT_PHONE:
815
      return getContactPhone();
816
 
817
    case CONTACT_FAX:
818
      return getContactFax();
819
 
820
    case CONTACT_EMAIL:
821
      return getContactEmail();
822
 
823
    case REGISTERED_ADDRESS:
824
      return getRegisteredAddress();
825
 
826
    case COMMUNICATION_ADDRESS:
827
      return getCommunicationAddress();
828
 
829
    }
830
    throw new IllegalStateException();
831
  }
832
 
833
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
834
  public boolean isSet(_Fields field) {
835
    if (field == null) {
836
      throw new IllegalArgumentException();
837
    }
838
 
839
    switch (field) {
840
    case ID:
841
      return isSetId();
842
    case NAME:
843
      return isSetName();
844
    case PHONE:
845
      return isSetPhone();
846
    case FAX:
847
      return isSetFax();
848
    case TIN:
849
      return isSetTin();
850
    case PAN:
851
      return isSetPan();
852
    case HEAD_NAME:
853
      return isSetHeadName();
854
    case HEAD_DESIGNATION:
855
      return isSetHeadDesignation();
856
    case HEAD_EMAIL:
857
      return isSetHeadEmail();
858
    case CONTACT_NAME:
859
      return isSetContactName();
860
    case CONTACT_PHONE:
861
      return isSetContactPhone();
862
    case CONTACT_FAX:
863
      return isSetContactFax();
864
    case CONTACT_EMAIL:
865
      return isSetContactEmail();
866
    case REGISTERED_ADDRESS:
867
      return isSetRegisteredAddress();
868
    case COMMUNICATION_ADDRESS:
869
      return isSetCommunicationAddress();
870
    }
871
    throw new IllegalStateException();
872
  }
873
 
874
  @Override
875
  public boolean equals(Object that) {
876
    if (that == null)
877
      return false;
878
    if (that instanceof Supplier)
879
      return this.equals((Supplier)that);
880
    return false;
881
  }
882
 
883
  public boolean equals(Supplier that) {
884
    if (that == null)
885
      return false;
886
 
887
    boolean this_present_id = true;
888
    boolean that_present_id = true;
889
    if (this_present_id || that_present_id) {
890
      if (!(this_present_id && that_present_id))
891
        return false;
892
      if (this.id != that.id)
893
        return false;
894
    }
895
 
896
    boolean this_present_name = true && this.isSetName();
897
    boolean that_present_name = true && that.isSetName();
898
    if (this_present_name || that_present_name) {
899
      if (!(this_present_name && that_present_name))
900
        return false;
901
      if (!this.name.equals(that.name))
902
        return false;
903
    }
904
 
905
    boolean this_present_phone = true && this.isSetPhone();
906
    boolean that_present_phone = true && that.isSetPhone();
907
    if (this_present_phone || that_present_phone) {
908
      if (!(this_present_phone && that_present_phone))
909
        return false;
910
      if (!this.phone.equals(that.phone))
911
        return false;
912
    }
913
 
914
    boolean this_present_fax = true && this.isSetFax();
915
    boolean that_present_fax = true && that.isSetFax();
916
    if (this_present_fax || that_present_fax) {
917
      if (!(this_present_fax && that_present_fax))
918
        return false;
919
      if (!this.fax.equals(that.fax))
920
        return false;
921
    }
922
 
923
    boolean this_present_tin = true && this.isSetTin();
924
    boolean that_present_tin = true && that.isSetTin();
925
    if (this_present_tin || that_present_tin) {
926
      if (!(this_present_tin && that_present_tin))
927
        return false;
928
      if (!this.tin.equals(that.tin))
929
        return false;
930
    }
931
 
932
    boolean this_present_pan = true && this.isSetPan();
933
    boolean that_present_pan = true && that.isSetPan();
934
    if (this_present_pan || that_present_pan) {
935
      if (!(this_present_pan && that_present_pan))
936
        return false;
937
      if (!this.pan.equals(that.pan))
938
        return false;
939
    }
940
 
941
    boolean this_present_headName = true && this.isSetHeadName();
942
    boolean that_present_headName = true && that.isSetHeadName();
943
    if (this_present_headName || that_present_headName) {
944
      if (!(this_present_headName && that_present_headName))
945
        return false;
946
      if (!this.headName.equals(that.headName))
947
        return false;
948
    }
949
 
950
    boolean this_present_headDesignation = true && this.isSetHeadDesignation();
951
    boolean that_present_headDesignation = true && that.isSetHeadDesignation();
952
    if (this_present_headDesignation || that_present_headDesignation) {
953
      if (!(this_present_headDesignation && that_present_headDesignation))
954
        return false;
955
      if (!this.headDesignation.equals(that.headDesignation))
956
        return false;
957
    }
958
 
959
    boolean this_present_headEmail = true && this.isSetHeadEmail();
960
    boolean that_present_headEmail = true && that.isSetHeadEmail();
961
    if (this_present_headEmail || that_present_headEmail) {
962
      if (!(this_present_headEmail && that_present_headEmail))
963
        return false;
964
      if (!this.headEmail.equals(that.headEmail))
965
        return false;
966
    }
967
 
968
    boolean this_present_contactName = true && this.isSetContactName();
969
    boolean that_present_contactName = true && that.isSetContactName();
970
    if (this_present_contactName || that_present_contactName) {
971
      if (!(this_present_contactName && that_present_contactName))
972
        return false;
973
      if (!this.contactName.equals(that.contactName))
974
        return false;
975
    }
976
 
977
    boolean this_present_contactPhone = true && this.isSetContactPhone();
978
    boolean that_present_contactPhone = true && that.isSetContactPhone();
979
    if (this_present_contactPhone || that_present_contactPhone) {
980
      if (!(this_present_contactPhone && that_present_contactPhone))
981
        return false;
982
      if (!this.contactPhone.equals(that.contactPhone))
983
        return false;
984
    }
985
 
986
    boolean this_present_contactFax = true && this.isSetContactFax();
987
    boolean that_present_contactFax = true && that.isSetContactFax();
988
    if (this_present_contactFax || that_present_contactFax) {
989
      if (!(this_present_contactFax && that_present_contactFax))
990
        return false;
991
      if (!this.contactFax.equals(that.contactFax))
992
        return false;
993
    }
994
 
995
    boolean this_present_contactEmail = true && this.isSetContactEmail();
996
    boolean that_present_contactEmail = true && that.isSetContactEmail();
997
    if (this_present_contactEmail || that_present_contactEmail) {
998
      if (!(this_present_contactEmail && that_present_contactEmail))
999
        return false;
1000
      if (!this.contactEmail.equals(that.contactEmail))
1001
        return false;
1002
    }
1003
 
1004
    boolean this_present_registeredAddress = true && this.isSetRegisteredAddress();
1005
    boolean that_present_registeredAddress = true && that.isSetRegisteredAddress();
1006
    if (this_present_registeredAddress || that_present_registeredAddress) {
1007
      if (!(this_present_registeredAddress && that_present_registeredAddress))
1008
        return false;
1009
      if (!this.registeredAddress.equals(that.registeredAddress))
1010
        return false;
1011
    }
1012
 
1013
    boolean this_present_communicationAddress = true && this.isSetCommunicationAddress();
1014
    boolean that_present_communicationAddress = true && that.isSetCommunicationAddress();
1015
    if (this_present_communicationAddress || that_present_communicationAddress) {
1016
      if (!(this_present_communicationAddress && that_present_communicationAddress))
1017
        return false;
1018
      if (!this.communicationAddress.equals(that.communicationAddress))
1019
        return false;
1020
    }
1021
 
1022
    return true;
1023
  }
1024
 
1025
  @Override
1026
  public int hashCode() {
1027
    return 0;
1028
  }
1029
 
1030
  public int compareTo(Supplier other) {
1031
    if (!getClass().equals(other.getClass())) {
1032
      return getClass().getName().compareTo(other.getClass().getName());
1033
    }
1034
 
1035
    int lastComparison = 0;
1036
    Supplier typedOther = (Supplier)other;
1037
 
1038
    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
1039
    if (lastComparison != 0) {
1040
      return lastComparison;
1041
    }
1042
    if (isSetId()) {
1043
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
1044
      if (lastComparison != 0) {
1045
        return lastComparison;
1046
      }
1047
    }
1048
    lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
1049
    if (lastComparison != 0) {
1050
      return lastComparison;
1051
    }
1052
    if (isSetName()) {
1053
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
1054
      if (lastComparison != 0) {
1055
        return lastComparison;
1056
      }
1057
    }
1058
    lastComparison = Boolean.valueOf(isSetPhone()).compareTo(typedOther.isSetPhone());
1059
    if (lastComparison != 0) {
1060
      return lastComparison;
1061
    }
1062
    if (isSetPhone()) {
1063
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.phone, typedOther.phone);
1064
      if (lastComparison != 0) {
1065
        return lastComparison;
1066
      }
1067
    }
1068
    lastComparison = Boolean.valueOf(isSetFax()).compareTo(typedOther.isSetFax());
1069
    if (lastComparison != 0) {
1070
      return lastComparison;
1071
    }
1072
    if (isSetFax()) {
1073
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fax, typedOther.fax);
1074
      if (lastComparison != 0) {
1075
        return lastComparison;
1076
      }
1077
    }
1078
    lastComparison = Boolean.valueOf(isSetTin()).compareTo(typedOther.isSetTin());
1079
    if (lastComparison != 0) {
1080
      return lastComparison;
1081
    }
1082
    if (isSetTin()) {
1083
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tin, typedOther.tin);
1084
      if (lastComparison != 0) {
1085
        return lastComparison;
1086
      }
1087
    }
1088
    lastComparison = Boolean.valueOf(isSetPan()).compareTo(typedOther.isSetPan());
1089
    if (lastComparison != 0) {
1090
      return lastComparison;
1091
    }
1092
    if (isSetPan()) {
1093
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pan, typedOther.pan);
1094
      if (lastComparison != 0) {
1095
        return lastComparison;
1096
      }
1097
    }
1098
    lastComparison = Boolean.valueOf(isSetHeadName()).compareTo(typedOther.isSetHeadName());
1099
    if (lastComparison != 0) {
1100
      return lastComparison;
1101
    }
1102
    if (isSetHeadName()) {
1103
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.headName, typedOther.headName);
1104
      if (lastComparison != 0) {
1105
        return lastComparison;
1106
      }
1107
    }
1108
    lastComparison = Boolean.valueOf(isSetHeadDesignation()).compareTo(typedOther.isSetHeadDesignation());
1109
    if (lastComparison != 0) {
1110
      return lastComparison;
1111
    }
1112
    if (isSetHeadDesignation()) {
1113
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.headDesignation, typedOther.headDesignation);
1114
      if (lastComparison != 0) {
1115
        return lastComparison;
1116
      }
1117
    }
1118
    lastComparison = Boolean.valueOf(isSetHeadEmail()).compareTo(typedOther.isSetHeadEmail());
1119
    if (lastComparison != 0) {
1120
      return lastComparison;
1121
    }
1122
    if (isSetHeadEmail()) {
1123
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.headEmail, typedOther.headEmail);
1124
      if (lastComparison != 0) {
1125
        return lastComparison;
1126
      }
1127
    }
1128
    lastComparison = Boolean.valueOf(isSetContactName()).compareTo(typedOther.isSetContactName());
1129
    if (lastComparison != 0) {
1130
      return lastComparison;
1131
    }
1132
    if (isSetContactName()) {
1133
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.contactName, typedOther.contactName);
1134
      if (lastComparison != 0) {
1135
        return lastComparison;
1136
      }
1137
    }
1138
    lastComparison = Boolean.valueOf(isSetContactPhone()).compareTo(typedOther.isSetContactPhone());
1139
    if (lastComparison != 0) {
1140
      return lastComparison;
1141
    }
1142
    if (isSetContactPhone()) {
1143
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.contactPhone, typedOther.contactPhone);
1144
      if (lastComparison != 0) {
1145
        return lastComparison;
1146
      }
1147
    }
1148
    lastComparison = Boolean.valueOf(isSetContactFax()).compareTo(typedOther.isSetContactFax());
1149
    if (lastComparison != 0) {
1150
      return lastComparison;
1151
    }
1152
    if (isSetContactFax()) {
1153
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.contactFax, typedOther.contactFax);
1154
      if (lastComparison != 0) {
1155
        return lastComparison;
1156
      }
1157
    }
1158
    lastComparison = Boolean.valueOf(isSetContactEmail()).compareTo(typedOther.isSetContactEmail());
1159
    if (lastComparison != 0) {
1160
      return lastComparison;
1161
    }
1162
    if (isSetContactEmail()) {
1163
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.contactEmail, typedOther.contactEmail);
1164
      if (lastComparison != 0) {
1165
        return lastComparison;
1166
      }
1167
    }
1168
    lastComparison = Boolean.valueOf(isSetRegisteredAddress()).compareTo(typedOther.isSetRegisteredAddress());
1169
    if (lastComparison != 0) {
1170
      return lastComparison;
1171
    }
1172
    if (isSetRegisteredAddress()) {
1173
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.registeredAddress, typedOther.registeredAddress);
1174
      if (lastComparison != 0) {
1175
        return lastComparison;
1176
      }
1177
    }
1178
    lastComparison = Boolean.valueOf(isSetCommunicationAddress()).compareTo(typedOther.isSetCommunicationAddress());
1179
    if (lastComparison != 0) {
1180
      return lastComparison;
1181
    }
1182
    if (isSetCommunicationAddress()) {
1183
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.communicationAddress, typedOther.communicationAddress);
1184
      if (lastComparison != 0) {
1185
        return lastComparison;
1186
      }
1187
    }
1188
    return 0;
1189
  }
1190
 
1191
  public _Fields fieldForId(int fieldId) {
1192
    return _Fields.findByThriftId(fieldId);
1193
  }
1194
 
1195
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1196
    org.apache.thrift.protocol.TField field;
1197
    iprot.readStructBegin();
1198
    while (true)
1199
    {
1200
      field = iprot.readFieldBegin();
1201
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1202
        break;
1203
      }
1204
      switch (field.id) {
1205
        case 1: // ID
1206
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1207
            this.id = iprot.readI64();
1208
            setIdIsSet(true);
1209
          } else { 
1210
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1211
          }
1212
          break;
1213
        case 2: // NAME
1214
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1215
            this.name = iprot.readString();
1216
          } else { 
1217
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1218
          }
1219
          break;
1220
        case 3: // PHONE
1221
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1222
            this.phone = iprot.readString();
1223
          } else { 
1224
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1225
          }
1226
          break;
1227
        case 4: // FAX
1228
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1229
            this.fax = iprot.readString();
1230
          } else { 
1231
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1232
          }
1233
          break;
1234
        case 5: // TIN
1235
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1236
            this.tin = iprot.readString();
1237
          } else { 
1238
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1239
          }
1240
          break;
1241
        case 6: // PAN
1242
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1243
            this.pan = iprot.readString();
1244
          } else { 
1245
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1246
          }
1247
          break;
1248
        case 7: // HEAD_NAME
1249
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1250
            this.headName = iprot.readString();
1251
          } else { 
1252
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1253
          }
1254
          break;
1255
        case 8: // HEAD_DESIGNATION
1256
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1257
            this.headDesignation = iprot.readString();
1258
          } else { 
1259
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1260
          }
1261
          break;
1262
        case 9: // HEAD_EMAIL
1263
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1264
            this.headEmail = iprot.readString();
1265
          } else { 
1266
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1267
          }
1268
          break;
1269
        case 10: // CONTACT_NAME
1270
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1271
            this.contactName = iprot.readString();
1272
          } else { 
1273
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1274
          }
1275
          break;
1276
        case 11: // CONTACT_PHONE
1277
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1278
            this.contactPhone = iprot.readString();
1279
          } else { 
1280
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1281
          }
1282
          break;
1283
        case 12: // CONTACT_FAX
1284
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1285
            this.contactFax = iprot.readString();
1286
          } else { 
1287
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1288
          }
1289
          break;
1290
        case 13: // CONTACT_EMAIL
1291
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1292
            this.contactEmail = iprot.readString();
1293
          } else { 
1294
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1295
          }
1296
          break;
1297
        case 14: // REGISTERED_ADDRESS
1298
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1299
            this.registeredAddress = iprot.readString();
1300
          } else { 
1301
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1302
          }
1303
          break;
1304
        case 15: // COMMUNICATION_ADDRESS
1305
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1306
            this.communicationAddress = iprot.readString();
1307
          } else { 
1308
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1309
          }
1310
          break;
1311
        default:
1312
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1313
      }
1314
      iprot.readFieldEnd();
1315
    }
1316
    iprot.readStructEnd();
1317
    validate();
1318
  }
1319
 
1320
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1321
    validate();
1322
 
1323
    oprot.writeStructBegin(STRUCT_DESC);
1324
    oprot.writeFieldBegin(ID_FIELD_DESC);
1325
    oprot.writeI64(this.id);
1326
    oprot.writeFieldEnd();
1327
    if (this.name != null) {
1328
      oprot.writeFieldBegin(NAME_FIELD_DESC);
1329
      oprot.writeString(this.name);
1330
      oprot.writeFieldEnd();
1331
    }
1332
    if (this.phone != null) {
1333
      oprot.writeFieldBegin(PHONE_FIELD_DESC);
1334
      oprot.writeString(this.phone);
1335
      oprot.writeFieldEnd();
1336
    }
1337
    if (this.fax != null) {
1338
      oprot.writeFieldBegin(FAX_FIELD_DESC);
1339
      oprot.writeString(this.fax);
1340
      oprot.writeFieldEnd();
1341
    }
1342
    if (this.tin != null) {
1343
      oprot.writeFieldBegin(TIN_FIELD_DESC);
1344
      oprot.writeString(this.tin);
1345
      oprot.writeFieldEnd();
1346
    }
1347
    if (this.pan != null) {
1348
      oprot.writeFieldBegin(PAN_FIELD_DESC);
1349
      oprot.writeString(this.pan);
1350
      oprot.writeFieldEnd();
1351
    }
1352
    if (this.headName != null) {
1353
      oprot.writeFieldBegin(HEAD_NAME_FIELD_DESC);
1354
      oprot.writeString(this.headName);
1355
      oprot.writeFieldEnd();
1356
    }
1357
    if (this.headDesignation != null) {
1358
      oprot.writeFieldBegin(HEAD_DESIGNATION_FIELD_DESC);
1359
      oprot.writeString(this.headDesignation);
1360
      oprot.writeFieldEnd();
1361
    }
1362
    if (this.headEmail != null) {
1363
      oprot.writeFieldBegin(HEAD_EMAIL_FIELD_DESC);
1364
      oprot.writeString(this.headEmail);
1365
      oprot.writeFieldEnd();
1366
    }
1367
    if (this.contactName != null) {
1368
      oprot.writeFieldBegin(CONTACT_NAME_FIELD_DESC);
1369
      oprot.writeString(this.contactName);
1370
      oprot.writeFieldEnd();
1371
    }
1372
    if (this.contactPhone != null) {
1373
      oprot.writeFieldBegin(CONTACT_PHONE_FIELD_DESC);
1374
      oprot.writeString(this.contactPhone);
1375
      oprot.writeFieldEnd();
1376
    }
1377
    if (this.contactFax != null) {
1378
      oprot.writeFieldBegin(CONTACT_FAX_FIELD_DESC);
1379
      oprot.writeString(this.contactFax);
1380
      oprot.writeFieldEnd();
1381
    }
1382
    if (this.contactEmail != null) {
1383
      oprot.writeFieldBegin(CONTACT_EMAIL_FIELD_DESC);
1384
      oprot.writeString(this.contactEmail);
1385
      oprot.writeFieldEnd();
1386
    }
1387
    if (this.registeredAddress != null) {
1388
      oprot.writeFieldBegin(REGISTERED_ADDRESS_FIELD_DESC);
1389
      oprot.writeString(this.registeredAddress);
1390
      oprot.writeFieldEnd();
1391
    }
1392
    if (this.communicationAddress != null) {
1393
      oprot.writeFieldBegin(COMMUNICATION_ADDRESS_FIELD_DESC);
1394
      oprot.writeString(this.communicationAddress);
1395
      oprot.writeFieldEnd();
1396
    }
1397
    oprot.writeFieldStop();
1398
    oprot.writeStructEnd();
1399
  }
1400
 
1401
  @Override
1402
  public String toString() {
1403
    StringBuilder sb = new StringBuilder("Supplier(");
1404
    boolean first = true;
1405
 
1406
    sb.append("id:");
1407
    sb.append(this.id);
1408
    first = false;
1409
    if (!first) sb.append(", ");
1410
    sb.append("name:");
1411
    if (this.name == null) {
1412
      sb.append("null");
1413
    } else {
1414
      sb.append(this.name);
1415
    }
1416
    first = false;
1417
    if (!first) sb.append(", ");
1418
    sb.append("phone:");
1419
    if (this.phone == null) {
1420
      sb.append("null");
1421
    } else {
1422
      sb.append(this.phone);
1423
    }
1424
    first = false;
1425
    if (!first) sb.append(", ");
1426
    sb.append("fax:");
1427
    if (this.fax == null) {
1428
      sb.append("null");
1429
    } else {
1430
      sb.append(this.fax);
1431
    }
1432
    first = false;
1433
    if (!first) sb.append(", ");
1434
    sb.append("tin:");
1435
    if (this.tin == null) {
1436
      sb.append("null");
1437
    } else {
1438
      sb.append(this.tin);
1439
    }
1440
    first = false;
1441
    if (!first) sb.append(", ");
1442
    sb.append("pan:");
1443
    if (this.pan == null) {
1444
      sb.append("null");
1445
    } else {
1446
      sb.append(this.pan);
1447
    }
1448
    first = false;
1449
    if (!first) sb.append(", ");
1450
    sb.append("headName:");
1451
    if (this.headName == null) {
1452
      sb.append("null");
1453
    } else {
1454
      sb.append(this.headName);
1455
    }
1456
    first = false;
1457
    if (!first) sb.append(", ");
1458
    sb.append("headDesignation:");
1459
    if (this.headDesignation == null) {
1460
      sb.append("null");
1461
    } else {
1462
      sb.append(this.headDesignation);
1463
    }
1464
    first = false;
1465
    if (!first) sb.append(", ");
1466
    sb.append("headEmail:");
1467
    if (this.headEmail == null) {
1468
      sb.append("null");
1469
    } else {
1470
      sb.append(this.headEmail);
1471
    }
1472
    first = false;
1473
    if (!first) sb.append(", ");
1474
    sb.append("contactName:");
1475
    if (this.contactName == null) {
1476
      sb.append("null");
1477
    } else {
1478
      sb.append(this.contactName);
1479
    }
1480
    first = false;
1481
    if (!first) sb.append(", ");
1482
    sb.append("contactPhone:");
1483
    if (this.contactPhone == null) {
1484
      sb.append("null");
1485
    } else {
1486
      sb.append(this.contactPhone);
1487
    }
1488
    first = false;
1489
    if (!first) sb.append(", ");
1490
    sb.append("contactFax:");
1491
    if (this.contactFax == null) {
1492
      sb.append("null");
1493
    } else {
1494
      sb.append(this.contactFax);
1495
    }
1496
    first = false;
1497
    if (!first) sb.append(", ");
1498
    sb.append("contactEmail:");
1499
    if (this.contactEmail == null) {
1500
      sb.append("null");
1501
    } else {
1502
      sb.append(this.contactEmail);
1503
    }
1504
    first = false;
1505
    if (!first) sb.append(", ");
1506
    sb.append("registeredAddress:");
1507
    if (this.registeredAddress == null) {
1508
      sb.append("null");
1509
    } else {
1510
      sb.append(this.registeredAddress);
1511
    }
1512
    first = false;
1513
    if (!first) sb.append(", ");
1514
    sb.append("communicationAddress:");
1515
    if (this.communicationAddress == null) {
1516
      sb.append("null");
1517
    } else {
1518
      sb.append(this.communicationAddress);
1519
    }
1520
    first = false;
1521
    sb.append(")");
1522
    return sb.toString();
1523
  }
1524
 
1525
  public void validate() throws org.apache.thrift.TException {
1526
    // check for required fields
1527
  }
1528
 
1529
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1530
    try {
1531
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1532
    } catch (org.apache.thrift.TException te) {
1533
      throw new java.io.IOException(te);
1534
    }
1535
  }
1536
 
1537
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1538
    try {
1539
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1540
      __isset_bit_vector = new BitSet(1);
1541
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1542
    } catch (org.apache.thrift.TException te) {
1543
      throw new java.io.IOException(te);
1544
    }
1545
  }
1546
 
1547
}
1548