]> git.mxchange.org Git - juser-login-core.git/commitdiff
added timestamp when the user has updated profile
authorRoland Haeder <roland@mxchange.org>
Thu, 22 Oct 2015 08:06:00 +0000 (10:06 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 22 Oct 2015 08:06:00 +0000 (10:06 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/org/mxchange/jusercore/model/user/LoginUser.java
src/org/mxchange/jusercore/model/user/User.java

index b69c1db52ecf5ef6c4ebb96cef7e29bfa57dd483..71746d3d1b850ba4d67e4716a634a53f0dd2ed44 100644 (file)
@@ -135,7 +135,7 @@ public class LoginUser implements User {
         * Last locked reason
         */
        @Lob
-       @Column(name = "user_last_locked_reason")
+       @Column (name = "user_last_locked_reason")
        private String lastLockedReason;
 
        /**
@@ -144,6 +144,13 @@ public class LoginUser implements User {
        @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
         */
@@ -185,8 +192,8 @@ public class LoginUser implements User {
 
                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
@@ -289,6 +296,16 @@ public class LoginUser implements User {
                this.userProfileMode = userProfileMode;
        }
 
+       @Override
+       public Calendar getUserUpdated () {
+               return this.userUpdated;
+       }
+
+       @Override
+       public void setUserUpdated (final Calendar userUpdated) {
+               this.userUpdated = userUpdated;
+       }
+
        @Override
        public int hashCode () {
                int hash = 5;
index 04c7a37f1f99c68173246ce5aa264354054e8513..993dc358b2435dacb4f2b75c239b3593d1b1883c 100644 (file)
@@ -176,6 +176,20 @@ public interface User extends Serializable {
         */
        void setUserProfileMode (final ProfileMode userPublicProfile);
 
+       /**
+        * Getter for updated timestamp
+        * <p>
+        * @return Updated timestamp
+        */
+       Calendar getUserUpdated ();
+
+       /**
+        * Setter for updated timestamp
+        * <p>
+        * @param userUpdated Updated timestamp
+        */
+       void setUserUpdated (final Calendar userUpdated);
+
        /**
         * Checks if object is a User instance and whether it matches with this
         * object.