Subversion Repositories SmartDukaan

Rev

Rev 2816 | Rev 3499 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
553 chandransh 1
/**
3430 rajveer 2
 * Autogenerated by Thrift Compiler (0.7.0)
553 chandransh 3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.user;
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;
553 chandransh 19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
23
/**
24
 * The user structure holding the basic information that identifies the user.
25
 * *
26
 */
3430 rajveer 27
public class User implements org.apache.thrift.TBase<User, User._Fields>, java.io.Serializable, Cloneable {
28
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("User");
553 chandransh 29
 
3430 rajveer 30
  private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);
31
  private static final org.apache.thrift.protocol.TField EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("email", org.apache.thrift.protocol.TType.STRING, (short)2);
32
  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)3);
33
  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)4);
34
  private static final org.apache.thrift.protocol.TField DATE_OF_BIRTH_FIELD_DESC = new org.apache.thrift.protocol.TField("dateOfBirth", org.apache.thrift.protocol.TType.STRING, (short)5);
35
  private static final org.apache.thrift.protocol.TField SEX_FIELD_DESC = new org.apache.thrift.protocol.TField("sex", org.apache.thrift.protocol.TType.I32, (short)6);
36
  private static final org.apache.thrift.protocol.TField MOBILE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("mobileNumber", org.apache.thrift.protocol.TType.STRING, (short)7);
37
  private static final org.apache.thrift.protocol.TField SOCIAL_HANDLES_FIELD_DESC = new org.apache.thrift.protocol.TField("socialHandles", org.apache.thrift.protocol.TType.STRUCT, (short)8);
38
  private static final org.apache.thrift.protocol.TField ADDRESSES_FIELD_DESC = new org.apache.thrift.protocol.TField("addresses", org.apache.thrift.protocol.TType.LIST, (short)9);
39
  private static final org.apache.thrift.protocol.TField DEFAULT_ADDRESS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultAddressId", org.apache.thrift.protocol.TType.I64, (short)10);
40
  private static final org.apache.thrift.protocol.TField COMMUNICATION_EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("communicationEmail", org.apache.thrift.protocol.TType.STRING, (short)11);
41
  private static final org.apache.thrift.protocol.TField ACTIVE_CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("activeCartId", org.apache.thrift.protocol.TType.I64, (short)12);
42
  private static final org.apache.thrift.protocol.TField JSESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jsessionId", org.apache.thrift.protocol.TType.STRING, (short)13);
43
  private static final org.apache.thrift.protocol.TField IS_ANONYMOUS_FIELD_DESC = new org.apache.thrift.protocol.TField("isAnonymous", org.apache.thrift.protocol.TType.BOOL, (short)14);
44
  private static final org.apache.thrift.protocol.TField SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("source", org.apache.thrift.protocol.TType.STRING, (short)15);
45
  private static final org.apache.thrift.protocol.TField SOURCE_START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("sourceStartTime", org.apache.thrift.protocol.TType.I64, (short)16);
553 chandransh 46
 
3430 rajveer 47
  private long userId; // required
48
  private String email; // required
49
  private String password; // required
50
  private String name; // required
51
  private String dateOfBirth; // required
52
  private Sex sex; // required
53
  private String mobileNumber; // required
54
  private SocialHandles socialHandles; // required
55
  private List<Address> addresses; // required
56
  private long defaultAddressId; // required
57
  private String communicationEmail; // required
58
  private long activeCartId; // required
59
  private String jsessionId; // required
60
  private boolean isAnonymous; // required
61
  private String source; // required
62
  private long sourceStartTime; // required
553 chandransh 63
 
64
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 65
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
553 chandransh 66
    USER_ID((short)1, "userId"),
67
    EMAIL((short)2, "email"),
68
    PASSWORD((short)3, "password"),
69
    NAME((short)4, "name"),
70
    DATE_OF_BIRTH((short)5, "dateOfBirth"),
71
    /**
72
     * 
73
     * @see Sex
74
     */
75
    SEX((short)6, "sex"),
571 rajveer 76
    MOBILE_NUMBER((short)7, "mobileNumber"),
553 chandransh 77
    SOCIAL_HANDLES((short)8, "socialHandles"),
78
    ADDRESSES((short)9, "addresses"),
79
    DEFAULT_ADDRESS_ID((short)10, "defaultAddressId"),
80
    COMMUNICATION_EMAIL((short)11, "communicationEmail"),
81
    ACTIVE_CART_ID((short)12, "activeCartId"),
82
    JSESSION_ID((short)13, "jsessionId"),
2020 vikas 83
    IS_ANONYMOUS((short)14, "isAnonymous"),
2816 vikas 84
    SOURCE((short)15, "source"),
85
    SOURCE_START_TIME((short)16, "sourceStartTime");
553 chandransh 86
 
87
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
88
 
89
    static {
90
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
91
        byName.put(field.getFieldName(), field);
92
      }
93
    }
94
 
95
    /**
96
     * Find the _Fields constant that matches fieldId, or null if its not found.
97
     */
98
    public static _Fields findByThriftId(int fieldId) {
3430 rajveer 99
      switch(fieldId) {
100
        case 1: // USER_ID
101
          return USER_ID;
102
        case 2: // EMAIL
103
          return EMAIL;
104
        case 3: // PASSWORD
105
          return PASSWORD;
106
        case 4: // NAME
107
          return NAME;
108
        case 5: // DATE_OF_BIRTH
109
          return DATE_OF_BIRTH;
110
        case 6: // SEX
111
          return SEX;
112
        case 7: // MOBILE_NUMBER
113
          return MOBILE_NUMBER;
114
        case 8: // SOCIAL_HANDLES
115
          return SOCIAL_HANDLES;
116
        case 9: // ADDRESSES
117
          return ADDRESSES;
118
        case 10: // DEFAULT_ADDRESS_ID
119
          return DEFAULT_ADDRESS_ID;
120
        case 11: // COMMUNICATION_EMAIL
121
          return COMMUNICATION_EMAIL;
122
        case 12: // ACTIVE_CART_ID
123
          return ACTIVE_CART_ID;
124
        case 13: // JSESSION_ID
125
          return JSESSION_ID;
126
        case 14: // IS_ANONYMOUS
127
          return IS_ANONYMOUS;
128
        case 15: // SOURCE
129
          return SOURCE;
130
        case 16: // SOURCE_START_TIME
131
          return SOURCE_START_TIME;
132
        default:
133
          return null;
134
      }
553 chandransh 135
    }
136
 
137
    /**
138
     * Find the _Fields constant that matches fieldId, throwing an exception
139
     * if it is not found.
140
     */
141
    public static _Fields findByThriftIdOrThrow(int fieldId) {
142
      _Fields fields = findByThriftId(fieldId);
143
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
144
      return fields;
145
    }
146
 
147
    /**
148
     * Find the _Fields constant that matches name, or null if its not found.
149
     */
150
    public static _Fields findByName(String name) {
151
      return byName.get(name);
152
    }
153
 
154
    private final short _thriftId;
155
    private final String _fieldName;
156
 
157
    _Fields(short thriftId, String fieldName) {
158
      _thriftId = thriftId;
159
      _fieldName = fieldName;
160
    }
161
 
162
    public short getThriftFieldId() {
163
      return _thriftId;
164
    }
165
 
166
    public String getFieldName() {
167
      return _fieldName;
168
    }
169
  }
170
 
171
  // isset id assignments
172
  private static final int __USERID_ISSET_ID = 0;
571 rajveer 173
  private static final int __DEFAULTADDRESSID_ISSET_ID = 1;
174
  private static final int __ACTIVECARTID_ISSET_ID = 2;
175
  private static final int __ISANONYMOUS_ISSET_ID = 3;
2816 vikas 176
  private static final int __SOURCESTARTTIME_ISSET_ID = 4;
