]> git.mxchange.org Git - juser-core.git/commitdiff
sorted members + added this.
authorRoland Haeder <roland@mxchange.org>
Wed, 24 Feb 2016 12:19:00 +0000 (13:19 +0100)
committerRoland Haeder <roland@mxchange.org>
Wed, 24 Feb 2016 12:19:00 +0000 (13:19 +0100)
src/org/mxchange/jusercore/model/user/LoginUser.java
src/org/mxchange/jusercore/model/user/profilemodes/ProfileMode.java

index 182ac68675995120a0252c5da207a881a8cce7a9..88f182365af9acc450248823608901d537940d32 100644 (file)
@@ -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;
-       }
 }
index 5144c25cd58f843f77fe607be2a0f8bc594997fa..42ce8e66a2fc40a3a3212863b2dca0e9904652f9 100644 (file)
@@ -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)
         */