Subversion Repositories SmartDukaan

Rev

Rev 553 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 553 Rev 571
Line 25... Line 25...
25
 
25
 
26
/**
26
/**
27
 * The user structure holding the basic information that identifies the user.
27
 * The user structure holding the basic information that identifies the user.
28
 * *
28
 * *
29
 */
29
 */
30
public class User implements TBase<User._Fields>, java.io.Serializable, Cloneable {
30
public class User implements TBase<User._Fields>, java.io.Serializable, Cloneable, Comparable<User> {
31
  private static final TStruct STRUCT_DESC = new TStruct("User");
31
  private static final TStruct STRUCT_DESC = new TStruct("User");
32
 
32
 
33
  private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
33
  private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
34
  private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)2);
34
  private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)2);
35
  private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)3);
35
  private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)3);
36
  private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)4);
36
  private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)4);
37
  private static final TField DATE_OF_BIRTH_FIELD_DESC = new TField("dateOfBirth", TType.I64, (short)5);
37
  private static final TField DATE_OF_BIRTH_FIELD_DESC = new TField("dateOfBirth", TType.STRING, (short)5);
38
  private static final TField SEX_FIELD_DESC = new TField("sex", TType.I32, (short)6);
38
  private static final TField SEX_FIELD_DESC = new TField("sex", TType.I32, (short)6);
39
  private static final TField PHONES_FIELD_DESC = new TField("phones", TType.SET, (short)7);
39
  private static final TField MOBILE_NUMBER_FIELD_DESC = new TField("mobileNumber", TType.STRING, (short)7);
40
  private static final TField SOCIAL_HANDLES_FIELD_DESC = new TField("socialHandles", TType.STRUCT, (short)8);
40
  private static final TField SOCIAL_HANDLES_FIELD_DESC = new TField("socialHandles", TType.STRUCT, (short)8);
41
  private static final TField ADDRESSES_FIELD_DESC = new TField("addresses", TType.LIST, (short)9);
41
  private static final TField ADDRESSES_FIELD_DESC = new TField("addresses", TType.LIST, (short)9);
42
  private static final TField DEFAULT_ADDRESS_ID_FIELD_DESC = new TField("defaultAddressId", TType.I64, (short)10);
42
  private static final TField DEFAULT_ADDRESS_ID_FIELD_DESC = new TField("defaultAddressId", TType.I64, (short)10);
43
  private static final TField COMMUNICATION_EMAIL_FIELD_DESC = new TField("communicationEmail", TType.STRING, (short)11);
43
  private static final TField COMMUNICATION_EMAIL_FIELD_DESC = new TField("communicationEmail", TType.STRING, (short)11);
44
  private static final TField ACTIVE_CART_ID_FIELD_DESC = new TField("activeCartId", TType.I64, (short)12);
44
  private static final TField ACTIVE_CART_ID_FIELD_DESC = new TField("activeCartId", TType.I64, (short)12);
Line 47... Line 47...
47
 
47
 
48
  private long userId;
48
  private long userId;
49
  private String email;
49
  private String email;
50
  private String password;
50
  private String password;
51
  private String name;
51
  private String name;
52
  private long dateOfBirth;
52
  private String dateOfBirth;
53
  private Sex sex;
53
  private Sex sex;
54
  private Set<Phone> phones;
54
  private String mobileNumber;
55
  private SocialHandles socialHandles;
55
  private SocialHandles socialHandles;
56
  private List<Address> addresses;
56
  private List<Address> addresses;
57
  private long defaultAddressId;
57
  private long defaultAddressId;
58
  private String communicationEmail;
58
  private String communicationEmail;
59
  private long activeCartId;
59
  private long activeCartId;
Line 70... Line 70...
70
    /**
70
    /**
71
     * 
71
     * 
72
     * @see Sex
72
     * @see Sex
73
     */
73
     */
74
    SEX((short)6, "sex"),
74
    SEX((short)6, "sex"),
75
    PHONES((short)7, "phones"),
75
    MOBILE_NUMBER((short)7, "mobileNumber"),
76
    SOCIAL_HANDLES((short)8, "socialHandles"),
76
    SOCIAL_HANDLES((short)8, "socialHandles"),
77
    ADDRESSES((short)9, "addresses"),
77
    ADDRESSES((short)9, "addresses"),
78
    DEFAULT_ADDRESS_ID((short)10, "defaultAddressId"),
78
    DEFAULT_ADDRESS_ID((short)10, "defaultAddressId"),
79
    COMMUNICATION_EMAIL((short)11, "communicationEmail"),
79
    COMMUNICATION_EMAIL((short)11, "communicationEmail"),
80
    ACTIVE_CART_ID((short)12, "activeCartId"),
80
    ACTIVE_CART_ID((short)12, "activeCartId"),