177
  private BitSet __isset_bit_vector = new BitSet(5);
553 chandransh 178
 
3430 rajveer 179
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
553 chandransh 180
  static {
3430 rajveer 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.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
183
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
184
    tmpMap.put(_Fields.EMAIL, new org.apache.thrift.meta_data.FieldMetaData("email", org.apache.thrift.TFieldRequirementType.DEFAULT, 
185
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
186
    tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT, 
187
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
188
    tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
189
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
190
    tmpMap.put(_Fields.DATE_OF_BIRTH, new org.apache.thrift.meta_data.FieldMetaData("dateOfBirth", org.apache.thrift.TFieldRequirementType.DEFAULT, 
191
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
192
    tmpMap.put(_Fields.SEX, new org.apache.thrift.meta_data.FieldMetaData("sex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
193
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, Sex.class)));
194
    tmpMap.put(_Fields.MOBILE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("mobileNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
195
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
196
    tmpMap.put(_Fields.SOCIAL_HANDLES, new org.apache.thrift.meta_data.FieldMetaData("socialHandles", org.apache.thrift.TFieldRequirementType.DEFAULT, 
197
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SocialHandles.class)));
198
    tmpMap.put(_Fields.ADDRESSES, new org.apache.thrift.meta_data.FieldMetaData("addresses", org.apache.thrift.TFieldRequirementType.DEFAULT, 
199
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
200
            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Address.class))));
201
    tmpMap.put(_Fields.DEFAULT_ADDRESS_ID, new org.apache.thrift.meta_data.FieldMetaData("defaultAddressId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
202
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
203
    tmpMap.put(_Fields.COMMUNICATION_EMAIL, new org.apache.thrift.meta_data.FieldMetaData("communicationEmail", org.apache.thrift.TFieldRequirementType.DEFAULT, 
204
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
205
    tmpMap.put(_Fields.ACTIVE_CART_ID, new org.apache.thrift.meta_data.FieldMetaData("activeCartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
206
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
207
    tmpMap.put(_Fields.JSESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("jsessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
208
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
209
    tmpMap.put(_Fields.IS_ANONYMOUS, new org.apache.thrift.meta_data.FieldMetaData("isAnonymous", org.apache.thrift.TFieldRequirementType.DEFAULT, 
210
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
211
    tmpMap.put(_Fields.SOURCE, new org.apache.thrift.meta_data.FieldMetaData("source", org.apache.thrift.TFieldRequirementType.DEFAULT, 
212
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
213
    tmpMap.put(_Fields.SOURCE_START_TIME, new org.apache.thrift.meta_data.FieldMetaData("sourceStartTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
214
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
215
    metaDataMap = Collections.unmodifiableMap(tmpMap);
216
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(User.class, metaDataMap);
553 chandransh 217
  }
218
 
219
  public User() {
220
  }
221
 
222
  public User(
223
    long userId,
224
    String email,
225
    String password,
226
    String name,
571 rajveer 227
    String dateOfBirth,
553 chandransh 228
    Sex sex,
571 rajveer 229
    String mobileNumber,
553 chandransh 230
    SocialHandles socialHandles,
231
    List<Address> addresses,
232
    long defaultAddressId,
233
    String communicationEmail,
234
    long activeCartId,
235
    String jsessionId,
2020 vikas 236
    boolean isAnonymous,
2816 vikas 237
    String source,
238
    long sourceStartTime)
553 chandransh 239
  {
240
    this();
241
    this.userId = userId;
242
    setUserIdIsSet(true);
243
    this.email = email;
244
    this.password = password;
245
    this.name = name;
246
    this.dateOfBirth = dateOfBirth;
247
    this.sex = sex;
571 rajveer 248
    this.mobileNumber = mobileNumber;
553 chandransh 249
    this.socialHandles = socialHandles;
250
    this.addresses = addresses;
251
    this.defaultAddressId = defaultAddressId;
252
    setDefaultAddressIdIsSet(true);
253
    this.communicationEmail = communicationEmail;
254
    this.activeCartId = activeCartId;
255
    setActiveCartIdIsSet(true);
256
    this.jsessionId = jsessionId;
257
    this.isAnonymous = isAnonymous;
258
    setIsAnonymousIsSet(true);
2020 vikas 259
    this.source = source;
2816 vikas 260
    this.sourceStartTime = sourceStartTime;
261
    setSourceStartTimeIsSet(true);
553 chandransh 262
  }
263
 
264
  /**
265
   * Performs a deep copy on <i>other</i>.
266
   */
267
  public User(User other) {
268
    __isset_bit_vector.clear();
269
    __isset_bit_vector.or(other.__isset_bit_vector);
270
    this.userId = other.userId;
271
    if (other.isSetEmail()) {
272
      this.email = other.email;
273
    }
274
    if (other.isSetPassword()) {
275
      this.password = other.password;
276
    }
277
    if (other.isSetName()) {
278
      this.name = other.name;
279
    }
571 rajveer 280
    if (other.isSetDateOfBirth()) {
281
      this.dateOfBirth = other.dateOfBirth;
282
    }
553 chandransh 283
    if (other.isSetSex()) {
284
      this.sex = other.sex;
285
    }
571 rajveer 286
    if (other.isSetMobileNumber()) {
287
      this.mobileNumber = other.mobileNumber;
553 chandransh 288
    }
289
    if (other.isSetSocialHandles()) {
290
      this.socialHandles = new SocialHandles(other.socialHandles);
291
    }
292
    if (other.isSetAddresses()) {
293
      List<Address> __this__addresses = new ArrayList<Address>();
294
      for (Address other_element : other.addresses) {
295
        __this__addresses.add(new Address(other_element));
296
      }
297
      this.addresses = __this__addresses;
298
    }
299
    this.defaultAddressId = other.defaultAddressId;
300
    if (other.isSetCommunicationEmail()) {
301
      this.communicationEmail = other.communicationEmail;
302
    }
303
    this.activeCartId = other.activeCartId;
304
    if (other.isSetJsessionId()) {
305
      this.jsessionId = other.jsessionId;
306
    }
307
    this.isAnonymous = other.isAnonymous;
2020 vikas 308
    if (other.isSetSource()) {
309
      this.source = other.source;
310
    }
2816 vikas 311
    this.sourceStartTime = other.sourceStartTime;
553 chandransh 312
  }
313
 
314
  public User deepCopy() {
315
    return new User(this);
316
  }
317
 
3430 rajveer 318
  @Override
319
  public void clear() {
320
    setUserIdIsSet(false);
321
    this.userId = 0;
322
    this.email = null;
323
    this.password = null;
324
    this.name = null;
325
    this.dateOfBirth = null;
326
    this.sex = null;
327
    this.mobileNumber = null;
328
    this.socialHandles = null;
329
    this.addresses = null;
330
    setDefaultAddressIdIsSet(false);
331
    this.defaultAddressId = 0;
332
    this.communicationEmail = null;
333
    setActiveCartIdIsSet(false);
334
    this.activeCartId = 0;
335
    this.jsessionId = null;
336
    setIsAnonymousIsSet(false);
337
    this.isAnonymous = false;
338
    this.source = null;
339
    setSourceStartTimeIsSet(false);
340
    this.sourceStartTime = 0;
553 chandransh 341
  }
342
 
343
  public long getUserId() {
344
    return this.userId;
345
  }
346
 
3430 rajveer 347
  public void setUserId(long userId) {
553 chandransh 348
    this.userId = userId;
349
    setUserIdIsSet(true);
350
  }
351
 
352
  public void unsetUserId() {
353
    __isset_bit_vector.clear(__USERID_ISSET_ID);
354
  }
355
 
3430 rajveer 356
  /** Returns true if field userId is set (has been assigned a value) and false otherwise */
553 chandransh 357
  public boolean isSetUserId() {
358
    return __isset_bit_vector.get(__USERID_ISSET_ID);
359
  }
360
 
361
  public void setUserIdIsSet(boolean value) {
362
    __isset_bit_vector.set(__USERID_ISSET_ID, value);
363
  }
364
 
365
  public String getEmail() {
366
    return this.email;
367
  }
368
 
3430 rajveer 369
  public void setEmail(String email) {
553 chandransh 370
    this.email = email;
371
  }
372
 
373
  public void unsetEmail() {
374
    this.email = null;
375
  }
376
 
3430 rajveer 377
  /** Returns true if field email is set (has been assigned a value) and false otherwise */
553 chandransh 378
  public boolean isSetEmail() {
379
    return this.email != null;
380
  }
381
 
382
  public void setEmailIsSet(boolean value) {
383
    if (!value) {
384
      this.email = null;
385
    }
386
  }
387
 
388
  public String getPassword() {
389
    return this.password;
390
  }
391
 
3430 rajveer 392
  public void setPassword(String password) {
553 chandransh 393
    this.password = password;
394
  }
395
 
396
  public void unsetPassword() {
397
    this.password = null;
398
  }
399
 
3430 rajveer 400
  /** Returns true if field password is set (has been assigned a value) and false otherwise */
553 chandransh 401
  public boolean isSetPassword() {
402
    return this.password != null;
403
  }
404
 
405
  public void setPasswordIsSet(boolean value) {
406
    if (!value) {
407
      this.password = null;
408
    }
409
  }
410
 
411
  public String getName() {
412
    return this.name;
413
  }
414
 
3430 rajveer 415
  public void setName(String name) {
553 chandransh 416
    this.name = name;
417
  }
418
 
419
  public void unsetName() {
420
    this.name = null;
421
  }
422
 
3430 rajveer 423
  /** Returns true if field name is set (has been assigned a value) and false otherwise */
553 chandransh 424
  public boolean isSetName() {
425
    return this.name != null;
426
  }
427
 
428
  public void setNameIsSet(boolean value) {
429
    if (!value) {
430
      this.name = null;
431
    }
432
  }
433
 
571 rajveer 434
  public String getDateOfBirth() {
553 chandransh 435
    return this.dateOfBirth;
436
  }
437
 
3430 rajveer 438
  public void setDateOfBirth(String dateOfBirth) {
553 chandransh 439
    this.dateOfBirth = dateOfBirth;
440
  }
441
 
442
  public void unsetDateOfBirth() {
571 rajveer 443
    this.dateOfBirth = null;
553 chandransh 444
  }
445
 
3430 rajveer 446
  /** Returns true if field dateOfBirth is set (has been assigned a value) and false otherwise */
553 chandransh 447
  public boolean isSetDateOfBirth() {
571 rajveer 448
    return this.dateOfBirth != null;
553 chandransh 449
  }
450
 
451
  public void setDateOfBirthIsSet(boolean value) {
571 rajveer 452
    if (!value) {
453
      this.dateOfBirth = null;
454
    }
553 chandransh 455
  }
456
 
457
  /**
458
   * 
459
   * @see Sex
460
   */
461
  public Sex getSex() {
462
    return this.sex;
463
  }
464
 
465
  /**
466
   * 
467
   * @see Sex
468
   */
3430 rajveer 469
  public void setSex(Sex sex) {
553 chandransh 470
    this.sex = sex;
471
  }
472
 
473
  public void unsetSex() {
474
    this.sex = null;
475
  }
476
 
3430 rajveer 477
  /** Returns true if field sex is set (has been assigned a value) and false otherwise */
553 chandransh 478
  public boolean isSetSex() {
479
    return this.sex != null;
480
  }
481
 
482
  public void setSexIsSet(boolean value) {
483
    if (!value) {
484
      this.sex = null;
485
    }
486
  }
487
 
571 rajveer 488
  public String getMobileNumber() {
489
    return this.mobileNumber;
553 chandransh 490
  }
491
 
3430 rajveer 492
  public void setMobileNumber(String mobileNumber) {
571 rajveer 493
    this.mobileNumber = mobileNumber;
553 chandransh 494
  }
495
 
571 rajveer 496
  public void unsetMobileNumber() {
497
    this.mobileNumber = null;
553 chandransh 498
  }
499
 
3430 rajveer 500
  /** Returns true if field mobileNumber is set (has been assigned a value) and false otherwise */
571 rajveer 501
  public boolean isSetMobileNumber() {
502
    return this.mobileNumber != null;
553 chandransh 503
  }
504
 
571 rajveer 505
  public void setMobileNumberIsSet(boolean value) {
553 chandransh 506
    if (!value) {
571 rajveer 507
      this.mobileNumber = null;
553 chandransh 508
    }
509
  }
510
 
511
  public SocialHandles getSocialHandles() {
512
    return this.socialHandles;
513
  }
514
 
3430 rajveer 515
  public void setSocialHandles(SocialHandles socialHandles) {
553 chandransh 516
    this.socialHandles = socialHandles;
517
  }
518
 
519
  public void unsetSocialHandles() {
520
    this.socialHandles = null;
521
  }
522
 
3430 rajveer 523
  /** Returns true if field socialHandles is set (has been assigned a value) and false otherwise */
553 chandransh 524
  public boolean isSetSocialHandles() {
525
    return this.socialHandles != null;
526
  }
527
 
528
  public void setSocialHandlesIsSet(boolean value) {
529
    if (!value) {
530
      this.socialHandles = null;
531
    }
532
  }
533
 
534
  public int getAddressesSize() {
535
    return (this.addresses == null) ? 0 : this.addresses.size();
536
  }
537
 
538
  public java.util.Iterator<Address> getAddressesIterator() {
539
    return (this.addresses == null) ? null : this.addresses.iterator();
540
  }
541
 
542
  public void addToAddresses(Address elem) {
543
    if (this.addresses == null) {
544
      this.addresses = new ArrayList<Address>();
545
    }
546
    this.addresses.add(elem);
547
  }
548
 
549
  public List<Address> getAddresses() {
550
    return this.addresses;
551
  }
552
 
3430 rajveer 553
  public void setAddresses(List<Address> addresses) {
553 chandransh 554
    this.addresses = addresses;
555
  }
556
 
557
  public void unsetAddresses() {
558
    this.addresses = null;
559
  }
560
 
3430 rajveer 561
  /** Returns true if field addresses is set (has been assigned a value) and false otherwise */
553 chandransh 562
  public boolean isSetAddresses() {
563
    return this.addresses != null;
564
  }
565
 
566
  public void setAddressesIsSet(boolean value) {
567
    if (!value) {
568
      this.addresses = null;
569
    }
570
  }
571
 
572
  public long getDefaultAddressId() {
573
    return this.defaultAddressId;
574
  }
575
 
3430 rajveer 576
  public void setDefaultAddressId(long defaultAddressId) {
553 chandransh 577
    this.defaultAddressId = defaultAddressId;
578
    setDefaultAddressIdIsSet(true);
579
  }
580
 
581
  public void unsetDefaultAddressId() {
582
    __isset_bit_vector.clear(__DEFAULTADDRESSID_ISSET_ID);
583
  }
584
 
3430 rajveer 585
  /** Returns true if field defaultAddressId is set (has been assigned a value) and false otherwise */
553 chandransh 586
  public boolean isSetDefaultAddressId() {
587
    return __isset_bit_vector.get(__DEFAULTADDRESSID_ISSET_ID);
588
  }
589
 
590
  public void setDefaultAddressIdIsSet(boolean value) {
591
    __isset_bit_vector.set(__DEFAULTADDRESSID_ISSET_ID, value);
592
  }
593
 
594
  public String getCommunicationEmail() {
595
    return this.communicationEmail;
596
  }
597
 
3430 rajveer 598
  public void setCommunicationEmail(String communicationEmail) {
553 chandransh 599
    this.communicationEmail = communicationEmail;
600
  }
601
 
602
  public void unsetCommunicationEmail() {
603
    this.communicationEmail = null;
604
  }
605
 
3430 rajveer 606
  /** Returns true if field communicationEmail is set (has been assigned a value) and false otherwise */
553 chandransh 607
  public boolean isSetCommunicationEmail() {
608
    return this.communicationEmail != null;
609
  }
610
 
611
  public void setCommunicationEmailIsSet(boolean value) {
612
    if (!value) {
613
      this.communicationEmail = null;
614
    }
615
  }
616
 
617
  public long getActiveCartId() {
618
    return this.activeCartId;
619
  }
620
 
3430 rajveer 621
  public void setActiveCartId(long activeCartId) {
553 chandransh 622
    this.activeCartId = activeCartId;
623
    setActiveCartIdIsSet(true);
624
  }
625
 
626
  public void unsetActiveCartId() {
627
    __isset_bit_vector.clear(__ACTIVECARTID_ISSET_ID);
628
  }
629
 
3430 rajveer 630
  /** Returns true if field activeCartId is set (has been assigned a value) and false otherwise */
553 chandransh 631
  public boolean isSetActiveCartId() {
632
    return __isset_bit_vector.get(__ACTIVECARTID_ISSET_ID);
633
  }
634
 
635
  public void setActiveCartIdIsSet(boolean value) {
636
    __isset_bit_vector.set(__ACTIVECARTID_ISSET_ID, value);
637
  }
638
 
639
  public String getJsessionId() {
640
    return this.jsessionId;
641
  }
642
 
3430 rajveer 643
  public void setJsessionId(String jsessionId) {
553 chandransh 644
    this.jsessionId = jsessionId;
645
  }
646
 
647
  public void unsetJsessionId() {
648
    this.jsessionId = null;
649
  }
650
 
3430 rajveer 651
  /** Returns true if field jsessionId is set (has been assigned a value) and false otherwise */
553 chandransh 652
  public boolean isSetJsessionId() {
653
    return this.jsessionId != null;
654
  }
655
 
656
  public void setJsessionIdIsSet(boolean value) {
657
    if (!value) {
658
      this.jsessionId = null;
659
    }
660
  }
661
 
662
  public boolean isIsAnonymous() {
663
    return this.isAnonymous;
664
  }
665
 
3430 rajveer 666
  public void setIsAnonymous(boolean isAnonymous) {
553 chandransh 667
    this.isAnonymous = isAnonymous;
668
    setIsAnonymousIsSet(true);
669
  }
670
 
671
  public void unsetIsAnonymous() {
672
    __isset_bit_vector.clear(__ISANONYMOUS_ISSET_ID);
673
  }
674
 
3430 rajveer 675
  /** Returns true if field isAnonymous is set (has been assigned a value) and false otherwise */
553 chandransh 676
  public boolean isSetIsAnonymous() {
677
    return __isset_bit_vector.get(__ISANONYMOUS_ISSET_ID);
678
  }
679
 
680
  public void setIsAnonymousIsSet(boolean value) {
681
    __isset_bit_vector.set(__ISANONYMOUS_ISSET_ID, value);
682
  }
683
 
2020 vikas 684
  public String getSource() {
685
    return this.source;
686
  }
687
 
3430 rajveer 688
  public void setSource(String source) {
2020 vikas 689
    this.source = source;
690
  }
691
 
692
  public void unsetSource() {
693
    this.source = null;
694
  }
695
 
3430 rajveer 696
  /** Returns true if field source is set (has been assigned a value) and false otherwise */
2020 vikas 697
  public boolean isSetSource() {
698
    return this.source != null;
699
  }
700
 
701
  public void setSourceIsSet(boolean value) {
702
    if (!value) {
703
      this.source = null;
704
    }
705
  }
706
 
2816 vikas 707
  public long getSourceStartTime() {
708
    return this.sourceStartTime;
709
  }
710
 
3430 rajveer 711
  public void setSourceStartTime(long sourceStartTime) {
2816 vikas 712
    this.sourceStartTime = sourceStartTime;
713
    setSourceStartTimeIsSet(true);
714
  }
715
 
716
  public void unsetSourceStartTime() {
717
    __isset_bit_vector.clear(__SOURCESTARTTIME_ISSET_ID);
718
  }
719
 
3430 rajveer 720
  /** Returns true if field sourceStartTime is set (has been assigned a value) and false otherwise */
2816 vikas 721
  public boolean isSetSourceStartTime() {
722
    return __isset_bit_vector.get(__SOURCESTARTTIME_ISSET_ID);
723
  }
724
 
725
  public void setSourceStartTimeIsSet(boolean value) {
726
    __isset_bit_vector.set(__SOURCESTARTTIME_ISSET_ID, value);
727
  }
728
 
553 chandransh 729
  public void setFieldValue(_Fields field, Object value) {
730
    switch (field) {
731
    case USER_ID:
732
      if (value == null) {
733
        unsetUserId();
734
      } else {
735
        setUserId((Long)value);
736
      }
737
      break;
738
 
739
    case EMAIL:
740
      if (value == null) {
741
        unsetEmail();
742
      } else {
743
        setEmail((String)value);
744
      }
745
      break;
746
 
747
    case PASSWORD:
748
      if (value == null) {
749
        unsetPassword();
750
      } else {
751
        setPassword((String)value);
752
      }
753
      break;
754
 
755
    case NAME:
756
      if (value == null) {
757
        unsetName();
758
      } else {
759
        setName((String)value);
760
      }
761
      break;
762
 
763
    case DATE_OF_BIRTH:
764
      if (value == null) {
765
        unsetDateOfBirth();
766
      } else {
571 rajveer 767
        setDateOfBirth((String)value);
553 chandransh 768
      }
769
      break;
770
 
771
    case SEX:
772
      if (value == null) {
773
        unsetSex();
774
      } else {
775
        setSex((Sex)value);
776
      }
777
      break;
778
 
571 rajveer 779
    case MOBILE_NUMBER:
553 chandransh 780
      if (value == null) {
571 rajveer 781
        unsetMobileNumber();
553 chandransh 782
      } else {
571 rajveer 783
        setMobileNumber((String)value);
553 chandransh 784
      }
785
      break;
786
 
787
    case SOCIAL_HANDLES:
788
      if (value == null) {
789
        unsetSocialHandles();
790
      } else {
791
        setSocialHandles((SocialHandles)value);
792
      }
793
      break;
794
 
795
    case ADDRESSES:
796
      if (value == null) {
797
        unsetAddresses();
798
      } else {
799
        setAddresses((List<Address>)value);
800
      }
801
      break;
802
 
803
    case DEFAULT_ADDRESS_ID:
804
      if (value == null) {
805
        unsetDefaultAddressId();
806
      } else {
807
        setDefaultAddressId((Long)value);
808
      }
809
      break;
810
 
811
    case COMMUNICATION_EMAIL:
812
      if (value == null) {
813
        unsetCommunicationEmail();
814
      } else {
815
        setCommunicationEmail((String)value);
816
      }
817
      break;
818
 
819
    case ACTIVE_CART_ID:
820
      if (value == null) {
821
        unsetActiveCartId();
822
      } else {
823
        setActiveCartId((Long)value);
824
      }
825
      break;
826
 
827
    case JSESSION_ID:
828
      if (value == null) {
829
        unsetJsessionId();
830
      } else {
831
        setJsessionId((String)value);
832
      }
833
      break;
834
 
835
    case IS_ANONYMOUS:
836
      if (value == null) {
837
        unsetIsAnonymous();
838
      } else {
839
        setIsAnonymous((Boolean)value);
840
      }
841
      break;
842
 
2020 vikas 843
    case SOURCE:
844
      if (value == null) {
845
        unsetSource();
846
      } else {
847
        setSource((String)value);
848
      }
849
      break;
850
 
2816 vikas 851
    case SOURCE_START_TIME:
852
      if (value == null) {
853
        unsetSourceStartTime();
854
      } else {
855
        setSourceStartTime((Long)value);
856
      }
857
      break;
858
 
553 chandransh 859
    }
860
  }
861
 
862
  public Object getFieldValue(_Fields field) {
863
    switch (field) {
864
    case USER_ID:
3430 rajveer 865
      return Long.valueOf(getUserId());
553 chandransh 866
 
867
    case EMAIL:
868
      return getEmail();
869
 
870
    case PASSWORD:
871
      return getPassword();
872
 
873
    case NAME:
874
      return getName();
875
 
876
    case DATE_OF_BIRTH:
571 rajveer 877
      return getDateOfBirth();
553 chandransh 878
 
879
    case SEX:
880
      return getSex();
881
 
571 rajveer 882
    case MOBILE_NUMBER:
883
      return getMobileNumber();
553 chandransh 884
 
885
    case SOCIAL_HANDLES:
886
      return getSocialHandles();
887
 
888
    case ADDRESSES:
889
      return getAddresses();
890
 
891
    case DEFAULT_ADDRESS_ID:
3430 rajveer 892
      return Long.valueOf(getDefaultAddressId());
553 chandransh 893
 
894
    case COMMUNICATION_EMAIL:
895
      return getCommunicationEmail();
896
 
897
    case ACTIVE_CART_ID:
3430 rajveer 898
      return Long.valueOf(getActiveCartId());
553 chandransh 899
 
900
    case JSESSION_ID:
901
      return getJsessionId();
902
 
903
    case IS_ANONYMOUS:
3430 rajveer 904
      return Boolean.valueOf(isIsAnonymous());
553 chandransh 905
 
2020 vikas 906
    case SOURCE:
907
      return getSource();
908
 
2816 vikas 909
    case SOURCE_START_TIME:
3430 rajveer 910
      return Long.valueOf(getSourceStartTime());
2816 vikas 911
 
553 chandransh 912
    }
913
    throw new IllegalStateException();
914
  }
915
 
3430 rajveer 916
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
917
  public boolean isSet(_Fields field) {
918
    if (field == null) {
919
      throw new IllegalArgumentException();
920
    }
553 chandransh 921
 
922
    switch (field) {
923
    case USER_ID:
924
      return isSetUserId();
925
    case EMAIL:
926
      return isSetEmail();
927
    case PASSWORD:
928
      return isSetPassword();
929
    case NAME:
930
      return isSetName();
931
    case DATE_OF_BIRTH:
932
      return isSetDateOfBirth();
933
    case SEX:
934
      return isSetSex();
571 rajveer 935
    case MOBILE_NUMBER:
936
      return isSetMobileNumber();
553 chandransh 937
    case SOCIAL_HANDLES:
938
      return isSetSocialHandles();
939
    case ADDRESSES:
940
      return isSetAddresses();
941
    case DEFAULT_ADDRESS_ID:
942
      return isSetDefaultAddressId();
943
    case COMMUNICATION_EMAIL:
944
      return isSetCommunicationEmail();
945
    case ACTIVE_CART_ID:
946
      return isSetActiveCartId();
947
    case JSESSION_ID:
948
      return isSetJsessionId();
949
    case IS_ANONYMOUS:
950
      return isSetIsAnonymous();
2020 vikas 951
    case SOURCE:
952
      return isSetSource();
2816 vikas 953
    case SOURCE_START_TIME:
954
      return isSetSourceStartTime();
553 chandransh 955
    }
956
    throw new IllegalStateException();
957
  }
958
 
959
  @Override
960
  public boolean equals(Object that) {
961
    if (that == null)
962
      return false;
963
    if (that instanceof User)
964
      return this.equals((User)that);
965
    return false;
966
  }
967
 
968
  public boolean equals(User that) {
969
    if (that == null)
970
      return false;
971
 
972
    boolean this_present_userId = true;
973
    boolean that_present_userId = true;
974
    if (this_present_userId || that_present_userId) {
975
      if (!(this_present_userId && that_present_userId))
976
        return false;
977
      if (this.userId != that.userId)
978
        return false;
979
    }
980
 
981
    boolean this_present_email = true && this.isSetEmail();
982
    boolean that_present_email = true && that.isSetEmail();
983
    if (this_present_email || that_present_email) {
984
      if (!(this_present_email && that_present_email))
985
        return false;
986
      if (!this.email.equals(that.email))
987
        return false;
988
    }
989
 
990
    boolean this_present_password = true && this.isSetPassword();
991
    boolean that_present_password = true && that.isSetPassword();
992
    if (this_present_password || that_present_password) {
993
      if (!(this_present_password && that_present_password))
994
        return false;
995
      if (!this.password.equals(that.password))
996
        return false;
997
    }
998
 
999
    boolean this_present_name = true && this.isSetName();
1000
    boolean that_present_name = true && that.isSetName();
1001
    if (this_present_name || that_present_name) {
1002
      if (!(this_present_name && that_present_name))
1003
        return false;
1004
      if (!this.name.equals(that.name))
1005
        return false;
1006
    }
1007
 
571 rajveer 1008
    boolean this_present_dateOfBirth = true && this.isSetDateOfBirth();
1009
    boolean that_present_dateOfBirth = true && that.isSetDateOfBirth();
553 chandransh 1010
    if (this_present_dateOfBirth || that_present_dateOfBirth) {
1011
      if (!(this_present_dateOfBirth && that_present_dateOfBirth))
1012
        return false;
571 rajveer 1013
      if (!this.dateOfBirth.equals(that.dateOfBirth))
553 chandransh 1014
        return false;
1015
    }
1016
 
1017
    boolean this_present_sex = true && this.isSetSex();
1018
    boolean that_present_sex = true && that.isSetSex();
1019
    if (this_present_sex || that_present_sex) {
1020
      if (!(this_present_sex && that_present_sex))
1021
        return false;
1022
      if (!this.sex.equals(that.sex))
1023
        return false;
1024
    }
1025
 
571 rajveer 1026
    boolean this_present_mobileNumber = true && this.isSetMobileNumber();
1027
    boolean that_present_mobileNumber = true && that.isSetMobileNumber();
1028
    if (this_present_mobileNumber || that_present_mobileNumber) {
1029
      if (!(this_present_mobileNumber && that_present_mobileNumber))
553 chandransh 1030
        return false;
571 rajveer 1031
      if (!this.mobileNumber.equals(that.mobileNumber))
553 chandransh 1032
        return false;
1033
    }
1034
 
1035
    boolean this_present_socialHandles = true && this.isSetSocialHandles();
1036
    boolean that_present_socialHandles = true && that.isSetSocialHandles();
1037
    if (this_present_socialHandles || that_present_socialHandles) {
1038
      if (!(this_present_socialHandles && that_present_socialHandles))
1039
        return false;
1040
      if (!this.socialHandles.equals(that.socialHandles))
1041
        return false;
1042
    }
1043
 
1044
    boolean this_present_addresses = true && this.isSetAddresses();
1045
    boolean that_present_addresses = true && that.isSetAddresses();
1046
    if (this_present_addresses || that_present_addresses) {
1047
      if (!(this_present_addresses && that_present_addresses))
1048
        return false;
1049
      if (!this.addresses.equals(that.addresses))
1050
        return false;
1051
    }
1052
 
1053
    boolean this_present_defaultAddressId = true;
1054
    boolean that_present_defaultAddressId = true;
1055
    if (this_present_defaultAddressId || that_present_defaultAddressId) {
1056
      if (!(this_present_defaultAddressId && that_present_defaultAddressId))
1057
        return false;
1058
      if (this.defaultAddressId != that.defaultAddressId)
1059
        return false;
1060
    }
1061
 
1062
    boolean this_present_communicationEmail = true && this.isSetCommunicationEmail();
1063
    boolean that_present_communicationEmail = true && that.isSetCommunicationEmail();
1064
    if (this_present_communicationEmail || that_present_communicationEmail) {
1065
      if (!(this_present_communicationEmail && that_present_communicationEmail))
1066
        return false;
1067
      if (!this.communicationEmail.equals(that.communicationEmail))
1068
        return false;
1069
    }
1070
 
1071
    boolean this_present_activeCartId = true;
1072
    boolean that_present_activeCartId = true;
1073
    if (this_present_activeCartId || that_present_activeCartId) {
1074
      if (!(this_present_activeCartId && that_present_activeCartId))
1075
        return false;
1076
      if (this.activeCartId != that.activeCartId)
1077
        return false;
1078
    }
1079
 
1080
    boolean this_present_jsessionId = true && this.isSetJsessionId();
1081
    boolean that_present_jsessionId = true && that.isSetJsessionId();
1082
    if (this_present_jsessionId || that_present_jsessionId) {
1083
      if (!(this_present_jsessionId && that_present_jsessionId))
1084
        return false;
1085
      if (!this.jsessionId.equals(that.jsessionId))
1086
        return false;
1087
    }
1088
 
1089
    boolean this_present_isAnonymous = true;
1090
    boolean that_present_isAnonymous = true;
1091
    if (this_present_isAnonymous || that_present_isAnonymous) {
1092
      if (!(this_present_isAnonymous && that_present_isAnonymous))
1093
        return false;
1094
      if (this.isAnonymous != that.isAnonymous)
1095
        return false;
1096
    }
1097
 
2020 vikas 1098
    boolean this_present_source = true && this.isSetSource();
1099
    boolean that_present_source = true && that.isSetSource();
1100
    if (this_present_source || that_present_source) {
1101
      if (!(this_present_source && that_present_source))
1102
        return false;
1103
      if (!this.source.equals(that.source))
1104
        return false;
1105
    }
1106
 
2816 vikas 1107
    boolean this_present_sourceStartTime = true;
1108
    boolean that_present_sourceStartTime = true;
1109
    if (this_present_sourceStartTime || that_present_sourceStartTime) {
1110
      if (!(this_present_sourceStartTime && that_present_sourceStartTime))
1111
        return false;
1112
      if (this.sourceStartTime != that.sourceStartTime)
1113
        return false;
1114
    }
1115
 
553 chandransh 1116
    return true;
1117
  }
1118
 
1119
  @Override
1120
  public int hashCode() {
1121
    return 0;
1122
  }
1123
 
571 rajveer 1124
  public int compareTo(User other) {
1125
    if (!getClass().equals(other.getClass())) {
1126
      return getClass().getName().compareTo(other.getClass().getName());
1127
    }
1128
 
1129
    int lastComparison = 0;
1130
    User typedOther = (User)other;
1131
 
3430 rajveer 1132
    lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
571 rajveer 1133
    if (lastComparison != 0) {
1134
      return lastComparison;
1135
    }
3430 rajveer 1136
    if (isSetUserId()) {
1137
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
1138
      if (lastComparison != 0) {
1139
        return lastComparison;
1140
      }
571 rajveer 1141
    }
3430 rajveer 1142
    lastComparison = Boolean.valueOf(isSetEmail()).compareTo(typedOther.isSetEmail());
571 rajveer 1143
    if (lastComparison != 0) {
1144
      return lastComparison;
1145
    }
3430 rajveer 1146
    if (isSetEmail()) {
1147
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.email, typedOther.email);
1148
      if (lastComparison != 0) {
1149
        return lastComparison;
1150
      }
571 rajveer 1151
    }
3430 rajveer 1152
    lastComparison = Boolean.valueOf(isSetPassword()).compareTo(typedOther.isSetPassword());
571 rajveer 1153
    if (lastComparison != 0) {
1154
      return lastComparison;
1155
    }
3430 rajveer 1156
    if (isSetPassword()) {
1157
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, typedOther.password);
1158
      if (lastComparison != 0) {
1159
        return lastComparison;
1160
      }
571 rajveer 1161
    }
3430 rajveer 1162
    lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
571 rajveer 1163
    if (lastComparison != 0) {
1164
      return lastComparison;
1165
    }
3430 rajveer 1166
    if (isSetName()) {
1167
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
1168
      if (lastComparison != 0) {
1169
        return lastComparison;
1170
      }
571 rajveer 1171
    }
3430 rajveer 1172
    lastComparison = Boolean.valueOf(isSetDateOfBirth()).compareTo(typedOther.isSetDateOfBirth());
571 rajveer 1173
    if (lastComparison != 0) {
1174
      return lastComparison;
1175
    }
3430 rajveer 1176
    if (isSetDateOfBirth()) {
1177
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dateOfBirth, typedOther.dateOfBirth);
1178
      if (lastComparison != 0) {
1179
        return lastComparison;
1180
      }
571 rajveer 1181
    }
3430 rajveer 1182
    lastComparison = Boolean.valueOf(isSetSex()).compareTo(typedOther.isSetSex());
571 rajveer 1183
    if (lastComparison != 0) {
1184
      return lastComparison;
1185
    }
3430 rajveer 1186
    if (isSetSex()) {
1187
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sex, typedOther.sex);
1188
      if (lastComparison != 0) {
1189
        return lastComparison;
1190
      }
571 rajveer 1191
    }
3430 rajveer 1192
    lastComparison = Boolean.valueOf(isSetMobileNumber()).compareTo(typedOther.isSetMobileNumber());
571 rajveer 1193
    if (lastComparison != 0) {
1194
      return lastComparison;
1195
    }
3430 rajveer 1196
    if (isSetMobileNumber()) {
1197
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mobileNumber, typedOther.mobileNumber);
1198
      if (lastComparison != 0) {
1199
        return lastComparison;
1200
      }
571 rajveer 1201
    }
3430 rajveer 1202
    lastComparison = Boolean.valueOf(isSetSocialHandles()).compareTo(typedOther.isSetSocialHandles());
571 rajveer 1203
    if (lastComparison != 0) {
1204
      return lastComparison;
1205
    }
3430 rajveer 1206
    if (isSetSocialHandles()) {
1207
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.socialHandles, typedOther.socialHandles);
1208
      if (lastComparison != 0) {
1209
        return lastComparison;
1210
      }
571 rajveer 1211
    }
3430 rajveer 1212
    lastComparison = Boolean.valueOf(isSetAddresses()).compareTo(typedOther.isSetAddresses());
571 rajveer 1213
    if (lastComparison != 0) {
1214
      return lastComparison;
1215
    }
3430 rajveer 1216
    if (isSetAddresses()) {
1217
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addresses, typedOther.addresses);
1218
      if (lastComparison != 0) {
1219
        return lastComparison;
1220
      }
571 rajveer 1221
    }
3430 rajveer 1222
    lastComparison = Boolean.valueOf(isSetDefaultAddressId()).compareTo(typedOther.isSetDefaultAddressId());
571 rajveer 1223
    if (lastComparison != 0) {
1224
      return lastComparison;
1225
    }
3430 rajveer 1226
    if (isSetDefaultAddressId()) {
1227
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultAddressId, typedOther.defaultAddressId);
1228
      if (lastComparison != 0) {
1229
        return lastComparison;
1230
      }
571 rajveer 1231
    }
3430 rajveer 1232
    lastComparison = Boolean.valueOf(isSetCommunicationEmail()).compareTo(typedOther.isSetCommunicationEmail());
571 rajveer 1233
    if (lastComparison != 0) {
1234
      return lastComparison;
1235
    }
3430 rajveer 1236
    if (isSetCommunicationEmail()) {
1237
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.communicationEmail, typedOther.communicationEmail);
1238
      if (lastComparison != 0) {
1239
        return lastComparison;
1240
      }
571 rajveer 1241
    }
3430 rajveer 1242
    lastComparison = Boolean.valueOf(isSetActiveCartId()).compareTo(typedOther.isSetActiveCartId());
571 rajveer 1243
    if (lastComparison != 0) {
1244
      return lastComparison;
1245
    }
3430 rajveer 1246
    if (isSetActiveCartId()) {
1247
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activeCartId, typedOther.activeCartId);
1248
      if (lastComparison != 0) {
1249
        return lastComparison;
1250
      }
571 rajveer 1251
    }
3430 rajveer 1252
    lastComparison = Boolean.valueOf(isSetJsessionId()).compareTo(typedOther.isSetJsessionId());
571 rajveer 1253
    if (lastComparison != 0) {
1254
      return lastComparison;
1255
    }
3430 rajveer 1256
    if (isSetJsessionId()) {
1257
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jsessionId, typedOther.jsessionId);
1258
      if (lastComparison != 0) {
1259
        return lastComparison;
1260
      }
571 rajveer 1261
    }
3430 rajveer 1262
    lastComparison = Boolean.valueOf(isSetIsAnonymous()).compareTo(typedOther.isSetIsAnonymous());
571 rajveer 1263
    if (lastComparison != 0) {
1264
      return lastComparison;
1265
    }
3430 rajveer 1266
    if (isSetIsAnonymous()) {
1267
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAnonymous, typedOther.isAnonymous);
1268
      if (lastComparison != 0) {
1269
        return lastComparison;
1270
      }
571 rajveer 1271
    }
3430 rajveer 1272
    lastComparison = Boolean.valueOf(isSetSource()).compareTo(typedOther.isSetSource());
2020 vikas 1273
    if (lastComparison != 0) {
1274
      return lastComparison;
1275
    }
3430 rajveer 1276
    if (isSetSource()) {
1277
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source, typedOther.source);
1278
      if (lastComparison != 0) {
1279
        return lastComparison;
1280
      }
2020 vikas 1281
    }
3430 rajveer 1282
    lastComparison = Boolean.valueOf(isSetSourceStartTime()).compareTo(typedOther.isSetSourceStartTime());
2816 vikas 1283
    if (lastComparison != 0) {
1284
      return lastComparison;
1285
    }
3430 rajveer 1286
    if (isSetSourceStartTime()) {
1287
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sourceStartTime, typedOther.sourceStartTime);
1288
      if (lastComparison != 0) {
1289
        return lastComparison;
1290
      }
2816 vikas 1291
    }
571 rajveer 1292
    return 0;
1293
  }
1294
 
3430 rajveer 1295
  public _Fields fieldForId(int fieldId) {
1296
    return _Fields.findByThriftId(fieldId);
1297
  }
1298
 
1299
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1300
    org.apache.thrift.protocol.TField field;
553 chandransh 1301
    iprot.readStructBegin();
1302
    while (true)
1303
    {
1304
      field = iprot.readFieldBegin();
3430 rajveer 1305
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
553 chandransh 1306
        break;
1307
      }
3430 rajveer 1308
      switch (field.id) {
1309
        case 1: // USER_ID
1310
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1311
            this.userId = iprot.readI64();
1312
            setUserIdIsSet(true);
1313
          } else { 
1314
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1315
          }
1316
          break;
1317
        case 2: // EMAIL
1318
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1319
            this.email = iprot.readString();
1320
          } else { 
1321
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1322
          }
1323
          break;
1324
        case 3: // PASSWORD
1325
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1326
            this.password = iprot.readString();
1327
          } else { 
1328
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1329
          }
