Class User

java.lang.Object
com.inesm.KeyManager.model.User
All Implemented Interfaces:
Resource, Serializable

public class User extends Object implements Serializable, Resource
See Also:
  • Constructor Details

    • User

      public User()
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • patch

      public void patch(User upd)
      Updates the fields in the current object instance with the ones from another object. Will only update the fields that have been modified after the initialization.
      Parameters:
      upd - the object containing the fields to update the current instance with
    • getResourceID

      public String getResourceID()
      Description copied from interface: Resource
      Gets the station resource identifier.
      Specified by:
      getResourceID in interface Resource
      Returns:
      a string containing the resource identifier.
    • serialize

      public String serialize() throws IOException
      Description copied from interface: Resource
      Serializes a resource into a string.
      Specified by:
      serialize in interface Resource
      Returns:
      the string representing the serialization of the resource.
      Throws:
      IOException - if an error occurred during serialization
    • deserialize

      public void deserialize(String data) throws IOException, ClassNotFoundException
      Description copied from interface: Resource
      Deserializes the resource from a data string generated by the Resource.serialize() method.
      Specified by:
      deserialize in interface Resource
      Parameters:
      data - the serialized data as a string
      Throws:
      IOException - if an error occurred during the serialization process
      ClassNotFoundException - if its was not possible to load the class data, or the class data was not found
    • getUserID

      public long getUserID()
    • setUserID

      public void setUserID(long userID)
    • getUsername

      public String getUsername()
    • setUsername

      public void setUsername(String username)
    • getCitizenCard

      public String getCitizenCard()
    • setCitizenCard

      public void setCitizenCard(String citizenCard)
    • getFirstName

      public String getFirstName()
    • setFirstName

      public void setFirstName(String firstName)
    • getLastName

      public String getLastName()
    • setLastName

      public void setLastName(String lastName)
    • getActive

      public Boolean getActive()
    • setActive

      public void setActive(Boolean active)
    • getRoleID

      public long getRoleID()
    • setRoleID

      public void setRoleID(long roleID)
    • getPassword

      public String getPassword()
    • setPassword

      public void setPassword(String password)
    • getRoleName

      public String getRoleName()
    • setRoleName

      public void setRoleName(String roleName)
    • getRoleColor

      public String getRoleColor()
    • setRoleColor

      public void setRoleColor(String roleColor)
    • getPwHash

      public String getPwHash()
    • setPwHash

      public void setPwHash(String pwHash)
    • isActive

      public boolean isActive()
    • getFailedLogins

      public int getFailedLogins()
    • setFailedLogins

      public void setFailedLogins(int failedLogins)
    • getLastLoginAttempt

      public LocalDateTime getLastLoginAttempt()
    • setLastLoginAttempt

      public void setLastLoginAttempt(LocalDateTime lastLoginAttempt)
    • setTempPassword

      public void setTempPassword(Boolean tempPassword)
    • getTempPassword

      public Boolean getTempPassword()
    • getUserFullname

      public String getUserFullname()