Line 132... Line 132...
132
    }
132
    }
133
  }
133
  }
134
 
134
 
135
  // isset id assignments
135
  // isset id assignments
136
  private static final int __USERID_ISSET_ID = 0;
136
  private static final int __USERID_ISSET_ID = 0;
137
  private static final int __DATEOFBIRTH_ISSET_ID = 1;
-
 
138
  private static final int __DEFAULTADDRESSID_ISSET_ID = 2;
137
  private static final int __DEFAULTADDRESSID_ISSET_ID = 1;
139
  private static final int __ACTIVECARTID_ISSET_ID = 3;
138
  private static final int __ACTIVECARTID_ISSET_ID = 2;
140
  private static final int __ISANONYMOUS_ISSET_ID = 4;
139
  private static final int __ISANONYMOUS_ISSET_ID = 3;
141
  private BitSet __isset_bit_vector = new BitSet(5);
140
  private BitSet __isset_bit_vector = new BitSet(4);
142
 
141
 
143
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
142
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
144
    put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
143
    put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
145
        new FieldValueMetaData(TType.I64)));
144
        new FieldValueMetaData(TType.I64)));
146
    put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
145
    put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
Line 148... Line 147...
148
    put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
147
    put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
149
        new FieldValueMetaData(TType.STRING)));
148
        new FieldValueMetaData(TType.STRING)));
150
    put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, 
149
    put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, 
151
        new FieldValueMetaData(TType.STRING)));
150
        new FieldValueMetaData(TType.STRING)));
152
    put(_Fields.DATE_OF_BIRTH, new FieldMetaData("dateOfBirth", TFieldRequirementType.DEFAULT, 
151
    put(_Fields.DATE_OF_BIRTH, new FieldMetaData("dateOfBirth", TFieldRequirementType.DEFAULT, 
153
        new FieldValueMetaData(TType.I64)));
152
        new FieldValueMetaData(TType.STRING)));
154
    put(_Fields.SEX, new FieldMetaData("sex", TFieldRequirementType.DEFAULT, 
153
    put(_Fields.SEX, new FieldMetaData("sex", TFieldRequirementType.DEFAULT, 
155
        new EnumMetaData(TType.ENUM, Sex.class)));
154
        new EnumMetaData(TType.ENUM, Sex.class)));
156
    put(_Fields.PHONES, new FieldMetaData("phones", TFieldRequirementType.DEFAULT, 
155
    put(_Fields.MOBILE_NUMBER, new FieldMetaData("mobileNumber", TFieldRequirementType.DEFAULT, 
157
        new SetMetaData(TType.SET, 
156
        new FieldValueMetaData(TType.STRING)));
158
            new StructMetaData(TType.STRUCT, Phone.class))));
-
 
159
    put(_Fields.SOCIAL_HANDLES, new FieldMetaData("socialHandles", TFieldRequirementType.DEFAULT, 
157
    put(_Fields.SOCIAL_HANDLES, new FieldMetaData("socialHandles", TFieldRequirementType.DEFAULT, 
160
        new StructMetaData(TType.STRUCT, SocialHandles.class)));
158
        new StructMetaData(TType.STRUCT, SocialHandles.class)));
161
    put(_Fields.ADDRESSES, new FieldMetaData("addresses", TFieldRequirementType.DEFAULT, 
159
    put(_Fields.ADDRESSES, new FieldMetaData("addresses", TFieldRequirementType.DEFAULT, 
162
        new ListMetaData(TType.LIST, 
160
        new ListMetaData(TType.LIST, 
163
            new StructMetaData(TType.STRUCT, Address.class))));
161
            new StructMetaData(TType.STRUCT, Address.class))));
Line 183... Line 181...
183
  public User(
181
  public User(
184
    long userId,
182
    long userId,
185
    String email,
183
    String email,
186
    String password,
184
    String password,
187
    String name,
185
    String name,
188
    long dateOfBirth,
186
    String dateOfBirth,
189
    Sex sex,
187
    Sex sex,
190
    Set<Phone> phones,
188
    String mobileNumber,
191
    SocialHandles socialHandles,
189
    SocialHandles socialHandles,
192
    List<Address> addresses,
190
    List<Address> addresses,
193
    long defaultAddressId,
191
    long defaultAddressId,
194
    String communicationEmail,
192
    String communicationEmail,
195
    long activeCartId,
193
    long activeCartId,
Line 201... Line 199...
201
    setUserIdIsSet(true);
199
    setUserIdIsSet(true);
202
    this.email = email;
200
    this.email = email;
203
    this.password = password;
201
    this.password = password;
204
    this.name = name;
202
    this.name = name;
205
    this.dateOfBirth = dateOfBirth;
203
    this.dateOfBirth = dateOfBirth;
206
    setDateOfBirthIsSet(true);
-
 
207
    this.sex = sex;
204
    this.sex = sex;
208
    this.phones = phones;
205
    this.mobileNumber = mobileNumber;
209
    this.socialHandles = socialHandles;
206
    this.socialHandles = socialHandles;
210
    this.addresses = addresses;
207
    this.addresses = addresses;
211
    this.defaultAddressId = defaultAddressId;
208
    this.defaultAddressId = defaultAddressId;
212
    setDefaultAddressIdIsSet(true);
209
    setDefaultAddressIdIsSet(true);
213
    this.communicationEmail = communicationEmail;
210
    this.communicationEmail = communicationEmail;
Line 232... Line 229...
232
      this.password = other.password;
229
      this.password = other.password;
233
    }
230
    }
