Package com.sanctionco.thunder.models
Class User
java.lang.Object
com.sanctionco.thunder.models.User
Represents a user, providing access to the user's email, password, and additional properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetEmail()inthashCode()voidsetProperty(String name, Object value)toString()withTime(long creationTime, long lastUpdateTime)Creates a new User instance with the same properties as the current one, adding additional creationTime and lastUpdatedTime properties.
-
Constructor Details
-
User
Constructs a new user with the given email, password, and additional properties.- Parameters:
email- the user's email. This is the user's primary key.password- the user's hashed (not plaintext) passwordproperties- the map of additional user properties. If null, an empty map will be used.
-
-
Method Details
-
getEmail
-
getPassword
-
getProperties
-
setProperty
-
withTime
Creates a new User instance with the same properties as the current one, adding additional creationTime and lastUpdatedTime properties.- Parameters:
creationTime- the creation time of the userlastUpdateTime- the last updated time of the user- Returns:
- a new
Userinstance with the two properties added
-
equals
-
hashCode
public int hashCode() -
toString
-