Subversion Repositories SmartDukaan

Rev

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