Subversion Repositories SmartDukaan

Rev

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