234
    if (other.isSetName()) {
231
    if (other.isSetName()) {
235
      this.name = other.name;
232
      this.name = other.name;
236
    }
233
    }
-
 
234
    if (other.isSetDateOfBirth()) {
237
    this.dateOfBirth = other.dateOfBirth;
235
      this.dateOfBirth = other.dateOfBirth;
-
 
236
    }
238
    if (other.isSetSex()) {
237
    if (other.isSetSex()) {
239
      this.sex = other.sex;
238
      this.sex = other.sex;
240
    }
239
    }
241
    if (other.isSetPhones()) {
240
    if (other.isSetMobileNumber()) {
242
      Set<Phone> __this__phones = new HashSet<Phone>();
-
 
243
      for (Phone other_element : other.phones) {
-
 
244
        __this__phones.add(new Phone(other_element));
-
 
245
      }
-
 
246
      this.phones = __this__phones;
241
      this.mobileNumber = other.mobileNumber;
247
    }
242
    }
248
    if (other.isSetSocialHandles()) {
243
    if (other.isSetSocialHandles()) {
249
      this.socialHandles = new SocialHandles(other.socialHandles);
244
      this.socialHandles = new SocialHandles(other.socialHandles);
250
    }
245
    }
251
    if (other.isSetAddresses()) {
246
    if (other.isSetAddresses()) {
Line 368... Line 363...
368
    if (!value) {
363
    if (!value) {
369
      this.name = null;
364
      this.name = null;
370
    }
365
    }
371
  }
366
  }
372
 
367
 
373
  public long getDateOfBirth() {
368
  public String getDateOfBirth() {
374
    return this.dateOfBirth;
369
    return this.dateOfBirth;
375
  }
370
  }
376
 
371
 
377
  public User setDateOfBirth(long dateOfBirth) {
372
  public User setDateOfBirth(String dateOfBirth) {
378
    this.dateOfBirth = dateOfBirth;
373
    this.dateOfBirth = dateOfBirth;
379
    setDateOfBirthIsSet(true);
-
 
380
    return this;
374
    return this;
381
  }
375
  }
382
 
376
 
383
  public void unsetDateOfBirth() {
377
  public void unsetDateOfBirth() {
384
    __isset_bit_vector.clear(__DATEOFBIRTH_ISSET_ID);
378
    this.dateOfBirth = null;
385
  }
379
  }
386
 
380
 
387
  /** Returns true if field dateOfBirth is set (has been asigned a value) and false otherwise */
381
  /** Returns true if field dateOfBirth is set (has been asigned a value) and false otherwise */
388
  public boolean isSetDateOfBirth() {
382
  public boolean isSetDateOfBirth() {
389
    return __isset_bit_vector.get(__DATEOFBIRTH_ISSET_ID);
383
    return this.dateOfBirth != null;
390
  }
384
  }
391
 
385
 
392
  public void setDateOfBirthIsSet(boolean value) {
386
  public void setDateOfBirthIsSet(boolean value) {
-
 
387
    if (!value) {
393
    __isset_bit_vector.set(__DATEOFBIRTH_ISSET_ID, value);
388
      this.dateOfBirth = null;
-
 
389
    }
394
  }
390
  }
395
 
391
 
