]> git.mxchange.org Git - juser-core.git/commitdiff
Continued:
authorRoland Haeder <roland@mxchange.org>
Thu, 22 Oct 2015 08:01:41 +0000 (10:01 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 22 Oct 2015 08:01:41 +0000 (10:01 +0200)
- added last locked reason
- updated jar(s)
Signed-off-by:Roland Häder <roland@mxchange.org>

lib/jcontacts-core.jar
src/org/mxchange/jusercore/model/user/LoginUser.java
src/org/mxchange/jusercore/model/user/User.java

index 6b3619e1b879be6ab4b7b20ecf765dde842559b6..39ba8b2afd0485a67193d21df02299ba987fe176 100644 (file)
Binary files a/lib/jcontacts-core.jar and b/lib/jcontacts-core.jar differ
index c8a56c472b961c6d0cabe4f16fa1921fd4e3c683..b69c1db52ecf5ef6c4ebb96cef7e29bfa57dd483 100644 (file)
@@ -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
index 9bc1e8ff290a246500c58fcbad5db8efbc6286ba..04c7a37f1f99c68173246ce5aa264354054e8513 100644 (file)
@@ -125,14 +125,28 @@ public interface User extends Serializable {
         * <p>
         * @return "locked" timestamp
         */
-       Calendar getUserLocked ();
+       Calendar getUserLastLocked ();
 
        /**
         * Getter for "locked" timestamp
         * <p>
         * @param userLocked "locked" timestamp
         */
-       void setUserLocked (final Calendar userLocked);
+       void setUserLastLocked (final Calendar userLocked);
+
+       /**
+        * Getter for reason of last locked
+        * <p>
+        * @return Reason of last locked
+        */
+       public String getLastLockedReason ();
+
+       /**
+        * Setter for reason of last locked
+        * <p>
+        * @param lastLockedReason Reason of last locked
+        */
+       public void setLastLockedReason (final String lastLockedReason);
 
        /**
         * Getter for user name