1330
          break;
1331
        case 4: // NAME
1332
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1333
            this.name = iprot.readString();
1334
          } else { 
1335
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1336
          }
1337
          break;
1338
        case 5: // DATE_OF_BIRTH
1339
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1340
            this.dateOfBirth = iprot.readString();
1341
          } else { 
1342
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1343
          }
1344
          break;
1345
        case 6: // SEX
1346
          if (field.type == org.apache.thrift.protocol.TType.I32) {
1347
            this.sex = Sex.findByValue(iprot.readI32());
1348
          } else { 
1349
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1350
          }
1351
          break;
1352
        case 7: // MOBILE_NUMBER
1353
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1354
            this.mobileNumber = iprot.readString();
1355
          } else { 
1356
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1357
          }
1358
          break;
1359
        case 8: // SOCIAL_HANDLES
1360
          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
1361
            this.socialHandles = new SocialHandles();
1362
            this.socialHandles.read(iprot);
1363
          } else { 
1364
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1365
          }
1366
          break;
1367
        case 9: // ADDRESSES
1368
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
1369
            {
1370
              org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
1371
              this.addresses = new ArrayList<Address>(_list4.size);
1372
              for (int _i5 = 0; _i5 < _list4.size; ++_i5)
553 chandransh 1373
              {
3430 rajveer 1374
                Address _elem6; // required
1375
                _elem6 = new Address();
1376
                _elem6.read(iprot);
1377
                this.addresses.add(_elem6);
553 chandransh 1378
              }
3430 rajveer 1379
              iprot.readListEnd();
553 chandransh 1380
            }