396
  /**
392
  /**
397
   * 
393
   * 
398
   * @see Sex
394
   * @see Sex
Line 423... Line 419...
423
    if (!value) {
419
    if (!value) {
424
      this.sex = null;
420
      this.sex = null;
425
    }
421
    }
426
  }
422
  }
427
 
423
 
428
  public int getPhonesSize() {
424
  public String getMobileNumber() {
429
    return (this.phones == null) ? 0 : this.phones.size();
425
    return this.mobileNumber;
430
  }
-
 
431
 
-
 
432
  public java.util.Iterator<Phone> getPhonesIterator() {
-
 
433
    return (this.phones == null) ? null : this.phones.iterator();
-
 
434
  }
426
  }
435
 
427
 
436
  public void addToPhones(Phone elem) {
-
 
437
    if (this.phones == null) {
-
 
438
      this.phones = new HashSet<Phone>();
-
 
439
    }
-
 
440
    this.phones.add(elem);
-
 
441
  }
-
 
442
 
-
 
443
  public Set<Phone> getPhones() {
-
 
444
    return this.phones;
-
 
445
  }
-
 
446
 
-
 
447
  public User setPhones(Set<Phone> phones) {
428
  public User setMobileNumber(String mobileNumber) {
448
    this.phones = phones;
429
    this.mobileNumber = mobileNumber;
449
    return this;
430
    return this;
450
  }
431
  }
451
 
432
 
452
  public void unsetPhones() {
433
  public void unsetMobileNumber() {
453
    this.phones = null;
434
    this.mobileNumber = null;
454
  }
435
  }
455
 
436
 
456
  /** Returns true if field phones is set (has been asigned a value) and false otherwise */
437
  /** Returns true if field mobileNumber is set (has been asigned a value) and false otherwise */
457
  public boolean isSetPhones() {
438
  public boolean isSetMobileNumber() {
458
    return this.phones != null;
439
    return this.mobileNumber != null;
459
  }
440
  }
460
 
441
 
461
  public void setPhonesIsSet(boolean value) {
442
  public void setMobileNumberIsSet(boolean value) {
462
    if (!value) {
443
    if (!value) {
463
      this.phones = null;
444
      this.mobileNumber = null;
464
    }
445
    }
465
  }
446
  }
466
 
447
 
467
  public SocialHandles getSocialHandles() {
448
  public SocialHandles getSocialHandles() {
468
    return this.socialHandles;
449
    return this.socialHandles;
Line 680... Line 661...
680
 
661
 
681
    case DATE_OF_BIRTH:
662
    case DATE_OF_BIRTH:
682
      if (value == null) {
663
      if (value == null) {
683
        unsetDateOfBirth();
664
        unsetDateOfBirth();
684
      } else {
665
      } else {
685
        setDateOfBirth((Long)value);
666
        setDateOfBirth((String)value);
686
      }
667
      }
687
      break;
668
      break;
688
 
669
 
689
    case SEX:
670
    case SEX:
690
      if (value == null) {
671
      if (value == null) {
Line 692... Line 673...
692
      } else {
673
      } else {
693
        setSex((Sex)value);
674
        setSex((Sex)value);
694
      }
675
      }
695
      break;
676
      break;
696
 
677
 
697
    case PHONES:
678
    case MOBILE_NUMBER:
698
      if (value == null) {
679
      if (value == null) {
699
        unsetPhones();
680
        unsetMobileNumber();
700
      } else {
681
      } else {
701
        setPhones((Set<Phone>)value);
682
        setMobileNumber((String)value);
702
      }
683
      }
703
      break;
684
      break;
704
 
685
 
705
    case SOCIAL_HANDLES:
686
    case SOCIAL_HANDLES:
706
      if (value == null) {
687
      if (value == null) {
Line 778... Line 759...
778
 
759
 
779
    case NAME:
760
    case NAME:
780
      return getName();
761
      return getName();
781
 
762
 
782
    case DATE_OF_BIRTH:
763
    case DATE_OF_BIRTH:
783
      return new Long(getDateOfBirth());
764
      return getDateOfBirth();
784
 
765
 
785
    case SEX:
766
    case SEX:
786
      return getSex();
767
      return getSex();
787
 
768
 
788
    case PHONES:
769
    case MOBILE_NUMBER:
789
      return getPhones();
770
      return getMobileNumber();
790
 
771
 
791
    case SOCIAL_HANDLES:
772
    case SOCIAL_HANDLES:
792
      return getSocialHandles();
773
      return getSocialHandles();
793
 
774
 
794
    case ADDRESSES:
775
    case ADDRESSES:
Line 830... Line 811...
830
      return isSetName();
811
      return isSetName();
831
    case DATE_OF_BIRTH:
812
    case DATE_OF_BIRTH:
832
      return isSetDateOfBirth();
813
      return isSetDateOfBirth();
833
    case SEX:
814
    case SEX:
834
      return isSetSex();
815
      return isSetSex();
835
    case PHONES:
816
    case MOBILE_NUMBER:
836
      return isSetPhones();
817
      return isSetMobileNumber();
837
    case SOCIAL_HANDLES:
818
    case SOCIAL_HANDLES:
838
      return isSetSocialHandles();
819
      return isSetSocialHandles();
839
    case ADDRESSES:
820
    case ADDRESSES:
840
      return isSetAddresses();
821
      return isSetAddresses();
841
    case DEFAULT_ADDRESS_ID:
822
    case DEFAULT_ADDRESS_ID:
Line 903... Line 884...
903
        return false;
884
        return false;
904
      if (!this.name.equals(that.name))
885
      if (!this.name.equals(that.name))
905
        return false;
886
        return false;
906
    }
887
    }
907
 
888
 
908
    boolean this_present_dateOfBirth = true;
889
    boolean this_present_dateOfBirth = true && this.isSetDateOfBirth();
909
    boolean that_present_dateOfBirth = true;
890
    boolean that_present_dateOfBirth = true && that.isSetDateOfBirth();
910
    if (this_present_dateOfBirth || that_present_dateOfBirth) {
891
    if (this_present_dateOfBirth || that_present_dateOfBirth) {
911
      if (!(this_present_dateOfBirth && that_present_dateOfBirth))
892
      if (!(this_present_dateOfBirth && that_present_dateOfBirth))
912
        return false;
893
        return false;
913
      if (this.dateOfBirth != that.dateOfBirth)
894
      if (!this.dateOfBirth.equals(that.dateOfBirth))
914
        return false;
895
        return false;
915
    }
896
    }
916
 
897
 
917
    boolean this_present_sex = true && this.isSetSex();
898
    boolean this_present_sex = true && this.isSetSex();
918
    boolean that_present_sex = true && that.isSetSex();
899
    boolean that_present_sex = true && that.isSetSex();
Line 921... Line 902...
921
        return false;
902
        return false;
922
      if (!this.sex.equals(that.sex))
903
      if (!this.sex.equals(that.sex))
923
        return false;
904
        return false;
924
    }
905
    }
