From: Roland Haeder Date: Wed, 24 Feb 2016 12:19:00 +0000 (+0100) Subject: sorted members + added this. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f1177cb0a4a5b55b12f5432c0d3d648bef0309cb;p=juser-core.git sorted members + added this. --- diff --git a/src/org/mxchange/jusercore/model/user/LoginUser.java b/src/org/mxchange/jusercore/model/user/LoginUser.java index 182ac68..88f1823 100644 --- a/src/org/mxchange/jusercore/model/user/LoginUser.java +++ b/src/org/mxchange/jusercore/model/user/LoginUser.java @@ -81,6 +81,13 @@ public class LoginUser implements User { */ private static final long serialVersionUID = 4_328_454_581_751L; + /** + * Last locked reason + */ + @Lob + @Column (name = "user_last_locked_reason") + private String lastLockedReason; + /** * Account status */ @@ -131,26 +138,12 @@ public class LoginUser implements User { @Column (name = "user_last_locked_timestamp") private Calendar userLastLocked; - /** - * Last locked reason - */ - @Lob - @Column (name = "user_last_locked_reason") - private String lastLockedReason; - /** * User name */ @Column (name = "user_name", nullable = false, length = 20) private String userName; - /** - * When this user has been updated - */ - @Temporal (TemporalType.TIMESTAMP) - @Column (name = "user_updated") - private Calendar userUpdated; - /** * Profile mode of this user */ @@ -159,6 +152,13 @@ public class LoginUser implements User { @Column (name = "user_profile_mode", nullable = false) private ProfileMode userProfileMode; + /** + * When this user has been updated + */ + @Temporal (TemporalType.TIMESTAMP) + @Column (name = "user_updated") + private Calendar userUpdated; + /** * Default constructor */ @@ -186,7 +186,7 @@ public class LoginUser implements User { if (object == null) { return false; } - if (getClass() != object.getClass()) { + if (this.getClass() != object.getClass()) { return false; } @@ -196,6 +196,14 @@ public class LoginUser implements User { (Objects.equals(this.getUserId(), other.getUserId()))); } + @Override + public int hashCode () { + int hash = 5; + hash = 83 * hash + Objects.hashCode(this.getUserName()); + hash = 83 * hash + Objects.hashCode(this.getUserId()); + return hash; + } + @Override public String getLastLockedReason () { return this.lastLockedReason; @@ -306,11 +314,4 @@ public class LoginUser implements User { this.userUpdated = userUpdated; } - @Override - public int hashCode () { - int hash = 5; - hash = 83 * hash + Objects.hashCode(this.getUserName()); - hash = 83 * hash + Objects.hashCode(this.getUserId()); - return hash; - } } diff --git a/src/org/mxchange/jusercore/model/user/profilemodes/ProfileMode.java b/src/org/mxchange/jusercore/model/user/profilemodes/ProfileMode.java index 5144c25..42ce8e6 100644 --- a/src/org/mxchange/jusercore/model/user/profilemodes/ProfileMode.java +++ b/src/org/mxchange/jusercore/model/user/profilemodes/ProfileMode.java @@ -29,10 +29,12 @@ public enum ProfileMode implements Serializable { * Invisible to guests and members (not administrators) */ INVISIBLE("USER_PROFILE_MODE_INVISIBLE"), //NOI18N + /** * Only visible to members (and administrators) */ MEMBERS("USER_PROFILE_MODE_MEMBERS"), //NOI18N + /** * Visible to all (public in Internet) */