3430 rajveer 1381
          } else { 
1382
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1383
          }
1384
          break;
1385
        case 10: // DEFAULT_ADDRESS_ID
1386
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1387
            this.defaultAddressId = iprot.readI64();
1388
            setDefaultAddressIdIsSet(true);
1389
          } else { 
1390
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1391
          }
1392
          break;
1393
        case 11: // COMMUNICATION_EMAIL
1394
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1395
            this.communicationEmail = iprot.readString();
1396
          } else { 
1397
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1398
          }
1399
          break;
1400
        case 12: // ACTIVE_CART_ID
1401
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1402
            this.activeCartId = iprot.readI64();
1403
            setActiveCartIdIsSet(true);
1404
          } else { 
1405
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1406
          }
1407
          break;
1408
        case 13: // JSESSION_ID
1409
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1410
            this.jsessionId = iprot.readString();
1411
          } else { 
1412
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1413
          }
1414
          break;
1415
        case 14: // IS_ANONYMOUS
1416
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
1417
            this.isAnonymous = iprot.readBool();
1418
            setIsAnonymousIsSet(true);
1419
          } else { 
1420
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1421
          }
1422
          break;
1423
        case 15: // SOURCE
1424
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1425
            this.source = iprot.readString();
1426
          } else { 
1427
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1428
          }
