Subversion Repositories SmartDukaan

Rev

Rev 4793 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3028 mandeep.dh 1
/**
3430 rajveer 2
 * Autogenerated by Thrift Compiler (0.7.0)
3028 mandeep.dh 3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.crm;
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;
3430 rajveer 18
import java.nio.ByteBuffer;
3028 mandeep.dh 19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
3430 rajveer 23
public class Agent implements org.apache.thrift.TBase<Agent, Agent._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Agent");
3028 mandeep.dh 25
 
3430 rajveer 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 EMAIL_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("emailId", org.apache.thrift.protocol.TType.STRING, (short)3);
29
  private static final org.apache.thrift.protocol.TField MANAGER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("managerId", org.apache.thrift.protocol.TType.I64, (short)4);
30
  private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)5);
4793 amar.kumar 31
  private static final org.apache.thrift.protocol.TField IS_ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("is_active", org.apache.thrift.protocol.TType.BOOL, (short)6);
16244 manish.sha 32
  private static final org.apache.thrift.protocol.TField IS_PM_CRM_USER_FIELD_DESC = new org.apache.thrift.protocol.TField("is_pmCrmUser", org.apache.thrift.protocol.TType.BOOL, (short)7);
33
  private static final org.apache.thrift.protocol.TField IS_ALL_ASSIGNABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("is_allAssignable", org.apache.thrift.protocol.TType.BOOL, (short)8);
3028 mandeep.dh 34
 
3430 rajveer 35
  private long id; // required
36
  private String name; // required
37
  private String emailId; // required
38
  private long managerId; // required
39
  private String password; // required
4793 amar.kumar 40
  private boolean is_active; // required
16244 manish.sha 41
  private boolean is_pmCrmUser; // required
42
  private boolean is_allAssignable; // required
3028 mandeep.dh 43
 
44
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 45
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3028 mandeep.dh 46
    ID((short)1, "id"),
47
    NAME((short)2, "name"),
48
    EMAIL_ID((short)3, "emailId"),
49
    MANAGER_ID((short)4, "managerId"),
4793 amar.kumar 50
    PASSWORD((short)5, "password"),
16244 manish.sha 51
    IS_ACTIVE((short)6, "is_active"),
52
    IS_PM_CRM_USER((short)7, "is_pmCrmUser"),
53
    IS_ALL_ASSIGNABLE((short)8, "is_allAssignable");
3028 mandeep.dh 54
 
55
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
56
 
57
    static {
58
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
59
        byName.put(field.getFieldName(), field);
60
      }
61
    }
62
 
63
    /**
64
     * Find the _Fields constant that matches fieldId, or null if its not found.
65
     */
66
    public static _Fields findByThriftId(int fieldId) {
3430 rajveer 67
      switch(fieldId) {
68
        case 1: // ID
69
          return ID;
70
        case 2: // NAME
71
          return NAME;
72
        case 3: // EMAIL_ID
73
          return EMAIL_ID;
74
        case 4: // MANAGER_ID
75
          return MANAGER_ID;
76
        case 5: // PASSWORD
77
          return PASSWORD;
4793 amar.kumar 78
        case 6: // IS_ACTIVE
79
          return IS_ACTIVE;
16244 manish.sha 80
        case 7: // IS_PM_CRM_USER
81
          return IS_PM_CRM_USER;
82
        case 8: // IS_ALL_ASSIGNABLE
83
          return IS_ALL_ASSIGNABLE;
3430 rajveer 84
        default:
85
          return null;
86
      }
3028 mandeep.dh 87
    }
88
 
89
    /**
90
     * Find the _Fields constant that matches fieldId, throwing an exception
91
     * if it is not found.
92
     */
93
    public static _Fields findByThriftIdOrThrow(int fieldId) {
94
      _Fields fields = findByThriftId(fieldId);
95
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
96
      return fields;
97
    }
98
 
99
    /**
100
     * Find the _Fields constant that matches name, or null if its not found.
101
     */
102
    public static _Fields findByName(String name) {
103
      return byName.get(name);
104
    }
105
 
106
    private final short _thriftId;
