From: Roland Haeder Date: Thu, 22 Oct 2015 08:01:41 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e1c19f6b0fcad3e117c27fa87a159652daf5d690;p=juser-activity-core.git Continued: - added last locked reason - updated jar(s) Signed-off-by:Roland Häder --- diff --git a/lib/jcontacts-core.jar b/lib/jcontacts-core.jar index 6b3619e..39ba8b2 100644 Binary files a/lib/jcontacts-core.jar and b/lib/jcontacts-core.jar differ diff --git a/src/org/mxchange/jusercore/model/user/LoginUser.java b/src/org/mxchange/jusercore/model/user/LoginUser.java index c8a56c4..b69c1db 100644 --- a/src/org/mxchange/jusercore/model/user/LoginUser.java +++ b/src/org/mxchange/jusercore/model/user/LoginUser.java @@ -29,6 +29,7 @@ import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Index; import javax.persistence.JoinColumn; +import javax.persistence.Lob; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.OneToOne; @@ -124,11 +125,18 @@ public class LoginUser implements User { private Long userId; /** - * "locked" timestamp + * Last "locked" timestamp */ @Temporal (TemporalType.TIMESTAMP) - @Column (name = "user_locked") - private Calendar userLocked; + @Column (name = "user_last_locked") + private Calendar userLastLocked; + + /** + * Last locked reason + */ + @Lob + @Column(name = "user_last_locked_reason") + private String lastLockedReason; /** * User name @@ -163,7 +171,7 @@ public class LoginUser implements User { this.setUserEncryptedPassword(user.getUserEncryptedPassword()); this.setUserAccountStatus(user.getUserAccountStatus()); this.setUserCreated(user.getUserCreated()); - this.setUserLocked(user.getUserLocked()); + this.setUserLastLocked(user.getUserLastLocked()); } @Override @@ -181,6 +189,16 @@ public class LoginUser implements User { (Objects.equals(this.getUserId(), other.getUserId()))); } + @Override + public String getLastLockedReason () { + return this.lastLockedReason; + } + + @Override + public void setLastLockedReason (final String lastLockedReason) { + this.lastLockedReason = lastLockedReason; + } + @Override public UserAccountStatus getUserAccountStatus () { return this.userAccountStatus; @@ -242,13 +260,13 @@ public class LoginUser implements User { } @Override - public Calendar getUserLocked () { - return this.userLocked; + public Calendar getUserLastLocked () { + return this.userLastLocked; } @Override - public void setUserLocked (final Calendar userLocked) { - this.userLocked = userLocked; + public void setUserLastLocked (final Calendar userLastLocked) { + this.userLastLocked = userLastLocked; } @Override diff --git a/src/org/mxchange/jusercore/model/user/User.java b/src/org/mxchange/jusercore/model/user/User.java index 9bc1e8f..04c7a37 100644 --- a/src/org/mxchange/jusercore/model/user/User.java +++ b/src/org/mxchange/jusercore/model/user/User.java @@ -125,14 +125,28 @@ public interface User extends Serializable { *

* @return "locked" timestamp */ - Calendar getUserLocked (); + Calendar getUserLastLocked (); /** * Getter for "locked" timestamp *

* @param userLocked "locked" timestamp */ - void setUserLocked (final Calendar userLocked); + void setUserLastLocked (final Calendar userLocked); + + /** + * Getter for reason of last locked + *

+ * @return Reason of last locked + */ + public String getLastLockedReason (); + + /** + * Setter for reason of last locked + *

+ * @param lastLockedReason Reason of last locked + */ + public void setLastLockedReason (final String lastLockedReason); /** * Getter for user name