1429
          break;
1430
        case 16: // SOURCE_START_TIME
1431
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1432
            this.sourceStartTime = iprot.readI64();
1433
            setSourceStartTimeIsSet(true);
1434
          } else { 
1435
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1436
          }
1437
          break;
1438
        default:
1439
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
553 chandransh 1440
      }
3430 rajveer 1441
      iprot.readFieldEnd();
553 chandransh 1442
    }
1443
    iprot.readStructEnd();
1444
    validate();
1445
  }
1446
 
3430 rajveer 1447
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
553 chandransh 1448
    validate();
1449
 
1450
    oprot.writeStructBegin(STRUCT_DESC);
1451
    oprot.writeFieldBegin(USER_ID_FIELD_DESC);
1452
    oprot.writeI64(this.userId);
1453
    oprot.writeFieldEnd();
1454
    if (this.email != null) {
1455
      oprot.writeFieldBegin(EMAIL_FIELD_DESC);
1456
      oprot.writeString(this.email);
1457
      oprot.writeFieldEnd();
1458
    }
1459
    if (this.password != null) {
1460
      oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
1461
      oprot.writeString(this.password);
1462
      oprot.writeFieldEnd();
1463
    }
1464
    if (this.name != null) {
1465
      oprot.writeFieldBegin(NAME_FIELD_DESC);
1466
      oprot.writeString(this.name);
1467
      oprot.writeFieldEnd();
1468
    }
