]> git.mxchange.org Git - juser-core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Tue, 19 May 2020 22:57:00 +0000 (00:57 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 19 May 2020 22:57:00 +0000 (00:57 +0200)
- renamed userCreated to userEntryCreated
- renamed userUpdated to userEntryUpdated

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
src/org/mxchange/jusercore/model/user/Users.java

index ba6e47ce90499fe596e76af6dae57518039fc9cf..bf8c7ab64e69e0312f92c9b8c45cde25f2baee30 100644 (file)
@@ -93,19 +93,26 @@ public class LoginUser implements User {
        private Contact userContact;
 
        /**
-        * "created" timestamp
+        * Encrypted password
         */
        @Basic (optional = false)
-       @Temporal (TemporalType.TIMESTAMP)
-       @Column (name = "user_created", nullable = false, updatable = false)
-       private Date userCreated;
+       @Column (name = "user_encrypted_password", nullable = false)
+       private String userEncryptedPassword;
 
        /**
-        * Encrypted password
+        * When this user entry has been created
         */
        @Basic (optional = false)
-       @Column (name = "user_encrypted_password", nullable = false)
-       private String userEncryptedPassword;
+       @Temporal (TemporalType.TIMESTAMP)
+       @Column (name = "user_entry_created", nullable = false, updatable = false)
+       private Date userEntryCreated;
+
+       /**
+        * When this user entry has been updated
+        */
+       @Temporal (TemporalType.TIMESTAMP)
+       @Column (name = "user_entry_updated", insertable = false)
+       private Date userEntryUpdated;
 
        /**
         * User id
@@ -157,13 +164,6 @@ public class LoginUser implements User {
        @Column (name = "user_profile_mode", nullable = false)
        private ProfileMode userProfileMode;
 
-       /**
-        * When this user has been updated
-        */
-       @Temporal (TemporalType.TIMESTAMP)
-       @Column (name = "user_updated", insertable = false)
-       private Date userUpdated;
-
        /**
         * Default constructor
         */
@@ -301,26 +301,38 @@ public class LoginUser implements User {
                this.userContact = userContact;
        }
 
+       @Override
+       public String getUserEncryptedPassword () {
+               return this.userEncryptedPassword;
+       }
+
+       @Override
+       public void setUserEncryptedPassword (final String userEncryptedPassword) {
+               this.userEncryptedPassword = userEncryptedPassword;
+       }
+
        @Override
        @SuppressWarnings ("ReturnOfDateField")
-       public Date getUserCreated () {
-               return this.userCreated;
+       public Date getUserEntryCreated () {
+               return this.userEntryCreated;
        }
 
        @Override
        @SuppressWarnings ("AssignmentToDateFieldFromParameter")
-       public void setUserCreated (final Date userCreated) {
-               this.userCreated = userCreated;
+       public void setUserEntryCreated (final Date userEntryCreated) {
+               this.userEntryCreated = userEntryCreated;
        }
 
        @Override
-       public String getUserEncryptedPassword () {
-               return this.userEncryptedPassword;
+       @SuppressWarnings ("ReturnOfDateField")
+       public Date getUserEntryUpdated () {
+               return this.userEntryUpdated;
        }
 
        @Override
-       public void setUserEncryptedPassword (final String userEncryptedPassword) {
-               this.userEncryptedPassword = userEncryptedPassword;
+       @SuppressWarnings ("AssignmentToDateFieldFromParameter")
+       public void setUserEntryUpdated (final Date userEntryUpdated) {
+               this.userEntryUpdated = userEntryUpdated;
        }
 
        @Override
@@ -395,18 +407,6 @@ public class LoginUser implements User {
                this.userProfileMode = userProfileMode;
        }
 
-       @Override
-       @SuppressWarnings ("ReturnOfDateField")
-       public Date getUserUpdated () {
-               return this.userUpdated;
-       }
-
-       @Override
-       @SuppressWarnings ("AssignmentToDateFieldFromParameter")
-       public void setUserUpdated (final Date userUpdated) {
-               this.userUpdated = userUpdated;
-       }
-
        @Override
        public int hashCode () {
                int hash = 5;
index 1e440435b604bef543df04767e1f3c5fd914e1de..928f4d0e594986823e3b20c39ea3103dfd45beaa 100644 (file)
@@ -77,14 +77,14 @@ public interface User extends Comparable<User>, Serializable {
         * <p>
         * @return "created" timestamp
         */
-       Date getUserCreated ();
+       Date getUserEntryCreated ();
 
        /**
         * Setter for "created" timestamp
         * <p>
         * @param userCreated "created" timestamp
         */
-       void setUserCreated (final Date userCreated);
+       void setUserEntryCreated (final Date userCreated);
 
        /**
         * Getter for encrypted password
@@ -175,14 +175,14 @@ public interface User extends Comparable<User>, Serializable {
         * <p>
         * @return Updated timestamp
         */
-       Date getUserUpdated ();
+       Date getUserEntryUpdated ();
 
        /**
         * Setter for updated timestamp
         * <p>
         * @param userUpdated Updated timestamp
         */
-       void setUserUpdated (final Date userUpdated);
+       void setUserEntryUpdated (final Date userUpdated);
 
        /**
         * Getter for user's locale
index 7a3a5cf332bf973caad20edfb0a31f3fd7c08972..7ede6339b6cdc6a16a3885232359fbd509dbc843 100644 (file)
@@ -143,7 +143,7 @@ public class Users implements Serializable {
                targetUser.setUserAccountStatus(sourceUser.getUserAccountStatus());
                targetUser.setUserLastLocked(sourceUser.getUserLastLocked());
                targetUser.setUserLastLockedReason(sourceUser.getUserLastLockedReason());
-               targetUser.setUserUpdated(sourceUser.getUserUpdated());
+               targetUser.setUserEntryUpdated(sourceUser.getUserEntryUpdated());
                targetUser.setUserProfileMode(sourceUser.getUserProfileMode());
                targetUser.setUserLocale(sourceUser.getUserLocale());
                targetUser.setUserMustChangePassword(sourceUser.getUserMustChangePassword());
@@ -225,9 +225,9 @@ public class Users implements Serializable {
                // - User data
                properties.setProperty("userId", Long.toString(user.getUserId())); //NOI18N
                properties.setProperty("userName", user.getUserName()); //NOI18N
-               properties.setProperty("userCreated", getFormattedTimestampFromUser(user, user.getUserCreated())); //NOI18N
-               if (user.getUserUpdated() != null) {
-                       properties.setProperty("userUpdated", getFormattedTimestampFromUser(user, user.getUserUpdated())); //NOI18N
+               properties.setProperty("userCreated", getFormattedTimestampFromUser(user, user.getUserEntryCreated())); //NOI18N
+               if (user.getUserEntryUpdated() != null) {
+                       properties.setProperty("userUpdated", getFormattedTimestampFromUser(user, user.getUserEntryUpdated())); //NOI18N
                }
                if (user.getUserConfirmKey() != null) {
                        properties.setProperty("userConfirmKey", user.getUserConfirmKey()); //NOI18N