From bddee887c8632a6c99bb7ee696e0ef3a44dfcf7d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 1 Aug 2016 14:39:39 +0200 Subject: [PATCH] added column to save whether the user should change password (to new) after login (with old). --- .../jusercore/model/user/LoginUser.java | 18 +++++++++++++++++- .../mxchange/jusercore/model/user/User.java | 14 ++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/org/mxchange/jusercore/model/user/LoginUser.java b/src/org/mxchange/jusercore/model/user/LoginUser.java index 155f413..ebd11a4 100644 --- a/src/org/mxchange/jusercore/model/user/LoginUser.java +++ b/src/org/mxchange/jusercore/model/user/LoginUser.java @@ -135,9 +135,15 @@ public class LoginUser implements User { /** * User locale */ - @Column(name = "user_locale") + @Column (name = "user_locale") private Locale userLocale; + /** + * Whether the user must change password after login + */ + @Column (name = "user_must_change_password") + private Boolean userMustChangePassword; + /** * User name */ @@ -296,6 +302,16 @@ public class LoginUser implements User { this.userLocale = userLocale; } + @Override + public Boolean getUserMustChangePassword () { + return this.userMustChangePassword; + } + + @Override + public void setUserMustChangePassword (final Boolean userMustChangePassword) { + this.userMustChangePassword = userMustChangePassword; + } + @Override public String getUserName () { return this.userName; diff --git a/src/org/mxchange/jusercore/model/user/User.java b/src/org/mxchange/jusercore/model/user/User.java index 8bdd4c7..4bb0f05 100644 --- a/src/org/mxchange/jusercore/model/user/User.java +++ b/src/org/mxchange/jusercore/model/user/User.java @@ -205,6 +205,20 @@ public interface User extends Serializable { */ void setUserLocale (final Locale userLocale); + /** + * Getter for flag if user needs to change password + *

+ * @return Flag if user needs to change password + */ + Boolean getUserMustChangePassword (); + + /** + * Setter for flag if user needs to change password + *

+ * @param userMustChangePassword Flag if user needs to change password + */ + void setUserMustChangePassword (final Boolean userMustChangePassword); + @Override boolean equals (final Object object); -- 2.39.5