107
    private final String _fieldName;
108
 
109
    _Fields(short thriftId, String fieldName) {
110
      _thriftId = thriftId;
111
      _fieldName = fieldName;
112
    }
113
 
114
    public short getThriftFieldId() {
115
      return _thriftId;
116
    }
117
 
118
    public String getFieldName() {
119
      return _fieldName;
120
    }
121
  }
122
 
123
  // isset id assignments
124
  private static final int __ID_ISSET_ID = 0;
125
  private static final int __MANAGERID_ISSET_ID = 1;
4793 amar.kumar 126
  private static final int __IS_ACTIVE_ISSET_ID = 2;
16244 manish.sha 127
  private static final int __IS_PMCRMUSER_ISSET_ID = 3;
128
  private static final int __IS_ALLASSIGNABLE_ISSET_ID = 4;
129
  private BitSet __isset_bit_vector = new BitSet(5);
3028 mandeep.dh 130
 
3430 rajveer 131
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3028 mandeep.dh 132
  static {
3430 rajveer 133
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
134
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
135
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
136
    tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
137
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
138
    tmpMap.put(_Fields.EMAIL_ID, new org.apache.thrift.meta_data.FieldMetaData("emailId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
139
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
140
    tmpMap.put(_Fields.MANAGER_ID, new org.apache.thrift.meta_data.FieldMetaData("managerId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
141
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
142
    tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT, 
143
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4793 amar.kumar 144
    tmpMap.put(_Fields.IS_ACTIVE, new org.apache.thrift.meta_data.FieldMetaData("is_active", org.apache.thrift.TFieldRequirementType.DEFAULT, 
145
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
16244 manish.sha 146
    tmpMap.put(_Fields.IS_PM_CRM_USER, new org.apache.thrift.meta_data.FieldMetaData("is_pmCrmUser", org.apache.thrift.TFieldRequirementType.DEFAULT, 
147
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
148
    tmpMap.put(_Fields.IS_ALL_ASSIGNABLE, new org.apache.thrift.meta_data.FieldMetaData("is_allAssignable", org.apache.thrift.TFieldRequirementType.DEFAULT, 
149
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
3430 rajveer 150
    metaDataMap = Collections.unmodifiableMap(tmpMap);
151
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Agent.class, metaDataMap);
3028 mandeep.dh 152
  }
153
 
154
  public Agent() {
155
  }
156
 
157
  public Agent(
158
    long id,
159
    String name,
160
    String emailId,
4793 amar.kumar 161
    String password,
16244 manish.sha 162
    boolean is_active,
163
    boolean is_pmCrmUser,
164
    boolean is_allAssignable)
3028 mandeep.dh 165
  {
166
    this();
167
    this.id = id;
168
    setIdIsSet(true);
169
    this.name = name;
170
    this.emailId = emailId;
171
    this.password = password;
4793 amar.kumar 172
    this.is_active = is_active;
173
    setIs_activeIsSet(true);
16244 manish.sha 174
    this.is_pmCrmUser = is_pmCrmUser;
175
    setIs_pmCrmUserIsSet(true);
176
    this.is_allAssignable = is_allAssignable;
177
    setIs_allAssignableIsSet(true);
3028 mandeep.dh 178
  }
179
 
180
  /**
181
   * Performs a deep copy on <i>other</i>.
182
   */
183
  public Agent(Agent other) {
184
    __isset_bit_vector.clear();
185
    __isset_bit_vector.or(other.__isset_bit_vector);
186
    this.id = other.id;
187
    if (other.isSetName()) {
188
      this.name = other.name;
189
    }
190
    if (other.isSetEmailId()) {
191
      this.emailId = other.emailId;
192
    }
193
    this.managerId = other.managerId;
194
    if (other.isSetPassword()) {
195
      this.password = other.password;
196
    }
4793 amar.kumar 197
    this.is_active = other.is_active;
16244 manish.sha 198
    this.is_pmCrmUser = other.is_pmCrmUser;
199
    this.is_allAssignable = other.is_allAssignable;
3028 mandeep.dh 200
  }
201
 
202
  public Agent deepCopy() {
203
    return new Agent(this);
204
  }
205
 
3430 rajveer 206
  @Override
207
  public void clear() {
208
    setIdIsSet(false);
209
    this.id = 0;
210
    this.name = null;
211
    this.emailId = null;
212
    setManagerIdIsSet(false);
213
    this.managerId = 0;
214
    this.password = null;
4793 amar.kumar 215
    setIs_activeIsSet(false);
216
    this.is_active = false;
16244 manish.sha 217
    setIs_pmCrmUserIsSet(false);
218
    this.is_pmCrmUser = false;
219
    setIs_allAssignableIsSet(false);
220
    this.is_allAssignable = false;
3028 mandeep.dh 221
  }
222
 
223
  public long getId() {
224
    return this.id;
225
  }
226
 
3430 rajveer 227
  public void setId(long id) {
3028 mandeep.dh 228
    this.id = id;
229
    setIdIsSet(true);
230
  }
231
 
232
  public void unsetId() {
233
    __isset_bit_vector.clear(__ID_ISSET_ID);
234
  }
235
 
3430 rajveer 236
  /** Returns true if field id is set (has been assigned a value) and false otherwise */
3028 mandeep.dh 237
  public boolean isSetId() {
238
    return __isset_bit_vector.get(__ID_ISSET_ID);
239
  }
240
 
241
  public void setIdIsSet(boolean value) {
242
    __isset_bit_vector.set(__ID_ISSET_ID, value);
243
  }
244
 
245
  public String getName() {
246
    return this.name;
247
  }
248
 
3430 rajveer 249
  public void setName(String name) {
3028 mandeep.dh 250
    this.name = name;
251
  }
252
 
253
  public void unsetName() {
254
    this.name = null;
255
  }
256
 
3430 rajveer 257
  /** Returns true if field name is set (has been assigned a value) and false otherwise */
3028 mandeep.dh 258
  public boolean isSetName() {
259
    return this.name != null;
260
  }
261
 
262
  public void setNameIsSet(boolean value) {
263
    if (!value) {
264
      this.name = null;
265
    }
266
  }
267
 
268
  public String getEmailId() {
269
    return this.emailId;
270
  }
271
 
3430 rajveer 272
  public void setEmailId(String emailId) {
3028 mandeep.dh 273
    this.emailId = emailId;
274
  }
275
 
276
  public void unsetEmailId() {
277
    this.emailId = null;
278
  }
279
 
3430 rajveer 280
  /** Returns true if field emailId is set (has been assigned a value) and false otherwise */
3028 mandeep.dh 281
  public boolean isSetEmailId() {
282
    return this.emailId != null;
283
  }
284
 
285
  public void setEmailIdIsSet(boolean value) {
286
    if (!value) {
287
      this.emailId = null;
288
    }
289
  }
290
 
291
  public long getManagerId() {
292
    return this.managerId;
293
  }
294
 
3430 rajveer 295
  public void setManagerId(long managerId) {
3028 mandeep.dh 296
    this.managerId = managerId;
297
    setManagerIdIsSet(true);
298
  }
299
 
300
  public void unsetManagerId() {
301
    __isset_bit_vector.clear(__MANAGERID_ISSET_ID);
302
  }
303
 
3430 rajveer 304
  /** Returns true if field managerId is set (has been assigned a value) and false otherwise */
3028 mandeep.dh 305
  public boolean isSetManagerId() {
306
    return __isset_bit_vector.get(__MANAGERID_ISSET_ID);
307
  }
308
 
309
  public void setManagerIdIsSet(boolean value) {
310
    __isset_bit_vector.set(__MANAGERID_ISSET_ID, value);
311
  }
312
 
313
  public String getPassword() {
314
    return this.password;
315
  }
316
 
3430 rajveer 317
  public void setPassword(String password) {
3028 mandeep.dh 318
    this.password = password;
319
  }
320
 
321
  public void unsetPassword() {
322
    this.password = null;
323
  }
324
 
3430 rajveer 325
  /** Returns true if field password is set (has been assigned a value) and false otherwise */
3028 mandeep.dh 326
  public boolean isSetPassword() {
327
    return this.password != null;
328
  }
329
 
330
  public void setPasswordIsSet(boolean value) {
331
    if (!value) {
332
      this.password = null;
333
    }
334
  }
335
 
4793 amar.kumar 336
  public boolean isIs_active() {
337
    return this.is_active;
338
  }
339
 
340
  public void setIs_active(boolean is_active) {
341
    this.is_active = is_active;
342
    setIs_activeIsSet(true);
343
  }
344
 
345
  public void unsetIs_active() {
346
    __isset_bit_vector.clear(__IS_ACTIVE_ISSET_ID);
347
  }
348
 
349
  /** Returns true if field is_active is set (has been assigned a value) and false otherwise */
350
  public boolean isSetIs_active() {
351
    return __isset_bit_vector.get(__IS_ACTIVE_ISSET_ID);
352
  }
353
 
354
  public void setIs_activeIsSet(boolean value) {
355
    __isset_bit_vector.set(__IS_ACTIVE_ISSET_ID, value);
356
  }
357
 
16244 manish.sha 358
  public boolean isIs_pmCrmUser() {
359
    return this.is_pmCrmUser;
360
  }
361
 
362
  public void setIs_pmCrmUser(boolean is_pmCrmUser) {
363
    this.is_pmCrmUser = is_pmCrmUser;
364
    setIs_pmCrmUserIsSet(true);
365
  }
366
 
367
  public void unsetIs_pmCrmUser() {
368
    __isset_bit_vector.clear(__IS_PMCRMUSER_ISSET_ID);
369
  }
370
 
371
  /** Returns true if field is_pmCrmUser is set (has been assigned a value) and false otherwise */
372
  public boolean isSetIs_pmCrmUser() {
373
    return __isset_bit_vector.get(__IS_PMCRMUSER_ISSET_ID);
374
  }
375
 
376
  public void setIs_pmCrmUserIsSet(boolean value) {
377
    __isset_bit_vector.set(__IS_PMCRMUSER_ISSET_ID, value);
378
  }
379
 
380
  public boolean isIs_allAssignable() {
381
    return this.is_allAssignable;
382
  }
383
 
384
  public void setIs_allAssignable(boolean is_allAssignable) {
385
    this.is_allAssignable = is_allAssignable;
386
    setIs_allAssignableIsSet(true);
387
  }
388
 
389
  public void unsetIs_allAssignable() {
390
    __isset_bit_vector.clear(__IS_ALLASSIGNABLE_ISSET_ID);
391
  }
392
 
393
  /** Returns true if field is_allAssignable is set (has been assigned a value) and false otherwise */
394
  public boolean isSetIs_allAssignable() {
395
    return __isset_bit_vector.get(__IS_ALLASSIGNABLE_ISSET_ID);
396
  }
397
 
398
  public void setIs_allAssignableIsSet(boolean value) {
399
    __isset_bit_vector.set(__IS_ALLASSIGNABLE_ISSET_ID, value);
400
  }
401
 
3028 mandeep.dh 402
  public void setFieldValue(_Fields field, Object value) {
403
    switch (field) {
404
    case ID:
405
      if (value == null) {
406
        unsetId();
407
      } else {
408
        setId((Long)value);
409
      }
410
      break;
411
 
412
    case NAME:
413
      if (value == null) {
414
        unsetName();
415
      } else {
416
        setName((String)value);
417
      }
418
      break;
419
 
420
    case EMAIL_ID:
421
      if (value == null) {
422
        unsetEmailId();
423
      } else {
424
        setEmailId((String)value);
425
      }
426
      break;
427
 
428
    case MANAGER_ID:
429
      if (value == null) {
430
        unsetManagerId();
431
      } else {
432
        setManagerId((Long)value);
433
      }
434
      break;
435
 
436
    case PASSWORD:
437
      if (value == null) {
438
        unsetPassword();
439
      } else {
440
        setPassword((String)value);
441
      }
442
      break;
443
 
4793 amar.kumar 444
    case IS_ACTIVE:
445
      if (value == null) {
446
        unsetIs_active();
447
      } else {
448
        setIs_active((Boolean)value);
449
      }
450
      break;
451
 
16244 manish.sha 452
    case IS_PM_CRM_USER:
453
      if (value == null) {
454
        unsetIs_pmCrmUser();
455
      } else {
456
        setIs_pmCrmUser((Boolean)value);
457
      }
458
      break;
459
 
460
    case IS_ALL_ASSIGNABLE:
461
      if (value == null) {
462
        unsetIs_allAssignable();
463
      } else {
464
        setIs_allAssignable((Boolean)value);
465
      }
466
      break;
467
 
3028 mandeep.dh 468
    }
469
  }
470
 
471
  public Object getFieldValue(_Fields field) {
472
    switch (field) {
473
    case ID:
3430 rajveer 474
      return Long.valueOf(getId());
3028 mandeep.dh 475
 
476
    case NAME:
477
      return getName();
478
 
479
    case EMAIL_ID:
480
      return getEmailId();
481
 
482
    case MANAGER_ID:
3430 rajveer 483
      return Long.valueOf(getManagerId());
3028 mandeep.dh 484
 
485
    case PASSWORD:
486
      return getPassword();
487
 
4793 amar.kumar 488
    case IS_ACTIVE:
489
      return Boolean.valueOf(isIs_active());
490
 
16244 manish.sha 491
    case IS_PM_CRM_USER:
492
      return Boolean.valueOf(isIs_pmCrmUser());
493
 
494
    case IS_ALL_ASSIGNABLE:
495
      return Boolean.valueOf(isIs_allAssignable());
496
 
3028 mandeep.dh 497
    }
498
    throw new IllegalStateException();
499
  }
500
 
3430 rajveer 501
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
502
  public boolean isSet(_Fields field) {
503
    if (field == null) {
504
      throw new IllegalArgumentException();
505
    }
3028 mandeep.dh 506
 
507
    switch (field) {
508
    case ID:
509
      return isSetId();
510
    case NAME:
511
      return isSetName();
512
    case EMAIL_ID:
513
      return isSetEmailId();
514
    case MANAGER_ID:
515
      return isSetManagerId();
516
    case PASSWORD:
517
      return isSetPassword();
4793 amar.kumar 518
    case IS_ACTIVE:
519
      return isSetIs_active();
16244 manish.sha 520
    case IS_PM_CRM_USER:
521
      return isSetIs_pmCrmUser();
522
    case IS_ALL_ASSIGNABLE:
523
      return isSetIs_allAssignable();
3028 mandeep.dh 524
    }
525
    throw new IllegalStateException();
526
  }
527
 
528
  @Override
529
  public boolean equals(Object that) {
530
    if (that == null)
531
      return false;
532
    if (that instanceof Agent)
533
      return this.equals((Agent)that);
534
    return false;
535
  }
536
 
537
  public boolean equals(Agent that) {
538
    if (that == null)
539
      return false;
540
 
541
    boolean this_present_id = true;
542
    boolean that_present_id = true;
543
    if (this_present_id || that_present_id) {
544
      if (!(this_present_id && that_present_id))
545
        return false;
546
      if (this.id != that.id)
547
        return false;
548
    }
549
 
550
    boolean this_present_name = true && this.isSetName();
551
    boolean that_present_name = true && that.isSetName();
552
    if (this_present_name || that_present_name) {
553
      if (!(this_present_name && that_present_name))
554
        return false;
555
      if (!this.name.equals(that.name))
556
        return false;
557
    }
558
 
559
    boolean this_present_emailId = true && this.isSetEmailId();
560
    boolean that_present_emailId = true && that.isSetEmailId();
561
    if (this_present_emailId || that_present_emailId) {
562
      if (!(this_present_emailId && that_present_emailId))
563
        return false;
564
      if (!this.emailId.equals(that.emailId))
565
        return false;
566
    }
567
 
3168 mandeep.dh 568
    boolean this_present_managerId = true && this.isSetManagerId();
569
    boolean that_present_managerId = true && that.isSetManagerId();
3028 mandeep.dh 570
    if (this_present_managerId || that_present_managerId) {
571
      if (!(this_present_managerId && that_present_managerId))
572
        return false;
573
      if (this.managerId != that.managerId)
574
        return false;
575
    }
576
 
577
    boolean this_present_password = true && this.isSetPassword();
578
    boolean that_present_password = true && that.isSetPassword();
579
    if (this_present_password || that_present_password) {
580
      if (!(this_present_password && that_present_password))
581
        return false;
582
      if (!this.password.equals(that.password))
583
        return false;
584
    }
585
 
4793 amar.kumar 586
    boolean this_present_is_active = true;
587
    boolean that_present_is_active = true;
588
    if (this_present_is_active || that_present_is_active) {
589
      if (!(this_present_is_active && that_present_is_active))
590
        return false;
591
      if (this.is_active != that.is_active)
592
        return false;
593
    }
594
 
16244 manish.sha 595
    boolean this_present_is_pmCrmUser = true;
596
    boolean that_present_is_pmCrmUser = true;
597
    if (this_present_is_pmCrmUser || that_present_is_pmCrmUser) {
598
      if (!(this_present_is_pmCrmUser && that_present_is_pmCrmUser))
599
        return false;
600
      if (this.is_pmCrmUser != that.is_pmCrmUser)
601
        return false;
602
    }
603
 
604
    boolean this_present_is_allAssignable = true;
605
    boolean that_present_is_allAssignable = true;
606
    if (this_present_is_allAssignable || that_present_is_allAssignable) {
607
      if (!(this_present_is_allAssignable && that_present_is_allAssignable))
608
        return false;
609
      if (this.is_allAssignable != that.is_allAssignable)
610
        return false;
611
    }
612
 
3028 mandeep.dh 613
    return true;
614
  }
615
 
616
  @Override
617
  public int hashCode() {
618
    return 0;
619
  }
620
 
621
  public int compareTo(Agent other) {
622
    if (!getClass().equals(other.getClass())) {
623
      return getClass().getName().compareTo(other.getClass().getName());
624
    }
625
 
626
    int lastComparison = 0;
627
    Agent typedOther = (Agent)other;
628
 
3430 rajveer 629
    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
3028 mandeep.dh 630
    if (lastComparison != 0) {
631
      return lastComparison;
632
    }
3430 rajveer 633
    if (isSetId()) {
634
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
635
      if (lastComparison != 0) {
636
        return lastComparison;
637
      }
3028 mandeep.dh 638
    }
3430 rajveer 639
    lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
3028 mandeep.dh 640
    if (lastComparison != 0) {
641
      return lastComparison;
642
    }
3430 rajveer 643
    if (isSetName()) {
644
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
645
      if (lastComparison != 0) {
646
        return lastComparison;
647
      }
3028 mandeep.dh 648
    }
3430 rajveer 649
    lastComparison = Boolean.valueOf(isSetEmailId()).compareTo(typedOther.isSetEmailId());
3028 mandeep.dh 650
    if (lastComparison != 0) {
651
      return lastComparison;
652
    }
3430 rajveer 653
    if (isSetEmailId()) {
654
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.emailId, typedOther.emailId);
655
      if (lastComparison != 0) {
656
        return lastComparison;
657
      }
3028 mandeep.dh 658
    }
3430 rajveer 659
    lastComparison = Boolean.valueOf(isSetManagerId()).compareTo(typedOther.isSetManagerId());
3028 mandeep.dh 660
    if (lastComparison != 0) {
661
      return lastComparison;
662
    }
3430 rajveer 663
    if (isSetManagerId()) {
664
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.managerId, typedOther.managerId);
665
      if (lastComparison != 0) {
666
        return lastComparison;
667
      }
3028 mandeep.dh 668
    }
3430 rajveer 669
    lastComparison = Boolean.valueOf(isSetPassword()).compareTo(typedOther.isSetPassword());
3028 mandeep.dh 670
    if (lastComparison != 0) {
671
      return lastComparison;
672
    }
3430 rajveer 673
    if (isSetPassword()) {
674
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, typedOther.password);
675
      if (lastComparison != 0) {
676
        return lastComparison;
677
      }
3028 mandeep.dh 678
    }
4793 amar.kumar 679
    lastComparison = Boolean.valueOf(isSetIs_active()).compareTo(typedOther.isSetIs_active());
680
    if (lastComparison != 0) {
681
      return lastComparison;
682
    }
683
    if (isSetIs_active()) {
684
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_active, typedOther.is_active);
685
      if (lastComparison != 0) {
686
        return lastComparison;
687
      }
688
    }
16244 manish.sha 689
    lastComparison = Boolean.valueOf(isSetIs_pmCrmUser()).compareTo(typedOther.isSetIs_pmCrmUser());
690
    if (lastComparison != 0) {
691
      return lastComparison;
692
    }
693
    if (isSetIs_pmCrmUser()) {
694
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_pmCrmUser, typedOther.is_pmCrmUser);
695
      if (lastComparison != 0) {
696
        return lastComparison;
697
      }
698
    }
699
    lastComparison = Boolean.valueOf(isSetIs_allAssignable()).compareTo(typedOther.isSetIs_allAssignable());
700
    if (lastComparison != 0) {
701
      return lastComparison;
702
    }
703
    if (isSetIs_allAssignable()) {
704
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_allAssignable, typedOther.is_allAssignable);
705
      if (lastComparison != 0) {
706
        return lastComparison;
707
      }
708
    }
3028 mandeep.dh 709
    return 0;
710
  }
711
 
3430 rajveer 712
  public _Fields fieldForId(int fieldId) {
713
    return _Fields.findByThriftId(fieldId);
714
  }
715
 
716
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
717
    org.apache.thrift.protocol.TField field;
3028 mandeep.dh 718
    iprot.readStructBegin();
719
    while (true)
720
    {
721
      field = iprot.readFieldBegin();
3430 rajveer 722
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3028 mandeep.dh 723
        break;
724
      }
3430 rajveer 725
      switch (field.id) {
726
        case 1: // ID
727
          if (field.type == org.apache.thrift.protocol.TType.I64) {
728
            this.id = iprot.readI64();
729
            setIdIsSet(true);
730
          } else { 
731
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
732
          }
733
          break;
734
        case 2: // NAME
735
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
736
            this.name = iprot.readString();
737
          } else { 
738
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
739
          }
740
          break;
741
        case 3: // EMAIL_ID
742
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
743
            this.emailId = iprot.readString();
744
          } else { 
745
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
746
          }
747
          break;
748
        case 4: // MANAGER_ID
749
          if (field.type == org.apache.thrift.protocol.TType.I64) {
750
            this.managerId = iprot.readI64();
751
            setManagerIdIsSet(true);
752
          } else { 
753
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
754
          }
755
          break;
756
        case 5: // PASSWORD
757
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
758
            this.password = iprot.readString();
759
          } else { 
760
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
761
          }
762
          break;
4793 amar.kumar 763
        case 6: // IS_ACTIVE
764
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
765
            this.is_active = iprot.readBool();
766
            setIs_activeIsSet(true);
767
          } else { 
768
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
769
          }
