Rev 7039 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
/*** Autogenerated by Thrift Compiler (0.7.0)** DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING*/package in.shop2020.model.v1.user;import java.util.List;import java.util.ArrayList;import java.util.Map;import java.util.HashMap;import java.util.EnumMap;import java.util.Set;import java.util.HashSet;import java.util.EnumSet;import java.util.Collections;import java.util.BitSet;import java.nio.ByteBuffer;import java.util.Arrays;import org.slf4j.Logger;import org.slf4j.LoggerFactory;/*** The user structure holding the basic information that identifies the user.* **/public class User implements org.apache.thrift.TBase<User, User._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("User");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);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);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);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);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);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);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);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);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);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);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);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);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);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);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);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);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);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);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);private static final org.apache.thrift.protocol.TField IS_FACEBOOK_USER_FIELD_DESC = new org.apache.thrift.protocol.TField("isFacebookUser", org.apache.thrift.protocol.TType.BOOL, (short)20);private static final org.apache.thrift.protocol.TField FACEBOOK_ACCESS_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("facebookAccessToken", org.apache.thrift.protocol.TType.STRING, (short)21);private static final org.apache.thrift.protocol.TField FACEBOOK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("facebookId", org.apache.thrift.protocol.TType.STRING, (short)22);private long userId; // requiredprivate String email; // requiredprivate String password; // requiredprivate String name; // requiredprivate String dateOfBirth; // requiredprivate Sex sex; // requiredprivate String mobileNumber; // requiredprivate long lastLogin; // requiredprivate long lastLogout; // requiredprivate long activeSince; // requiredprivate List<Address> addresses; // requiredprivate long defaultAddressId; // requiredprivate String communicationEmail; // requiredprivate long activeCartId; // requiredprivate String jsessionId; // requiredprivate boolean isAnonymous; // requiredprivate String source; // requiredprivate long sourceStartTime; // requiredprivate double trustLevel; // requiredprivate boolean isFacebookUser; // requiredprivate String facebookAccessToken; // requiredprivate String facebookId; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {USER_ID((short)1, "userId"),EMAIL((short)2, "email"),PASSWORD((short)3, "password"),NAME((short)4, "name"),DATE_OF_BIRTH((short)5, "dateOfBirth"),/**** @see Sex*/SEX((short)6, "sex"),MOBILE_NUMBER((short)7, "mobileNumber"),LAST_LOGIN((short)8, "lastLogin"),LAST_LOGOUT((short)9, "lastLogout"),ACTIVE_SINCE((short)10, "activeSince"),ADDRESSES((short)11, "addresses"),DEFAULT_ADDRESS_ID((short)12, "defaultAddressId"),COMMUNICATION_EMAIL((short)13, "communicationEmail"),ACTIVE_CART_ID((short)14, "activeCartId"),JSESSION_ID((short)15, "jsessionId"),IS_ANONYMOUS((short)16, "isAnonymous"),SOURCE((short)17, "source"),SOURCE_START_TIME((short)18, "sourceStartTime"),TRUST_LEVEL((short)19, "trustLevel"),IS_FACEBOOK_USER((short)20, "isFacebookUser"),FACEBOOK_ACCESS_TOKEN((short)21, "facebookAccessToken"),FACEBOOK_ID((short)22, "facebookId");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {switch(fieldId) {case 1: // USER_IDreturn USER_ID;case 2: // EMAILreturn EMAIL;case 3: // PASSWORDreturn PASSWORD;case 4: // NAMEreturn NAME;case 5: // DATE_OF_BIRTHreturn DATE_OF_BIRTH;case 6: // SEXreturn SEX;case 7: // MOBILE_NUMBERreturn MOBILE_NUMBER;case 8: // LAST_LOGINreturn LAST_LOGIN;case 9: // LAST_LOGOUTreturn LAST_LOGOUT;case 10: // ACTIVE_SINCEreturn ACTIVE_SINCE;case 11: // ADDRESSESreturn ADDRESSES;case 12: // DEFAULT_ADDRESS_IDreturn DEFAULT_ADDRESS_ID;case 13: // COMMUNICATION_EMAILreturn COMMUNICATION_EMAIL;case 14: // ACTIVE_CART_IDreturn ACTIVE_CART_ID;case 15: // JSESSION_IDreturn JSESSION_ID;case 16: // IS_ANONYMOUSreturn IS_ANONYMOUS;case 17: // SOURCEreturn SOURCE;case 18: // SOURCE_START_TIMEreturn SOURCE_START_TIME;case 19: // TRUST_LEVELreturn TRUST_LEVEL;case 20: // IS_FACEBOOK_USERreturn IS_FACEBOOK_USER;case 21: // FACEBOOK_ACCESS_TOKENreturn FACEBOOK_ACCESS_TOKEN;case 22: // FACEBOOK_IDreturn FACEBOOK_ID;default:return null;}}/*** Find the _Fields constant that matches fieldId, throwing an exception* if it is not found.*/public static _Fields findByThriftIdOrThrow(int fieldId) {_Fields fields = findByThriftId(fieldId);if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");return fields;}/*** Find the _Fields constant that matches name, or null if its not found.*/public static _Fields findByName(String name) {return byName.get(name);}private final short _thriftId;private final String _fieldName;_Fields(short thriftId, String fieldName) {_thriftId = thriftId;_fieldName = fieldName;}public short getThriftFieldId() {return _thriftId;}public String getFieldName() {return _fieldName;}}// isset id assignmentsprivate static final int __USERID_ISSET_ID = 0;private static final int __LASTLOGIN_ISSET_ID = 1;private static final int __LASTLOGOUT_ISSET_ID = 2;private static final int __ACTIVESINCE_ISSET_ID = 3;private static final int __DEFAULTADDRESSID_ISSET_ID = 4;private static final int __ACTIVECARTID_ISSET_ID = 5;private static final int __ISANONYMOUS_ISSET_ID = 6;private static final int __SOURCESTARTTIME_ISSET_ID = 7;private static final int __TRUSTLEVEL_ISSET_ID = 8;private static final int __ISFACEBOOKUSER_ISSET_ID = 9;private BitSet __isset_bit_vector = new BitSet(10);public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.EMAIL, new org.apache.thrift.meta_data.FieldMetaData("email", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.DATE_OF_BIRTH, new org.apache.thrift.meta_data.FieldMetaData("dateOfBirth", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.SEX, new org.apache.thrift.meta_data.FieldMetaData("sex", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, Sex.class)));tmpMap.put(_Fields.MOBILE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("mobileNumber", org.apache.thrift.TFieldRequirementType.OPTIONAL,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.LAST_LOGIN, new org.apache.thrift.meta_data.FieldMetaData("lastLogin", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.LAST_LOGOUT, new org.apache.thrift.meta_data.FieldMetaData("lastLogout", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.ACTIVE_SINCE, new org.apache.thrift.meta_data.FieldMetaData("activeSince", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.ADDRESSES, new org.apache.thrift.meta_data.FieldMetaData("addresses", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Address.class))));tmpMap.put(_Fields.DEFAULT_ADDRESS_ID, new org.apache.thrift.meta_data.FieldMetaData("defaultAddressId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.COMMUNICATION_EMAIL, new org.apache.thrift.meta_data.FieldMetaData("communicationEmail", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.ACTIVE_CART_ID, new org.apache.thrift.meta_data.FieldMetaData("activeCartId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.JSESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("jsessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.IS_ANONYMOUS, new org.apache.thrift.meta_data.FieldMetaData("isAnonymous", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));tmpMap.put(_Fields.SOURCE, new org.apache.thrift.meta_data.FieldMetaData("source", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.SOURCE_START_TIME, new org.apache.thrift.meta_data.FieldMetaData("sourceStartTime", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.TRUST_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("trustLevel", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));tmpMap.put(_Fields.IS_FACEBOOK_USER, new org.apache.thrift.meta_data.FieldMetaData("isFacebookUser", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));tmpMap.put(_Fields.FACEBOOK_ACCESS_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("facebookAccessToken", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.FACEBOOK_ID, new org.apache.thrift.meta_data.FieldMetaData("facebookId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(User.class, metaDataMap);}public User() {}public User(long userId,String email,String password,String name,String dateOfBirth,Sex sex,long lastLogin,long lastLogout,long activeSince,List<Address> addresses,long defaultAddressId,String communicationEmail,long activeCartId,String jsessionId,boolean isAnonymous,String source,long sourceStartTime,double trustLevel,boolean isFacebookUser,String facebookAccessToken,String facebookId){this();this.userId = userId;setUserIdIsSet(true);this.email = email;this.password = password;this.name = name;this.dateOfBirth = dateOfBirth;this.sex = sex;this.lastLogin = lastLogin;setLastLoginIsSet(true);this.lastLogout = lastLogout;setLastLogoutIsSet(true);this.activeSince = activeSince;setActiveSinceIsSet(true);this.addresses = addresses;this.defaultAddressId = defaultAddressId;setDefaultAddressIdIsSet(true);this.communicationEmail = communicationEmail;this.activeCartId = activeCartId;setActiveCartIdIsSet(true);this.jsessionId = jsessionId;this.isAnonymous = isAnonymous;setIsAnonymousIsSet(true);this.source = source;this.sourceStartTime = sourceStartTime;setSourceStartTimeIsSet(true);this.trustLevel = trustLevel;setTrustLevelIsSet(true);this.isFacebookUser = isFacebookUser;setIsFacebookUserIsSet(true);this.facebookAccessToken = facebookAccessToken;this.facebookId = facebookId;}/*** Performs a deep copy on <i>other</i>.*/public User(User other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.userId = other.userId;if (other.isSetEmail()) {this.email = other.email;}if (other.isSetPassword()) {this.password = other.password;}if (other.isSetName()) {this.name = other.name;}if (other.isSetDateOfBirth()) {this.dateOfBirth = other.dateOfBirth;}if (other.isSetSex()) {this.sex = other.sex;}if (other.isSetMobileNumber()) {this.mobileNumber = other.mobileNumber;}this.lastLogin = other.lastLogin;this.lastLogout = other.lastLogout;this.activeSince = other.activeSince;if (other.isSetAddresses()) {List<Address> __this__addresses = new ArrayList<Address>();for (Address other_element : other.addresses) {__this__addresses.add(new Address(other_element));}this.addresses = __this__addresses;}this.defaultAddressId = other.defaultAddressId;if (other.isSetCommunicationEmail()) {this.communicationEmail = other.communicationEmail;}this.activeCartId = other.activeCartId;if (other.isSetJsessionId()) {this.jsessionId = other.jsessionId;}this.isAnonymous = other.isAnonymous;if (other.isSetSource()) {this.source = other.source;}this.sourceStartTime = other.sourceStartTime;this.trustLevel = other.trustLevel;this.isFacebookUser = other.isFacebookUser;if (other.isSetFacebookAccessToken()) {this.facebookAccessToken = other.facebookAccessToken;}if (other.isSetFacebookId()) {this.facebookId = other.facebookId;}}public User deepCopy() {return new User(this);}@Overridepublic void clear() {setUserIdIsSet(false);this.userId = 0;this.email = null;this.password = null;this.name = null;this.dateOfBirth = null;this.sex = null;this.mobileNumber = null;setLastLoginIsSet(false);this.lastLogin = 0;setLastLogoutIsSet(false);this.lastLogout = 0;setActiveSinceIsSet(false);this.activeSince = 0;this.addresses = null;setDefaultAddressIdIsSet(false);this.defaultAddressId = 0;this.communicationEmail = null;setActiveCartIdIsSet(false);this.activeCartId = 0;this.jsessionId = null;setIsAnonymousIsSet(false);this.isAnonymous = false;this.source = null;setSourceStartTimeIsSet(false);this.sourceStartTime = 0;setTrustLevelIsSet(false);this.trustLevel = 0.0;setIsFacebookUserIsSet(false);this.isFacebookUser = false;this.facebookAccessToken = null;this.facebookId = null;}public long getUserId() {return this.userId;}public void setUserId(long userId) {this.userId = userId;setUserIdIsSet(true);}public void unsetUserId() {__isset_bit_vector.clear(__USERID_ISSET_ID);}/** Returns true if field userId is set (has been assigned a value) and false otherwise */public boolean isSetUserId() {return __isset_bit_vector.get(__USERID_ISSET_ID);}public void setUserIdIsSet(boolean value) {__isset_bit_vector.set(__USERID_ISSET_ID, value);}public String getEmail() {return this.email;}public void setEmail(String email) {this.email = email;}public void unsetEmail() {this.email = null;}/** Returns true if field email is set (has been assigned a value) and false otherwise */public boolean isSetEmail() {return this.email != null;}public void setEmailIsSet(boolean value) {if (!value) {this.email = null;}}public String getPassword() {return this.password;}public void setPassword(String password) {this.password = password;}public void unsetPassword() {this.password = null;}/** Returns true if field password is set (has been assigned a value) and false otherwise */public boolean isSetPassword() {return this.password != null;}public void setPasswordIsSet(boolean value) {if (!value) {this.password = null;}}public String getName() {return this.name;}public void setName(String name) {this.name = name;}public void unsetName() {this.name = null;}/** Returns true if field name is set (has been assigned a value) and false otherwise */public boolean isSetName() {return this.name != null;}public void setNameIsSet(boolean value) {if (!value) {this.name = null;}}public String getDateOfBirth() {return this.dateOfBirth;}public void setDateOfBirth(String dateOfBirth) {this.dateOfBirth = dateOfBirth;}public void unsetDateOfBirth() {this.dateOfBirth = null;}/** Returns true if field dateOfBirth is set (has been assigned a value) and false otherwise */public boolean isSetDateOfBirth() {return this.dateOfBirth != null;}public void setDateOfBirthIsSet(boolean value) {if (!value) {this.dateOfBirth = null;}}/**** @see Sex*/public Sex getSex() {return this.sex;}/**** @see Sex*/public void setSex(Sex sex) {this.sex = sex;}public void unsetSex() {this.sex = null;}/** Returns true if field sex is set (has been assigned a value) and false otherwise */public boolean isSetSex() {return this.sex != null;}public void setSexIsSet(boolean value) {if (!value) {this.sex = null;}}public String getMobileNumber() {return this.mobileNumber;}public void setMobileNumber(String mobileNumber) {this.mobileNumber = mobileNumber;}public void unsetMobileNumber() {this.mobileNumber = null;}/** Returns true if field mobileNumber is set (has been assigned a value) and false otherwise */public boolean isSetMobileNumber() {return this.mobileNumber != null;}public void setMobileNumberIsSet(boolean value) {if (!value) {this.mobileNumber = null;}}public long getLastLogin() {return this.lastLogin;}public void setLastLogin(long lastLogin) {this.lastLogin = lastLogin;setLastLoginIsSet(true);}public void unsetLastLogin() {__isset_bit_vector.clear(__LASTLOGIN_ISSET_ID);}/** Returns true if field lastLogin is set (has been assigned a value) and false otherwise */public boolean isSetLastLogin() {return __isset_bit_vector.get(__LASTLOGIN_ISSET_ID);}public void setLastLoginIsSet(boolean value) {__isset_bit_vector.set(__LASTLOGIN_ISSET_ID, value);}public long getLastLogout() {return this.lastLogout;}public void setLastLogout(long lastLogout) {this.lastLogout = lastLogout;setLastLogoutIsSet(true);}public void unsetLastLogout() {__isset_bit_vector.clear(__LASTLOGOUT_ISSET_ID);}/** Returns true if field lastLogout is set (has been assigned a value) and false otherwise */public boolean isSetLastLogout() {return __isset_bit_vector.get(__LASTLOGOUT_ISSET_ID);}public void setLastLogoutIsSet(boolean value) {__isset_bit_vector.set(__LASTLOGOUT_ISSET_ID, value);}public long getActiveSince() {return this.activeSince;}public void setActiveSince(long activeSince) {this.activeSince = activeSince;setActiveSinceIsSet(true);}public void unsetActiveSince() {__isset_bit_vector.clear(__ACTIVESINCE_ISSET_ID);}/** Returns true if field activeSince is set (has been assigned a value) and false otherwise */public boolean isSetActiveSince() {return __isset_bit_vector.get(__ACTIVESINCE_ISSET_ID);}public void setActiveSinceIsSet(boolean value) {__isset_bit_vector.set(__ACTIVESINCE_ISSET_ID, value);}public int getAddressesSize() {return (this.addresses == null) ? 0 : this.addresses.size();}public java.util.Iterator<Address> getAddressesIterator() {return (this.addresses == null) ? null : this.addresses.iterator();}public void addToAddresses(Address elem) {if (this.addresses == null) {this.addresses = new ArrayList<Address>();}this.addresses.add(elem);}public List<Address> getAddresses() {return this.addresses;}public void setAddresses(List<Address> addresses) {this.addresses = addresses;}public void unsetAddresses() {this.addresses = null;}/** Returns true if field addresses is set (has been assigned a value) and false otherwise */public boolean isSetAddresses() {return this.addresses != null;}public void setAddressesIsSet(boolean value) {if (!value) {this.addresses = null;}}public long getDefaultAddressId() {return this.defaultAddressId;}public void setDefaultAddressId(long defaultAddressId) {this.defaultAddressId = defaultAddressId;setDefaultAddressIdIsSet(true);}public void unsetDefaultAddressId() {__isset_bit_vector.clear(__DEFAULTADDRESSID_ISSET_ID);}/** Returns true if field defaultAddressId is set (has been assigned a value) and false otherwise */public boolean isSetDefaultAddressId() {return __isset_bit_vector.get(__DEFAULTADDRESSID_ISSET_ID);}public void setDefaultAddressIdIsSet(boolean value) {__isset_bit_vector.set(__DEFAULTADDRESSID_ISSET_ID, value);}public String getCommunicationEmail() {return this.communicationEmail;}public void setCommunicationEmail(String communicationEmail) {this.communicationEmail = communicationEmail;}public void unsetCommunicationEmail() {this.communicationEmail = null;}/** Returns true if field communicationEmail is set (has been assigned a value) and false otherwise */public boolean isSetCommunicationEmail() {return this.communicationEmail != null;}public void setCommunicationEmailIsSet(boolean value) {if (!value) {this.communicationEmail = null;}}public long getActiveCartId() {return this.activeCartId;}public void setActiveCartId(long activeCartId) {this.activeCartId = activeCartId;setActiveCartIdIsSet(true);}public void unsetActiveCartId() {__isset_bit_vector.clear(__ACTIVECARTID_ISSET_ID);}/** Returns true if field activeCartId is set (has been assigned a value) and false otherwise */public boolean isSetActiveCartId() {return __isset_bit_vector.get(__ACTIVECARTID_ISSET_ID);}public void setActiveCartIdIsSet(boolean value) {__isset_bit_vector.set(__ACTIVECARTID_ISSET_ID, value);}public String getJsessionId() {return this.jsessionId;}public void setJsessionId(String jsessionId) {this.jsessionId = jsessionId;}public void unsetJsessionId() {this.jsessionId = null;}/** Returns true if field jsessionId is set (has been assigned a value) and false otherwise */public boolean isSetJsessionId() {return this.jsessionId != null;}public void setJsessionIdIsSet(boolean value) {if (!value) {this.jsessionId = null;}}public boolean isIsAnonymous() {return this.isAnonymous;}public void setIsAnonymous(boolean isAnonymous) {this.isAnonymous = isAnonymous;setIsAnonymousIsSet(true);}public void unsetIsAnonymous() {__isset_bit_vector.clear(__ISANONYMOUS_ISSET_ID);}/** Returns true if field isAnonymous is set (has been assigned a value) and false otherwise */public boolean isSetIsAnonymous() {return __isset_bit_vector.get(__ISANONYMOUS_ISSET_ID);}public void setIsAnonymousIsSet(boolean value) {__isset_bit_vector.set(__ISANONYMOUS_ISSET_ID, value);}public String getSource() {return this.source;}public void setSource(String source) {this.source = source;}public void unsetSource() {this.source = null;}/** Returns true if field source is set (has been assigned a value) and false otherwise */public boolean isSetSource() {return this.source != null;}public void setSourceIsSet(boolean value) {if (!value) {this.source = null;}}public long getSourceStartTime() {return this.sourceStartTime;}public void setSourceStartTime(long sourceStartTime) {this.sourceStartTime = sourceStartTime;setSourceStartTimeIsSet(true);}public void unsetSourceStartTime() {__isset_bit_vector.clear(__SOURCESTARTTIME_ISSET_ID);}/** Returns true if field sourceStartTime is set (has been assigned a value) and false otherwise */public boolean isSetSourceStartTime() {return __isset_bit_vector.get(__SOURCESTARTTIME_ISSET_ID);}public void setSourceStartTimeIsSet(boolean value) {__isset_bit_vector.set(__SOURCESTARTTIME_ISSET_ID, value);}public double getTrustLevel() {return this.trustLevel;}public void setTrustLevel(double trustLevel) {this.trustLevel = trustLevel;setTrustLevelIsSet(true);}public void unsetTrustLevel() {__isset_bit_vector.clear(__TRUSTLEVEL_ISSET_ID);}/** Returns true if field trustLevel is set (has been assigned a value) and false otherwise */public boolean isSetTrustLevel() {return __isset_bit_vector.get(__TRUSTLEVEL_ISSET_ID);}public void setTrustLevelIsSet(boolean value) {__isset_bit_vector.set(__TRUSTLEVEL_ISSET_ID, value);}public boolean isIsFacebookUser() {return this.isFacebookUser;}public void setIsFacebookUser(boolean isFacebookUser) {this.isFacebookUser = isFacebookUser;setIsFacebookUserIsSet(true);}public void unsetIsFacebookUser() {__isset_bit_vector.clear(__ISFACEBOOKUSER_ISSET_ID);}/** Returns true if field isFacebookUser is set (has been assigned a value) and false otherwise */public boolean isSetIsFacebookUser() {return __isset_bit_vector.get(__ISFACEBOOKUSER_ISSET_ID);}public void setIsFacebookUserIsSet(boolean value) {__isset_bit_vector.set(__ISFACEBOOKUSER_ISSET_ID, value);}public String getFacebookAccessToken() {return this.facebookAccessToken;}public void setFacebookAccessToken(String facebookAccessToken) {this.facebookAccessToken = facebookAccessToken;}public void unsetFacebookAccessToken() {this.facebookAccessToken = null;}/** Returns true if field facebookAccessToken is set (has been assigned a value) and false otherwise */public boolean isSetFacebookAccessToken() {return this.facebookAccessToken != null;}public void setFacebookAccessTokenIsSet(boolean value) {if (!value) {this.facebookAccessToken = null;}}public String getFacebookId() {return this.facebookId;}public void setFacebookId(String facebookId) {this.facebookId = facebookId;}public void unsetFacebookId() {this.facebookId = null;}/** Returns true if field facebookId is set (has been assigned a value) and false otherwise */public boolean isSetFacebookId() {return this.facebookId != null;}public void setFacebookIdIsSet(boolean value) {if (!value) {this.facebookId = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case USER_ID:if (value == null) {unsetUserId();} else {setUserId((Long)value);}break;case EMAIL:if (value == null) {unsetEmail();} else {setEmail((String)value);}break;case PASSWORD:if (value == null) {unsetPassword();} else {setPassword((String)value);}break;case NAME:if (value == null) {unsetName();} else {setName((String)value);}break;case DATE_OF_BIRTH:if (value == null) {unsetDateOfBirth();} else {setDateOfBirth((String)value);}break;case SEX:if (value == null) {unsetSex();} else {setSex((Sex)value);}break;case MOBILE_NUMBER:if (value == null) {unsetMobileNumber();} else {setMobileNumber((String)value);}break;case LAST_LOGIN:if (value == null) {unsetLastLogin();} else {setLastLogin((Long)value);}break;case LAST_LOGOUT:if (value == null) {unsetLastLogout();} else {setLastLogout((Long)value);}break;case ACTIVE_SINCE:if (value == null) {unsetActiveSince();} else {setActiveSince((Long)value);}break;case ADDRESSES:if (value == null) {unsetAddresses();} else {setAddresses((List<Address>)value);}break;case DEFAULT_ADDRESS_ID:if (value == null) {unsetDefaultAddressId();} else {setDefaultAddressId((Long)value);}break;case COMMUNICATION_EMAIL:if (value == null) {unsetCommunicationEmail();} else {setCommunicationEmail((String)value);}break;case ACTIVE_CART_ID:if (value == null) {unsetActiveCartId();} else {setActiveCartId((Long)value);}break;case JSESSION_ID:if (value == null) {unsetJsessionId();} else {setJsessionId((String)value);}break;case IS_ANONYMOUS:if (value == null) {unsetIsAnonymous();} else {setIsAnonymous((Boolean)value);}break;case SOURCE:if (value == null) {unsetSource();} else {setSource((String)value);}break;case SOURCE_START_TIME:if (value == null) {unsetSourceStartTime();} else {setSourceStartTime((Long)value);}break;case TRUST_LEVEL:if (value == null) {unsetTrustLevel();} else {setTrustLevel((Double)value);}break;case IS_FACEBOOK_USER:if (value == null) {unsetIsFacebookUser();} else {setIsFacebookUser((Boolean)value);}break;case FACEBOOK_ACCESS_TOKEN:if (value == null) {unsetFacebookAccessToken();} else {setFacebookAccessToken((String)value);}break;case FACEBOOK_ID:if (value == null) {unsetFacebookId();} else {setFacebookId((String)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case USER_ID:return Long.valueOf(getUserId());case EMAIL:return getEmail();case PASSWORD:return getPassword();case NAME:return getName();case DATE_OF_BIRTH:return getDateOfBirth();case SEX:return getSex();case MOBILE_NUMBER:return getMobileNumber();case LAST_LOGIN:return Long.valueOf(getLastLogin());case LAST_LOGOUT:return Long.valueOf(getLastLogout());case ACTIVE_SINCE:return Long.valueOf(getActiveSince());case ADDRESSES:return getAddresses();case DEFAULT_ADDRESS_ID:return Long.valueOf(getDefaultAddressId());case COMMUNICATION_EMAIL:return getCommunicationEmail();case ACTIVE_CART_ID:return Long.valueOf(getActiveCartId());case JSESSION_ID:return getJsessionId();case IS_ANONYMOUS:return Boolean.valueOf(isIsAnonymous());case SOURCE:return getSource();case SOURCE_START_TIME:return Long.valueOf(getSourceStartTime());case TRUST_LEVEL:return Double.valueOf(getTrustLevel());case IS_FACEBOOK_USER:return Boolean.valueOf(isIsFacebookUser());case FACEBOOK_ACCESS_TOKEN:return getFacebookAccessToken();case FACEBOOK_ID:return getFacebookId();}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case USER_ID:return isSetUserId();case EMAIL:return isSetEmail();case PASSWORD:return isSetPassword();case NAME:return isSetName();case DATE_OF_BIRTH:return isSetDateOfBirth();case SEX:return isSetSex();case MOBILE_NUMBER:return isSetMobileNumber();case LAST_LOGIN:return isSetLastLogin();case LAST_LOGOUT:return isSetLastLogout();case ACTIVE_SINCE:return isSetActiveSince();case ADDRESSES:return isSetAddresses();case DEFAULT_ADDRESS_ID:return isSetDefaultAddressId();case COMMUNICATION_EMAIL:return isSetCommunicationEmail();case ACTIVE_CART_ID:return isSetActiveCartId();case JSESSION_ID:return isSetJsessionId();case IS_ANONYMOUS:return isSetIsAnonymous();case SOURCE:return isSetSource();case SOURCE_START_TIME:return isSetSourceStartTime();case TRUST_LEVEL:return isSetTrustLevel();case IS_FACEBOOK_USER:return isSetIsFacebookUser();case FACEBOOK_ACCESS_TOKEN:return isSetFacebookAccessToken();case FACEBOOK_ID:return isSetFacebookId();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof User)return this.equals((User)that);return false;}public boolean equals(User that) {if (that == null)return false;boolean this_present_userId = true;boolean that_present_userId = true;if (this_present_userId || that_present_userId) {if (!(this_present_userId && that_present_userId))return false;if (this.userId != that.userId)return false;}boolean this_present_email = true && this.isSetEmail();boolean that_present_email = true && that.isSetEmail();if (this_present_email || that_present_email) {if (!(this_present_email && that_present_email))return false;if (!this.email.equals(that.email))return false;}boolean this_present_password = true && this.isSetPassword();boolean that_present_password = true && that.isSetPassword();if (this_present_password || that_present_password) {if (!(this_present_password && that_present_password))return false;if (!this.password.equals(that.password))return false;}boolean this_present_name = true && this.isSetName();boolean that_present_name = true && that.isSetName();if (this_present_name || that_present_name) {if (!(this_present_name && that_present_name))return false;if (!this.name.equals(that.name))return false;}boolean this_present_dateOfBirth = true && this.isSetDateOfBirth();boolean that_present_dateOfBirth = true && that.isSetDateOfBirth();if (this_present_dateOfBirth || that_present_dateOfBirth) {if (!(this_present_dateOfBirth && that_present_dateOfBirth))return false;if (!this.dateOfBirth.equals(that.dateOfBirth))return false;}boolean this_present_sex = true && this.isSetSex();boolean that_present_sex = true && that.isSetSex();if (this_present_sex || that_present_sex) {if (!(this_present_sex && that_present_sex))return false;if (!this.sex.equals(that.sex))return false;}boolean this_present_mobileNumber = true && this.isSetMobileNumber();boolean that_present_mobileNumber = true && that.isSetMobileNumber();if (this_present_mobileNumber || that_present_mobileNumber) {if (!(this_present_mobileNumber && that_present_mobileNumber))return false;if (!this.mobileNumber.equals(that.mobileNumber))return false;}boolean this_present_lastLogin = true;boolean that_present_lastLogin = true;if (this_present_lastLogin || that_present_lastLogin) {if (!(this_present_lastLogin && that_present_lastLogin))return false;if (this.lastLogin != that.lastLogin)return false;}boolean this_present_lastLogout = true;boolean that_present_lastLogout = true;if (this_present_lastLogout || that_present_lastLogout) {if (!(this_present_lastLogout && that_present_lastLogout))return false;if (this.lastLogout != that.lastLogout)return false;}boolean this_present_activeSince = true;boolean that_present_activeSince = true;if (this_present_activeSince || that_present_activeSince) {if (!(this_present_activeSince && that_present_activeSince))return false;if (this.activeSince != that.activeSince)return false;}boolean this_present_addresses = true && this.isSetAddresses();boolean that_present_addresses = true && that.isSetAddresses();if (this_present_addresses || that_present_addresses) {if (!(this_present_addresses && that_present_addresses))return false;if (!this.addresses.equals(that.addresses))return false;}boolean this_present_defaultAddressId = true;boolean that_present_defaultAddressId = true;if (this_present_defaultAddressId || that_present_defaultAddressId) {if (!(this_present_defaultAddressId && that_present_defaultAddressId))return false;if (this.defaultAddressId != that.defaultAddressId)return false;}boolean this_present_communicationEmail = true && this.isSetCommunicationEmail();boolean that_present_communicationEmail = true && that.isSetCommunicationEmail();if (this_present_communicationEmail || that_present_communicationEmail) {if (!(this_present_communicationEmail && that_present_communicationEmail))return false;if (!this.communicationEmail.equals(that.communicationEmail))return false;}boolean this_present_activeCartId = true;boolean that_present_activeCartId = true;if (this_present_activeCartId || that_present_activeCartId) {if (!(this_present_activeCartId && that_present_activeCartId))return false;if (this.activeCartId != that.activeCartId)return false;}boolean this_present_jsessionId = true && this.isSetJsessionId();boolean that_present_jsessionId = true && that.isSetJsessionId();if (this_present_jsessionId || that_present_jsessionId) {if (!(this_present_jsessionId && that_present_jsessionId))return false;if (!this.jsessionId.equals(that.jsessionId))return false;}boolean this_present_isAnonymous = true;boolean that_present_isAnonymous = true;if (this_present_isAnonymous || that_present_isAnonymous) {if (!(this_present_isAnonymous && that_present_isAnonymous))return false;if (this.isAnonymous != that.isAnonymous)return false;}boolean this_present_source = true && this.isSetSource();boolean that_present_source = true && that.isSetSource();if (this_present_source || that_present_source) {if (!(this_present_source && that_present_source))return false;if (!this.source.equals(that.source))return false;}boolean this_present_sourceStartTime = true;boolean that_present_sourceStartTime = true;if (this_present_sourceStartTime || that_present_sourceStartTime) {if (!(this_present_sourceStartTime && that_present_sourceStartTime))return false;if (this.sourceStartTime != that.sourceStartTime)return false;}boolean this_present_trustLevel = true;boolean that_present_trustLevel = true;if (this_present_trustLevel || that_present_trustLevel) {if (!(this_present_trustLevel && that_present_trustLevel))return false;if (this.trustLevel != that.trustLevel)return false;}boolean this_present_isFacebookUser = true;boolean that_present_isFacebookUser = true;if (this_present_isFacebookUser || that_present_isFacebookUser) {if (!(this_present_isFacebookUser && that_present_isFacebookUser))return false;if (this.isFacebookUser != that.isFacebookUser)return false;}boolean this_present_facebookAccessToken = true && this.isSetFacebookAccessToken();boolean that_present_facebookAccessToken = true && that.isSetFacebookAccessToken();if (this_present_facebookAccessToken || that_present_facebookAccessToken) {if (!(this_present_facebookAccessToken && that_present_facebookAccessToken))return false;if (!this.facebookAccessToken.equals(that.facebookAccessToken))return false;}boolean this_present_facebookId = true && this.isSetFacebookId();boolean that_present_facebookId = true && that.isSetFacebookId();if (this_present_facebookId || that_present_facebookId) {if (!(this_present_facebookId && that_present_facebookId))return false;if (!this.facebookId.equals(that.facebookId))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(User other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;User typedOther = (User)other;lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());if (lastComparison != 0) {return lastComparison;}if (isSetUserId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetEmail()).compareTo(typedOther.isSetEmail());if (lastComparison != 0) {return lastComparison;}if (isSetEmail()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.email, typedOther.email);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetPassword()).compareTo(typedOther.isSetPassword());if (lastComparison != 0) {return lastComparison;}if (isSetPassword()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, typedOther.password);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());if (lastComparison != 0) {return lastComparison;}if (isSetName()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetDateOfBirth()).compareTo(typedOther.isSetDateOfBirth());if (lastComparison != 0) {return lastComparison;}if (isSetDateOfBirth()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dateOfBirth, typedOther.dateOfBirth);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetSex()).compareTo(typedOther.isSetSex());if (lastComparison != 0) {return lastComparison;}if (isSetSex()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sex, typedOther.sex);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetMobileNumber()).compareTo(typedOther.isSetMobileNumber());if (lastComparison != 0) {return lastComparison;}if (isSetMobileNumber()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mobileNumber, typedOther.mobileNumber);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetLastLogin()).compareTo(typedOther.isSetLastLogin());if (lastComparison != 0) {return lastComparison;}if (isSetLastLogin()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastLogin, typedOther.lastLogin);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetLastLogout()).compareTo(typedOther.isSetLastLogout());if (lastComparison != 0) {return lastComparison;}if (isSetLastLogout()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastLogout, typedOther.lastLogout);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetActiveSince()).compareTo(typedOther.isSetActiveSince());if (lastComparison != 0) {return lastComparison;}if (isSetActiveSince()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activeSince, typedOther.activeSince);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetAddresses()).compareTo(typedOther.isSetAddresses());if (lastComparison != 0) {return lastComparison;}if (isSetAddresses()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addresses, typedOther.addresses);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetDefaultAddressId()).compareTo(typedOther.isSetDefaultAddressId());if (lastComparison != 0) {return lastComparison;}if (isSetDefaultAddressId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultAddressId, typedOther.defaultAddressId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetCommunicationEmail()).compareTo(typedOther.isSetCommunicationEmail());if (lastComparison != 0) {return lastComparison;}if (isSetCommunicationEmail()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.communicationEmail, typedOther.communicationEmail);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetActiveCartId()).compareTo(typedOther.isSetActiveCartId());if (lastComparison != 0) {return lastComparison;}if (isSetActiveCartId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activeCartId, typedOther.activeCartId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetJsessionId()).compareTo(typedOther.isSetJsessionId());if (lastComparison != 0) {return lastComparison;}if (isSetJsessionId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jsessionId, typedOther.jsessionId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetIsAnonymous()).compareTo(typedOther.isSetIsAnonymous());if (lastComparison != 0) {return lastComparison;}if (isSetIsAnonymous()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAnonymous, typedOther.isAnonymous);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetSource()).compareTo(typedOther.isSetSource());if (lastComparison != 0) {return lastComparison;}if (isSetSource()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source, typedOther.source);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetSourceStartTime()).compareTo(typedOther.isSetSourceStartTime());if (lastComparison != 0) {return lastComparison;}if (isSetSourceStartTime()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sourceStartTime, typedOther.sourceStartTime);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetTrustLevel()).compareTo(typedOther.isSetTrustLevel());if (lastComparison != 0) {return lastComparison;}if (isSetTrustLevel()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.trustLevel, typedOther.trustLevel);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetIsFacebookUser()).compareTo(typedOther.isSetIsFacebookUser());if (lastComparison != 0) {return lastComparison;}if (isSetIsFacebookUser()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isFacebookUser, typedOther.isFacebookUser);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetFacebookAccessToken()).compareTo(typedOther.isSetFacebookAccessToken());if (lastComparison != 0) {return lastComparison;}if (isSetFacebookAccessToken()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.facebookAccessToken, typedOther.facebookAccessToken);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetFacebookId()).compareTo(typedOther.isSetFacebookId());if (lastComparison != 0) {return lastComparison;}if (isSetFacebookId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.facebookId, typedOther.facebookId);if (lastComparison != 0) {return lastComparison;}}return 0;}public _Fields fieldForId(int fieldId) {return _Fields.findByThriftId(fieldId);}public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 1: // USER_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.userId = iprot.readI64();setUserIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // EMAILif (field.type == org.apache.thrift.protocol.TType.STRING) {this.email = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // PASSWORDif (field.type == org.apache.thrift.protocol.TType.STRING) {this.password = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 4: // NAMEif (field.type == org.apache.thrift.protocol.TType.STRING) {this.name = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 5: // DATE_OF_BIRTHif (field.type == org.apache.thrift.protocol.TType.STRING) {this.dateOfBirth = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 6: // SEXif (field.type == org.apache.thrift.protocol.TType.I32) {this.sex = Sex.findByValue(iprot.readI32());} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 7: // MOBILE_NUMBERif (field.type == org.apache.thrift.protocol.TType.STRING) {this.mobileNumber = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 8: // LAST_LOGINif (field.type == org.apache.thrift.protocol.TType.I64) {this.lastLogin = iprot.readI64();setLastLoginIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 9: // LAST_LOGOUTif (field.type == org.apache.thrift.protocol.TType.I64) {this.lastLogout = iprot.readI64();setLastLogoutIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 10: // ACTIVE_SINCEif (field.type == org.apache.thrift.protocol.TType.I64) {this.activeSince = iprot.readI64();setActiveSinceIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 11: // ADDRESSESif (field.type == org.apache.thrift.protocol.TType.LIST) {{org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();this.addresses = new ArrayList<Address>(_list0.size);for (int _i1 = 0; _i1 < _list0.size; ++_i1){Address _elem2; // required_elem2 = new Address();_elem2.read(iprot);this.addresses.add(_elem2);}iprot.readListEnd();}} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 12: // DEFAULT_ADDRESS_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.defaultAddressId = iprot.readI64();setDefaultAddressIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 13: // COMMUNICATION_EMAILif (field.type == org.apache.thrift.protocol.TType.STRING) {this.communicationEmail = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 14: // ACTIVE_CART_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.activeCartId = iprot.readI64();setActiveCartIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 15: // JSESSION_IDif (field.type == org.apache.thrift.protocol.TType.STRING) {this.jsessionId = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 16: // IS_ANONYMOUSif (field.type == org.apache.thrift.protocol.TType.BOOL) {this.isAnonymous = iprot.readBool();setIsAnonymousIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 17: // SOURCEif (field.type == org.apache.thrift.protocol.TType.STRING) {this.source = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 18: // SOURCE_START_TIMEif (field.type == org.apache.thrift.protocol.TType.I64) {this.sourceStartTime = iprot.readI64();setSourceStartTimeIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 19: // TRUST_LEVELif (field.type == org.apache.thrift.protocol.TType.DOUBLE) {this.trustLevel = iprot.readDouble();setTrustLevelIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 20: // IS_FACEBOOK_USERif (field.type == org.apache.thrift.protocol.TType.BOOL) {this.isFacebookUser = iprot.readBool();setIsFacebookUserIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 21: // FACEBOOK_ACCESS_TOKENif (field.type == org.apache.thrift.protocol.TType.STRING) {this.facebookAccessToken = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 22: // FACEBOOK_IDif (field.type == org.apache.thrift.protocol.TType.STRING) {this.facebookId = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {validate();oprot.writeStructBegin(STRUCT_DESC);oprot.writeFieldBegin(USER_ID_FIELD_DESC);oprot.writeI64(this.userId);oprot.writeFieldEnd();if (this.email != null) {oprot.writeFieldBegin(EMAIL_FIELD_DESC);oprot.writeString(this.email);oprot.writeFieldEnd();}if (this.password != null) {oprot.writeFieldBegin(PASSWORD_FIELD_DESC);oprot.writeString(this.password);oprot.writeFieldEnd();}if (this.name != null) {oprot.writeFieldBegin(NAME_FIELD_DESC);oprot.writeString(this.name);oprot.writeFieldEnd();}if (this.dateOfBirth != null) {oprot.writeFieldBegin(DATE_OF_BIRTH_FIELD_DESC);oprot.writeString(this.dateOfBirth);oprot.writeFieldEnd();}if (this.sex != null) {oprot.writeFieldBegin(SEX_FIELD_DESC);oprot.writeI32(this.sex.getValue());oprot.writeFieldEnd();}if (this.mobileNumber != null) {if (isSetMobileNumber()) {oprot.writeFieldBegin(MOBILE_NUMBER_FIELD_DESC);oprot.writeString(this.mobileNumber);oprot.writeFieldEnd();}}oprot.writeFieldBegin(LAST_LOGIN_FIELD_DESC);oprot.writeI64(this.lastLogin);oprot.writeFieldEnd();oprot.writeFieldBegin(LAST_LOGOUT_FIELD_DESC);oprot.writeI64(this.lastLogout);oprot.writeFieldEnd();oprot.writeFieldBegin(ACTIVE_SINCE_FIELD_DESC);oprot.writeI64(this.activeSince);oprot.writeFieldEnd();if (this.addresses != null) {oprot.writeFieldBegin(ADDRESSES_FIELD_DESC);{oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.addresses.size()));for (Address _iter3 : this.addresses){_iter3.write(oprot);}oprot.writeListEnd();}oprot.writeFieldEnd();}oprot.writeFieldBegin(DEFAULT_ADDRESS_ID_FIELD_DESC);oprot.writeI64(this.defaultAddressId);oprot.writeFieldEnd();if (this.communicationEmail != null) {oprot.writeFieldBegin(COMMUNICATION_EMAIL_FIELD_DESC);oprot.writeString(this.communicationEmail);oprot.writeFieldEnd();}oprot.writeFieldBegin(ACTIVE_CART_ID_FIELD_DESC);oprot.writeI64(this.activeCartId);oprot.writeFieldEnd();if (this.jsessionId != null) {oprot.writeFieldBegin(JSESSION_ID_FIELD_DESC);oprot.writeString(this.jsessionId);oprot.writeFieldEnd();}oprot.writeFieldBegin(IS_ANONYMOUS_FIELD_DESC);oprot.writeBool(this.isAnonymous);oprot.writeFieldEnd();if (this.source != null) {oprot.writeFieldBegin(SOURCE_FIELD_DESC);oprot.writeString(this.source);oprot.writeFieldEnd();}oprot.writeFieldBegin(SOURCE_START_TIME_FIELD_DESC);oprot.writeI64(this.sourceStartTime);oprot.writeFieldEnd();oprot.writeFieldBegin(TRUST_LEVEL_FIELD_DESC);oprot.writeDouble(this.trustLevel);oprot.writeFieldEnd();oprot.writeFieldBegin(IS_FACEBOOK_USER_FIELD_DESC);oprot.writeBool(this.isFacebookUser);oprot.writeFieldEnd();if (this.facebookAccessToken != null) {oprot.writeFieldBegin(FACEBOOK_ACCESS_TOKEN_FIELD_DESC);oprot.writeString(this.facebookAccessToken);oprot.writeFieldEnd();}if (this.facebookId != null) {oprot.writeFieldBegin(FACEBOOK_ID_FIELD_DESC);oprot.writeString(this.facebookId);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("User(");boolean first = true;sb.append("userId:");sb.append(this.userId);first = false;if (!first) sb.append(", ");sb.append("email:");if (this.email == null) {sb.append("null");} else {sb.append(this.email);}first = false;if (!first) sb.append(", ");sb.append("password:");if (this.password == null) {sb.append("null");} else {sb.append(this.password);}first = false;if (!first) sb.append(", ");sb.append("name:");if (this.name == null) {sb.append("null");} else {sb.append(this.name);}first = false;if (!first) sb.append(", ");sb.append("dateOfBirth:");if (this.dateOfBirth == null) {sb.append("null");} else {sb.append(this.dateOfBirth);}first = false;if (!first) sb.append(", ");sb.append("sex:");if (this.sex == null) {sb.append("null");} else {sb.append(this.sex);}first = false;if (isSetMobileNumber()) {if (!first) sb.append(", ");sb.append("mobileNumber:");if (this.mobileNumber == null) {sb.append("null");} else {sb.append(this.mobileNumber);}first = false;}if (!first) sb.append(", ");sb.append("lastLogin:");sb.append(this.lastLogin);first = false;if (!first) sb.append(", ");sb.append("lastLogout:");sb.append(this.lastLogout);first = false;if (!first) sb.append(", ");sb.append("activeSince:");sb.append(this.activeSince);first = false;if (!first) sb.append(", ");sb.append("addresses:");if (this.addresses == null) {sb.append("null");} else {sb.append(this.addresses);}first = false;if (!first) sb.append(", ");sb.append("defaultAddressId:");sb.append(this.defaultAddressId);first = false;if (!first) sb.append(", ");sb.append("communicationEmail:");if (this.communicationEmail == null) {sb.append("null");} else {sb.append(this.communicationEmail);}first = false;if (!first) sb.append(", ");sb.append("activeCartId:");sb.append(this.activeCartId);first = false;if (!first) sb.append(", ");sb.append("jsessionId:");if (this.jsessionId == null) {sb.append("null");} else {sb.append(this.jsessionId);}first = false;if (!first) sb.append(", ");sb.append("isAnonymous:");sb.append(this.isAnonymous);first = false;if (!first) sb.append(", ");sb.append("source:");if (this.source == null) {sb.append("null");} else {sb.append(this.source);}first = false;if (!first) sb.append(", ");sb.append("sourceStartTime:");sb.append(this.sourceStartTime);first = false;if (!first) sb.append(", ");sb.append("trustLevel:");sb.append(this.trustLevel);first = false;if (!first) sb.append(", ");sb.append("isFacebookUser:");sb.append(this.isFacebookUser);first = false;if (!first) sb.append(", ");sb.append("facebookAccessToken:");if (this.facebookAccessToken == null) {sb.append("null");} else {sb.append(this.facebookAccessToken);}first = false;if (!first) sb.append(", ");sb.append("facebookId:");if (this.facebookId == null) {sb.append("null");} else {sb.append(this.facebookId);}first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {try {write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {try {// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.__isset_bit_vector = new BitSet(1);read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}}