571 rajveer 1469
    if (this.dateOfBirth != null) {
1470
      oprot.writeFieldBegin(DATE_OF_BIRTH_FIELD_DESC);
1471
      oprot.writeString(this.dateOfBirth);
1472
      oprot.writeFieldEnd();
1473
    }
553 chandransh 1474
    if (this.sex != null) {
1475
      oprot.writeFieldBegin(SEX_FIELD_DESC);
1476
      oprot.writeI32(this.sex.getValue());
1477
      oprot.writeFieldEnd();
1478
    }
571 rajveer 1479
    if (this.mobileNumber != null) {
1480
      oprot.writeFieldBegin(MOBILE_NUMBER_FIELD_DESC);
1481
      oprot.writeString(this.mobileNumber);
553 chandransh 1482
      oprot.writeFieldEnd();
1483
    }
1484
    if (this.socialHandles != null) {
1485
      oprot.writeFieldBegin(SOCIAL_HANDLES_FIELD_DESC);
1486
      this.socialHandles.write(oprot);
1487
      oprot.writeFieldEnd();
1488
    }
1489
    if (this.addresses != null) {
1490
      oprot.writeFieldBegin(ADDRESSES_FIELD_DESC);
1491
      {
3430 rajveer 1492
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.addresses.size()));
571 rajveer 1493
        for (Address _iter7 : this.addresses)
