import javax.persistence.TemporalType;
import org.mxchange.jcontacts.contact.Contact;
import org.mxchange.jcontacts.contact.UserContact;
+import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
import org.mxchange.jusercore.model.user.status.UserAccountStatus;
/**
private String userName;
/**
- * Whether the user wants a public profile. This means that it can be viewed
- * from the Internet by everyone (only profile, no personal data, this needs
- * explicit agreement) and it can be found for sharing addresses with.
+ * Profile mode of this user
*/
@Basic (optional = false)
- @Column (name = "user_public_profile_flag", nullable = false)
- private Boolean userPublicProfile;
+ @Enumerated (EnumType.STRING)
+ @Column (name = "user_profile_mode", nullable = false)
+ private ProfileMode userProfileMode;
/**
* Default constructor
*/
public LoginUser () {
- // Default is not public
- this.userPublicProfile = Boolean.FALSE;
+ // Default is invisible
+ this.userProfileMode = ProfileMode.INVISIBLE;
}
@Override
final User other = (User) object;
- return ((Objects.equals(this.getUserName(), other.getUserName()))
- && (Objects.equals(this.getUserId(), other.getUserId())));
+ return ((Objects.equals(this.getUserName(), other.getUserName())) &&
+ (Objects.equals(this.getUserId(), other.getUserId())));
}
@Override
}
@Override
- public Boolean getUserPublicProfile () {
- return this.userPublicProfile;
+ public ProfileMode getUserProfileMode () {
+ return this.userProfileMode;
}
@Override
- public void setUserPublicProfile (final Boolean userPublicProfile) {
- this.userPublicProfile = userPublicProfile;
+ public void setUserProfileMode (final ProfileMode userProfileMode) {
+ this.userProfileMode = userProfileMode;
}
@Override