925
 
906
 
926
    boolean this_present_phones = true && this.isSetPhones();
907
    boolean this_present_mobileNumber = true && this.isSetMobileNumber();
927
    boolean that_present_phones = true && that.isSetPhones();
908
    boolean that_present_mobileNumber = true && that.isSetMobileNumber();
928
    if (this_present_phones || that_present_phones) {
909
    if (this_present_mobileNumber || that_present_mobileNumber) {
929
      if (!(this_present_phones && that_present_phones))
910
      if (!(this_present_mobileNumber && that_present_mobileNumber))
930
        return false;
911
        return false;
931
      if (!this.phones.equals(that.phones))
912
      if (!this.mobileNumber.equals(that.mobileNumber))
932
        return false;
913
        return false;
933
    }
914
    }
934
 
915
 
935
    boolean this_present_socialHandles = true && this.isSetSocialHandles();
916
    boolean this_present_socialHandles = true && this.isSetSocialHandles();
936
    boolean that_present_socialHandles = true && that.isSetSocialHandles();
917
    boolean that_present_socialHandles = true && that.isSetSocialHandles();
Line 1001... Line 982...
1001
  @Override
982
  @Override
1002
  public int hashCode() {
983
  public int hashCode() {
1003
    return 0;
984
    return 0;
1004
  }
985
  }
1005
 
986
 
-
 
