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;
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
this.setUserEncryptedPassword(user.getUserEncryptedPassword());
this.setUserAccountStatus(user.getUserAccountStatus());
this.setUserCreated(user.getUserCreated());
- this.setUserLocked(user.getUserLocked());
+ this.setUserLastLocked(user.getUserLastLocked());
}
@Override
(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;
}
@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
* <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