From: Roland Häder Date: Tue, 19 May 2020 22:57:00 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=042997b700d59a87944c24ae5d04ebffc1946512;p=juser-core.git Continued: - renamed userCreated to userEntryCreated - renamed userUpdated to userEntryUpdated 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 ba6e47c..bf8c7ab 100644 --- a/src/org/mxchange/jusercore/model/user/LoginUser.java +++ b/src/org/mxchange/jusercore/model/user/LoginUser.java @@ -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; diff --git a/src/org/mxchange/jusercore/model/user/User.java b/src/org/mxchange/jusercore/model/user/User.java index 1e44043..928f4d0 100644 --- a/src/org/mxchange/jusercore/model/user/User.java +++ b/src/org/mxchange/jusercore/model/user/User.java @@ -77,14 +77,14 @@ public interface User extends Comparable, Serializable { *

* @return "created" timestamp */ - Date getUserCreated (); + Date getUserEntryCreated (); /** * Setter for "created" timestamp *

* @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, Serializable { *

* @return Updated timestamp */ - Date getUserUpdated (); + Date getUserEntryUpdated (); /** * Setter for updated timestamp *

* @param userUpdated Updated timestamp */ - void setUserUpdated (final Date userUpdated); + void setUserEntryUpdated (final Date userUpdated); /** * Getter for user's locale diff --git a/src/org/mxchange/jusercore/model/user/Users.java b/src/org/mxchange/jusercore/model/user/Users.java index 7a3a5cf..7ede633 100644 --- a/src/org/mxchange/jusercore/model/user/Users.java +++ b/src/org/mxchange/jusercore/model/user/Users.java @@ -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