987
  public int compareTo(User other) {
-
 
988
    if (!getClass().equals(other.getClass())) {
-
 
989
      return getClass().getName().compareTo(other.getClass().getName());
-
 
990
    }
-
 
991
 
-
 
992
    int lastComparison = 0;
-
 
993
    User typedOther = (User)other;
-
 
994
 
-
 
995
    lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
-
 
996
    if (lastComparison != 0) {
-
 
997
      return lastComparison;
-
 
998
    }
-
 
999
    lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
-
 
1000
    if (lastComparison != 0) {
-
 
1001
      return lastComparison;
-
 
1002
    }
-
 
1003
    lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
-
 
1004
    if (lastComparison != 0) {
-
 
1005
      return lastComparison;
-
 
1006
    }
-
 
1007
    lastComparison = TBaseHelper.compareTo(email, typedOther.email);
-
 
1008
    if (lastComparison != 0) {
-
 
1009
      return lastComparison;
-
 
1010
    }
-
 
1011
    lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
-
 
1012
    if (lastComparison != 0) {
-
 
1013
      return lastComparison;
-
 
1014
    }
-
 
1015
    lastComparison = TBaseHelper.compareTo(password, typedOther.password);
-
 
1016
    if (lastComparison != 0) {
-
 
1017
      return lastComparison;
-
 
1018
    }
-
 
1019
    lastComparison = Boolean.valueOf(isSetName()).compareTo(isSetName());
-
 
1020
    if (lastComparison != 0) {
-
 
1021
      return lastComparison;
-
 
1022
    }
-
 
1023
    lastComparison = TBaseHelper.compareTo(name, typedOther.name);
-
 
1024
    if (lastComparison != 0) {
-
 
1025
      return lastComparison;
-
 
1026
    }
-
 
1027
    lastComparison = Boolean.valueOf(isSetDateOfBirth()).compareTo(isSetDateOfBirth());
-
 
1028
    if (lastComparison != 0) {
-
 
1029
      return lastComparison;
-
 
1030
    }
-
 
1031
    lastComparison = TBaseHelper.compareTo(dateOfBirth, typedOther.dateOfBirth);
-
 
1032
    if (lastComparison != 0) {
-
 
1033
      return lastComparison;
-
 
1034
    }
-
 
1035
    lastComparison = Boolean.valueOf(isSetSex()).compareTo(isSetSex());
-
 
1036
    if (lastComparison != 0) {
-
 
1037
      return lastComparison;
-
 
1038
    }
-
 
1039
    lastComparison = TBaseHelper.compareTo(sex, typedOther.sex);
-
 
1040
    if (lastComparison != 0) {
-
 
1041
      return lastComparison;
-
 
1042
    }
-
 
1043
    lastComparison = Boolean.valueOf(isSetMobileNumber()).compareTo(isSetMobileNumber());
-
 
1044
    if (lastComparison != 0) {
-
 
1045
      return lastComparison;
-
 
1046
    }
-
 
1047
    lastComparison = TBaseHelper.compareTo(mobileNumber, typedOther.mobileNumber);
-
 
1048
    if (lastComparison != 0) {
-
 
1049
      return lastComparison;
-
 
1050
    }
-
 
1051
    lastComparison = Boolean.valueOf(isSetSocialHandles()).compareTo(isSetSocialHandles());
-
 
1052
    if (lastComparison != 0) {
-
 
1053
      return lastComparison;
-
 
1054
    }
-
 
1055
    lastComparison = TBaseHelper.compareTo(socialHandles, typedOther.socialHandles);
-
 
1056
    if (lastComparison != 0) {
-
 
1057
      return lastComparison;
-
 
1058
    }
-
 
1059
    lastComparison = Boolean.valueOf(isSetAddresses()).compareTo(isSetAddresses());
-
 
1060
    if (lastComparison != 0) {
-
 
1061
      return lastComparison;
-
 
1062
    }
-
 
1063
    lastComparison = TBaseHelper.compareTo(addresses, typedOther.addresses);
-
 
1064
    if (lastComparison != 0) {
-
 
1065
      return lastComparison;
-
 
1066
    }
-
 
1067
    lastComparison = Boolean.valueOf(isSetDefaultAddressId()).compareTo(isSetDefaultAddressId());
-
 
1068
    if (lastComparison != 0) {
-
 
1069
      return lastComparison;
-
 
1070
    }
-
 
1071
    lastComparison = TBaseHelper.compareTo(defaultAddressId, typedOther.defaultAddressId);
-
 
1072
    if (lastComparison != 0) {
-
 
1073
      return lastComparison;
-
 
1074
    }
-
 
1075
    lastComparison = Boolean.valueOf(isSetCommunicationEmail()).compareTo(isSetCommunicationEmail());
-
 
1076
    if (lastComparison != 0) {
-
 
1077
      return lastComparison;
-
 
1078
    }
-
 
1079
    lastComparison = TBaseHelper.compareTo(communicationEmail, typedOther.communicationEmail);
-
 
1080
    if (lastComparison != 0) {
-
 
1081
      return lastComparison;
-
 
1082
    }
-
 
1083
    lastComparison = Boolean.valueOf(isSetActiveCartId()).compareTo(isSetActiveCartId());
-
 
1084
    if (lastComparison != 0) {
-
 
1085
      return lastComparison;
-
 
1086
    }
-
 
1087
    lastComparison = TBaseHelper.compareTo(activeCartId, typedOther.activeCartId);
-
 
1088
    if (lastComparison != 0) {
-
 
1089
      return lastComparison;
-
 
1090
    }
-
 
1091
    lastComparison = Boolean.valueOf(isSetJsessionId()).compareTo(isSetJsessionId());
-
 
1092
    if (lastComparison != 0) {
-
 
1093
      return lastComparison;
-
 
1094
    }
-
 
1095
    lastComparison = TBaseHelper.compareTo(jsessionId, typedOther.jsessionId);
-
 
1096
    if (lastComparison != 0) {
-
 
1097
      return lastComparison;
-
 
1098
    }
-
 
1099
    lastComparison = Boolean.valueOf(isSetIsAnonymous()).compareTo(isSetIsAnonymous());
-
 
1100
    if (lastComparison != 0) {
-
 
1101
      return lastComparison;
-
 
1102
    }
-
 
1103
    lastComparison = TBaseHelper.compareTo(isAnonymous, typedOther.isAnonymous);
-
 
1104
    if (lastComparison != 0) {
-
 
1105
      return lastComparison;
-
 
1106
    }
-
 
1107
    return 0;
-
 
1108
  }
-
 
1109
 