553 chandransh 1494
        {
571 rajveer 1495
          _iter7.write(oprot);
553 chandransh 1496
        }
1497
        oprot.writeListEnd();
1498
      }
1499
      oprot.writeFieldEnd();
1500
    }
1501
    oprot.writeFieldBegin(DEFAULT_ADDRESS_ID_FIELD_DESC);
1502
    oprot.writeI64(this.defaultAddressId);
1503
    oprot.writeFieldEnd();
1504
    if (this.communicationEmail != null) {
1505
      oprot.writeFieldBegin(COMMUNICATION_EMAIL_FIELD_DESC);
1506
      oprot.writeString(this.communicationEmail);
1507
      oprot.writeFieldEnd();
1508
    }
1509
    oprot.writeFieldBegin(ACTIVE_CART_ID_FIELD_DESC);
1510
    oprot.writeI64(this.activeCartId);
1511
    oprot.writeFieldEnd();
1512
    if (this.jsessionId != null) {
1513
      oprot.writeFieldBegin(JSESSION_ID_FIELD_DESC);
1514
      oprot.writeString(this.jsessionId);
1515
      oprot.writeFieldEnd();
1516
    }
1517
    oprot.writeFieldBegin(IS_ANONYMOUS_FIELD_DESC);
1518
    oprot.writeBool(this.isAnonymous);
