Subversion Repositories SmartDukaan

Rev

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