770
          break;
16244 manish.sha 771
        case 7: // IS_PM_CRM_USER
772
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
773
            this.is_pmCrmUser = iprot.readBool();
774
            setIs_pmCrmUserIsSet(true);
775
          } else { 
776
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
777
          }
778
          break;
779
        case 8: // IS_ALL_ASSIGNABLE
780
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
781
            this.is_allAssignable = iprot.readBool();
782
            setIs_allAssignableIsSet(true);
783
          } else { 
784
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
785
          }
786
          break;
3430 rajveer 787
        default:
788
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3028 mandeep.dh 789
      }
3430 rajveer 790
      iprot.readFieldEnd();
3028 mandeep.dh 791
    }
792
    iprot.readStructEnd();
793
    validate();
794
  }
795
 
3430 rajveer 796
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3028 mandeep.dh 797
    validate();
798
 
799
    oprot.writeStructBegin(STRUCT_DESC);
800
    oprot.writeFieldBegin(ID_FIELD_DESC);
801
    oprot.writeI64(this.id);
802
    oprot.writeFieldEnd();
803
    if (this.name != null) {
804
      oprot.writeFieldBegin(NAME_FIELD_DESC);
805
      oprot.writeString(this.name);
806
      oprot.writeFieldEnd();
807
    }
808
    if (this.emailId != null) {
809
      oprot.writeFieldBegin(EMAIL_ID_FIELD_DESC);
810
      oprot.writeString(this.emailId);
811
      oprot.writeFieldEnd();
812
    }
