Package com.inesm.KeyManager.model
Class User
java.lang.Object
com.inesm.KeyManager.model.User
- All Implemented Interfaces:
Resource,Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeserialize(String data) Deserializes the resource from a data string generated by theResource.serialize()method.intGets the station resource identifier.longlongbooleanisActive()voidUpdates the fields in the current object instance with the ones from another object.Serializes a resource into a string.voidvoidsetCitizenCard(String citizenCard) voidsetFailedLogins(int failedLogins) voidsetFirstName(String firstName) voidsetLastLoginAttempt(LocalDateTime lastLoginAttempt) voidsetLastName(String lastName) voidsetPassword(String password) voidvoidsetRoleColor(String roleColor) voidsetRoleID(long roleID) voidsetRoleName(String roleName) voidsetTempPassword(Boolean tempPassword) voidsetUserID(long userID) voidsetUsername(String username) toString()
-
Constructor Details
-
User
public User()
-
-
Method Details
-
toString
-
patch
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
Description copied from interface:ResourceGets the station resource identifier.- Specified by:
getResourceIDin interfaceResource- Returns:
- a string containing the resource identifier.
-
serialize
Description copied from interface:ResourceSerializes a resource into a string.- Specified by:
serializein interfaceResource- Returns:
- the string representing the serialization of the resource.
- Throws:
IOException- if an error occurred during serialization
-
deserialize
Description copied from interface:ResourceDeserializes the resource from a data string generated by theResource.serialize()method.- Specified by:
deserializein interfaceResource- Parameters:
data- the serialized data as a string- Throws:
IOException- if an error occurred during the serialization processClassNotFoundException- 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
-
setUsername
-
getCitizenCard
-
setCitizenCard
-
getFirstName
-
setFirstName
-
getLastName
-
setLastName
-
getActive
-
setActive
-
getRoleID
public long getRoleID() -
setRoleID
public void setRoleID(long roleID) -
getPassword
-
setPassword
-
getRoleName
-
setRoleName
-
getRoleColor
-
setRoleColor
-
getPwHash
-
setPwHash
-
isActive
public boolean isActive() -
getFailedLogins
public int getFailedLogins() -
setFailedLogins
public void setFailedLogins(int failedLogins) -
getLastLoginAttempt
-
setLastLoginAttempt
-
setTempPassword
-
getTempPassword
-
getUserFullname
-