From: Roland Haeder Date: Thu, 22 Oct 2015 08:06:00 +0000 (+0200) Subject: added timestamp when the user has updated profile X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7f8973e0199a9deea042f802a956bab53a0190db;p=juser-login-core.git added timestamp when the user has updated profile Signed-off-by:Roland Häder --- diff --git a/src/org/mxchange/jusercore/model/user/LoginUser.java b/src/org/mxchange/jusercore/model/user/LoginUser.java index b69c1db..71746d3 100644 --- a/src/org/mxchange/jusercore/model/user/LoginUser.java +++ b/src/org/mxchange/jusercore/model/user/LoginUser.java @@ -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; diff --git a/src/org/mxchange/jusercore/model/user/User.java b/src/org/mxchange/jusercore/model/user/User.java index 04c7a37..993dc35 100644 --- a/src/org/mxchange/jusercore/model/user/User.java +++ b/src/org/mxchange/jusercore/model/user/User.java @@ -176,6 +176,20 @@ public interface User extends Serializable { */ void setUserProfileMode (final ProfileMode userPublicProfile); + /** + * Getter for updated timestamp + *

+ * @return Updated timestamp + */ + Calendar getUserUpdated (); + + /** + * Setter for updated timestamp + *

+ * @param userUpdated Updated timestamp + */ + void setUserUpdated (final Calendar userUpdated); + /** * Checks if object is a User instance and whether it matches with this * object.