1519
    oprot.writeFieldEnd();
2020 vikas 1520
    if (this.source != null) {
1521
      oprot.writeFieldBegin(SOURCE_FIELD_DESC);
1522
      oprot.writeString(this.source);
1523
      oprot.writeFieldEnd();
1524
    }
2816 vikas 1525
    oprot.writeFieldBegin(SOURCE_START_TIME_FIELD_DESC);
1526
    oprot.writeI64(this.sourceStartTime);
1527
    oprot.writeFieldEnd();
553 chandransh 1528
    oprot.writeFieldStop();
1529
    oprot.writeStructEnd();
1530
  }
1531
 
1532
  @Override
1533
  public String toString() {
1534
    StringBuilder sb = new StringBuilder("User(");
1535
    boolean first = true;
1536
 
1537
    sb.append("userId:");
1538
    sb.append(this.userId);
1539
    first = false;
1540
    if (!first) sb.append(", ");
1541
    sb.append("email:");
1542
    if (this.email == null) {
1543
      sb.append("null");
1544
    } else {
1545
      sb.append(this.email);
1546
    }
1547
    first = false;
1548
    if (!first) sb.append(", ");
1549
    sb.append("password:");
1550
    if (this.password == null) {
1551
      sb.append("null");
1552
    } else {
1553
      sb.append(this.password);
1554
    }
1555
    first = false;
1556
    if (!first) sb.append(", ");
1557
    sb.append("name:");
1558
    if (this.name == null) {
1559
      sb.append("null");
1560
    } else {
1561
      sb.append(this.name);
1562
    }
1563
    first = false;
1564
    if (!first) sb.append(", ");
1565
    sb.append("dateOfBirth:");
571 rajveer 1566
    if (this.dateOfBirth == null) {
1567
      sb.append("null");
1568
    } else {
1569
      sb.append(this.dateOfBirth);
1570
    }
553 chandransh 1571
    first = false;
1572
    if (!first) sb.append(", ");
1573
    sb.append("sex:");
1574
    if (this.sex == null) {
1575
      sb.append("null");
1576
    } else {
1577
      sb.append(this.sex);
1578
    }
1579
    first = false;
1580
    if (!first) sb.append(", ");
571 rajveer 1581
    sb.append("mobileNumber:");
1582
    if (this.mobileNumber == null) {
553 chandransh 1583
      sb.append("null");
1584
    } else {
571 rajveer 1585
      sb.append(this.mobileNumber);
553 chandransh 1586
    }
1587
    first = false;
1588
    if (!first) sb.append(", ");
1589
    sb.append("socialHandles:");
1590
    if (this.socialHandles == null) {
1591
      sb.append("null");
1592
    } else {
1593
      sb.append(this.socialHandles);
1594
    }
1595
    first = false;
1596
    if (!first) sb.append(", ");
1597
    sb.append("addresses:");
1598
    if (this.addresses == null) {
1599
      sb.append("null");
1600
    } else {
1601
      sb.append(this.addresses);
1602
    }
1603
    first = false;
1604
    if (!first) sb.append(", ");
1605
    sb.append("defaultAddressId:");
1606
    sb.append(this.defaultAddressId);
1607
    first = false;
1608
    if (!first) sb.append(", ");
1609
    sb.append("communicationEmail:");
1610
    if (this.communicationEmail == null) {
1611
      sb.append("null");
1612
    } else {
1613
      sb.append(this.communicationEmail);
1614
    }
1615
    first = false;
1616
    if (!first) sb.append(", ");
1617
    sb.append("activeCartId:");
1618
    sb.append(this.activeCartId);
1619
    first = false;
1620
    if (!first) sb.append(", ");
1621
    sb.append("jsessionId:");
1622
    if (this.jsessionId == null) {
1623
      sb.append("null");
1624
    } else {
1625
      sb.append(this.jsessionId);
1626
    }
1627
    first = false;
1628
    if (!first) sb.append(", ");
1629
    sb.append("isAnonymous:");
1630
    sb.append(this.isAnonymous);
1631
    first = false;
2020 vikas 1632
    if (!first) sb.append(", ");
1633
    sb.append("source:");
1634
    if (this.source == null) {
1635
      sb.append("null");
1636
    } else {
1637
      sb.append(this.source);
1638
    }
1639
    first = false;
2816 vikas 1640
    if (!first) sb.append(", ");
1641
    sb.append("sourceStartTime:");
1642
    sb.append(this.sourceStartTime);
1643
    first = false;
553 chandransh 1644
    sb.append(")");
1645
    return sb.toString();
1646
  }
1647
 
3430 rajveer 1648
  public void validate() throws org.apache.thrift.TException {
553 chandransh 1649
    // check for required fields
1650
  }
1651
 
3430 rajveer 1652
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1653
    try {
1654
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1655
    } catch (org.apache.thrift.TException te) {
1656
      throw new java.io.IOException(te);
1657
    }
1658
  }
1659
 
1660
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1661
    try {
1662
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1663
      __isset_bit_vector = new BitSet(1);
1664
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1665
    } catch (org.apache.thrift.TException te) {
1666
      throw new java.io.IOException(te);
1667
    }
1668
  }
1669
 
553 chandransh 1670
}
1671