3168 mandeep.dh 813
    if (isSetManagerId()) {
814
      oprot.writeFieldBegin(MANAGER_ID_FIELD_DESC);
815
      oprot.writeI64(this.managerId);
816
      oprot.writeFieldEnd();
817
    }
3028 mandeep.dh 818
    if (this.password != null) {
819
      oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
820
      oprot.writeString(this.password);
821
      oprot.writeFieldEnd();
822
    }
4793 amar.kumar 823
    oprot.writeFieldBegin(IS_ACTIVE_FIELD_DESC);
824
    oprot.writeBool(this.is_active);
825
    oprot.writeFieldEnd();
16244 manish.sha 826
    oprot.writeFieldBegin(IS_PM_CRM_USER_FIELD_DESC);
827
    oprot.writeBool(this.is_pmCrmUser);
828
    oprot.writeFieldEnd();
829
    oprot.writeFieldBegin(IS_ALL_ASSIGNABLE_FIELD_DESC);
830
    oprot.writeBool(this.is_allAssignable);
831
    oprot.writeFieldEnd();
3028 mandeep.dh 832
    oprot.writeFieldStop();
833
    oprot.writeStructEnd();
834
  }
835
 
836
  @Override
837
  public String toString() {
838
    StringBuilder sb = new StringBuilder("Agent(");
839
    boolean first = true;
840
 
841
    sb.append("id:");
842
    sb.append(this.id);
843
    first = false;
844
    if (!first) sb.append(", ");
845
    sb.append("name:");
846
    if (this.name == null) {
847
      sb.append("null");
848
    } else {
849
      sb.append(this.name);
850
    }
851
    first = false;
852
    if (!first) sb.append(", ");
853
    sb.append("emailId:");
854
    if (this.emailId == null) {
855
      sb.append("null");
856
    } else {
857
      sb.append(this.emailId);
858
    }
859
    first = false;
3168 mandeep.dh 860
    if (isSetManagerId()) {
861
      if (!first) sb.append(", ");
862
      sb.append("managerId:");
863
      sb.append(this.managerId);
864
      first = false;
865
    }
3028 mandeep.dh 866
    if (!first) sb.append(", ");
867
    sb.append("password:");
868
    if (this.password == null) {
869
      sb.append("null");
870
    } else {
871
      sb.append(this.password);
872
    }
873
    first = false;
4793 amar.kumar 874
    if (!first) sb.append(", ");
875
    sb.append("is_active:");
876
    sb.append(this.is_active);
877
    first = false;
16244 manish.sha 878
    if (!first) sb.append(", ");
879
    sb.append("is_pmCrmUser:");
880
    sb.append(this.is_pmCrmUser);
881
    first = false;
882
    if (!first) sb.append(", ");
883
    sb.append("is_allAssignable:");
884
    sb.append(this.is_allAssignable);
885
    first = false;
3028 mandeep.dh 886
    sb.append(")");
887
    return sb.toString();
888
  }
889
 
3430 rajveer 890
  public void validate() throws org.apache.thrift.TException {
3028 mandeep.dh 891
    // check for required fields
892
  }
893
 
3430 rajveer 894
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
895
    try {
896
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
897
    } catch (org.apache.thrift.TException te) {
898
      throw new java.io.IOException(te);
899
    }
900
  }
901
 
902
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
903
    try {
904
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
905
      __isset_bit_vector = new BitSet(1);
906
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
907
    } catch (org.apache.thrift.TException te) {
908
      throw new java.io.IOException(te);
909
    }
910
  }
911
 
3028 mandeep.dh 912
}
913