1006
  public void read(TProtocol iprot) throws TException {
1110
  public void read(TProtocol iprot) throws TException {
1007
    TField field;
1111
    TField field;
1008
    iprot.readStructBegin();
1112
    iprot.readStructBegin();
1009
    while (true)
1113
    while (true)
1010
    {
1114
    {
Line 1045... Line 1149...
1045
            } else { 
1149
            } else { 
1046
              TProtocolUtil.skip(iprot, field.type);
1150
              TProtocolUtil.skip(iprot, field.type);
1047
            }
1151
            }
1048
            break;
1152
            break;
1049
          case DATE_OF_BIRTH:
1153
          case DATE_OF_BIRTH:
1050
            if (field.type == TType.I64) {
1154
            if (field.type == TType.STRING) {
1051
              this.dateOfBirth = iprot.readI64();
1155
              this.dateOfBirth = iprot.readString();
1052
              setDateOfBirthIsSet(true);
-
 
1053
            } else { 
1156
            } else { 
1054
              TProtocolUtil.skip(iprot, field.type);
1157
              TProtocolUtil.skip(iprot, field.type);
1055
            }
1158
            }
1056
            break;
1159
            break;
1057
          case SEX:
1160
          case SEX:
Line 1059... Line 1162...
1059
              this.sex = Sex.findByValue(iprot.readI32());
1162
              this.sex = Sex.findByValue(iprot.readI32());
1060
            } else { 
1163
            } else { 
1061
              TProtocolUtil.skip(iprot, field.type);
1164
              TProtocolUtil.skip(iprot, field.type);
1062
            }
1165
            }
1063
            break;
1166
            break;
1064
          case PHONES:
1167
          case MOBILE_NUMBER:
1065
            if (field.type == TType.SET) {
1168
            if (field.type == TType.STRING) {
1066
              {
-
 
1067
                TSet _set4 = iprot.readSetBegin();
1169
              this.mobileNumber = iprot.readString();
1068
                this.phones = new HashSet<Phone>(2*_set4.size);
-
 
1069
                for (int _i5 = 0; _i5 < _set4.size; ++_i5)
-
 
1070
                {
-
 
1071
                  Phone _elem6;
-
 
1072
                  _elem6 = new Phone();
-
 
1073
                  _elem6.read(iprot);
-
 
1074
                  this.phones.add(_elem6);
-
 
1075
                }
-
 
1076
                iprot.readSetEnd();
-
 
1077
              }
-
 
1078
            } else { 
1170
            } else { 
1079
              TProtocolUtil.skip(iprot, field.type);
1171
              TProtocolUtil.skip(iprot, field.type);
1080
            }
1172
            }
1081
            break;
1173
            break;
1082
          case SOCIAL_HANDLES:
1174
          case SOCIAL_HANDLES:
Line 1088... Line 1180...
1088
            }
1180
            }
1089
            break;
1181
            break;
1090
          case ADDRESSES:
1182
          case ADDRESSES:
1091
            if (field.type == TType.LIST) {
1183
            if (field.type == TType.LIST) {
1092
              {
1184
              {
1093
                TList _list7 = iprot.readListBegin();
1185
                TList _list4 = iprot.readListBegin();
1094
                this.addresses = new ArrayList<Address>(_list7.size);
1186
                this.addresses = new ArrayList<Address>(_list4.size);
1095
                for (int _i8 = 0; _i8 < _list7.size; ++_i8)
1187
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
1096
                {
1188
                {
1097
                  Address _elem9;
1189
                  Address _elem6;
1098
                  _elem9 = new Address();
1190
                  _elem6 = new Address();
1099
                  _elem9.read(iprot);
1191
                  _elem6.read(iprot);
1100
                  this.addresses.add(_elem9);
1192
                  this.addresses.add(_elem6);
1101
                }
1193
                }
1102
                iprot.readListEnd();
1194
                iprot.readListEnd();
1103
              }
1195
              }
1104
            } else { 
1196
            } else { 
1105
              TProtocolUtil.skip(iprot, field.type);
1197
              TProtocolUtil.skip(iprot, field.type);
Line 1171... Line 1263...
1171
    if (this.name != null) {
1263
    if (this.name != null) {
1172
      oprot.writeFieldBegin(NAME_FIELD_DESC);
1264
      oprot.writeFieldBegin(NAME_FIELD_DESC);
1173
      oprot.writeString(this.name);
1265
      oprot.writeString(this.name);
1174
      oprot.writeFieldEnd();
1266
      oprot.writeFieldEnd();
1175
    }
1267
    }
-
 
1268
    if (this.dateOfBirth != null) {
1176
    oprot.writeFieldBegin(DATE_OF_BIRTH_FIELD_DESC);
1269
      oprot.writeFieldBegin(DATE_OF_BIRTH_FIELD_DESC);
1177
    oprot.writeI64(this.dateOfBirth);
1270
      oprot.writeString(this.dateOfBirth);
1178
    oprot.writeFieldEnd();
1271
      oprot.writeFieldEnd();
-
 
1272
    }
1179
    if (this.sex != null) {
1273
    if (this.sex != null) {
1180
      oprot.writeFieldBegin(SEX_FIELD_DESC);
1274
      oprot.writeFieldBegin(SEX_FIELD_DESC);
1181
      oprot.writeI32(this.sex.getValue());
1275
      oprot.writeI32(this.sex.getValue());
1182
      oprot.writeFieldEnd();
1276
      oprot.writeFieldEnd();
1183
    }
1277
    }
1184
    if (this.phones != null) {
1278
    if (this.mobileNumber != null) {
1185
      oprot.writeFieldBegin(PHONES_FIELD_DESC);
1279
      oprot.writeFieldBegin(MOBILE_NUMBER_FIELD_DESC);
1186
      {
-
 
1187
        oprot.writeSetBegin(new TSet(TType.STRUCT, this.phones.size()));
-
 
1188
        for (Phone _iter10 : this.phones)
-
 
1189
        {
-
 
1190
          _iter10.write(oprot);
-
 
1191
        }
-
 
1192
        oprot.writeSetEnd();
1280
      oprot.writeString(this.mobileNumber);
1193
      }
-
 
1194
      oprot.writeFieldEnd();
1281
      oprot.writeFieldEnd();
1195
    }
1282
    }
1196
    if (this.socialHandles != null) {
1283
    if (this.socialHandles != null) {
1197
      oprot.writeFieldBegin(SOCIAL_HANDLES_FIELD_DESC);
1284
      oprot.writeFieldBegin(SOCIAL_HANDLES_FIELD_DESC);
1198
      this.socialHandles.write(oprot);
1285
      this.socialHandles.write(oprot);
Line 1200... Line 1287...
1200
    }
1287
    }
1201
    if (this.addresses != null) {
1288
    if (this.addresses != null) {
1202
      oprot.writeFieldBegin(ADDRESSES_FIELD_DESC);
1289
      oprot.writeFieldBegin(ADDRESSES_FIELD_DESC);
1203
      {
1290
      {
1204
        oprot.writeListBegin(new TList(TType.STRUCT, this.addresses.size()));
1291
        oprot.writeListBegin(new TList(TType.STRUCT, this.addresses.size()));
1205
        for (Address _iter11 : this.addresses)
1292
        for (Address _iter7 : this.addresses)
1206
        {
1293
        {
1207
          _iter11.write(oprot);
1294
          _iter7.write(oprot);
1208
        }
1295
        }
1209
        oprot.writeListEnd();
1296
        oprot.writeListEnd();
1210
      }
1297
      }
1211
      oprot.writeFieldEnd();
1298
      oprot.writeFieldEnd();
1212
    }
1299
    }
Line 1265... Line 1352...
1265
      sb.append(this.name);
1352
      sb.append(this.name);
1266
    }
1353
    }
1267
    first = false;
1354
    first = false;
1268
    if (!first) sb.append(", ");
1355
    if (!first) sb.append(", ");
1269
    sb.append("dateOfBirth:");
1356
    sb.append("dateOfBirth:");
-
 
1357
    if (this.dateOfBirth == null) {
-
 
1358
      sb.append("null");
-
 
1359
    } else {
1270
    sb.append(this.dateOfBirth);
1360
      sb.append(this.dateOfBirth);
-
 
1361
    }
1271
    first = false;
1362
    first = false;
1272
    if (!first) sb.append(", ");
1363
    if (!first) sb.append(", ");
1273
    sb.append("sex:");
1364
    sb.append("sex:");
1274
    if (this.sex == null) {
1365
    if (this.sex == null) {
1275
      sb.append("null");
1366
      sb.append("null");
Line 1284... Line 1375...
1284
        sb.append(")");
1375
        sb.append(")");
1285
      }
1376
      }
1286
    }
1377
    }
1287
    first = false;
1378
    first = false;
1288
    if (!first) sb.append(", ");
1379
    if (!first) sb.append(", ");
1289
    sb.append("phones:");
1380
    sb.append("mobileNumber:");
1290
    if (this.phones == null) {
1381
    if (this.mobileNumber == null) {
1291
      sb.append("null");
1382
      sb.append("null");
1292
    } else {
1383
    } else {
1293
      sb.append(this.phones);
1384
      sb.append(this.mobileNumber);
1294
    }
1385
    }
1295
    first = false;
1386
    first = false;
1296
    if (!first) sb.append(", ");
1387
    if (!first) sb.append(", ");
1297
    sb.append("socialHandles:");
1388
    sb.append("socialHandles:");
1298
    if (this.socialHandles == null) {
1389
    if (this.socialHandles == null) {