Record Class SimpleUser
java.lang.Object
java.lang.Record
eu.rarogsoftware.rarog.platform.api.user.management.SimpleUser
public record SimpleUser(Long id, String username, String passwordHash, boolean active, int mfaLevel, Set<UserRole> roles)
extends Record
The simplest user record representing single user instance.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
active()
Returns the value of theactive
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.int
mfaLevel()
Returns the value of themfaLevel
record component.Returns the value of thepasswordHash
record component.roles()
Returns the value of theroles
record component.final String
toString()
Returns a string representation of this record class.username()
Returns the value of theusername
record component.
-
Constructor Details
-
SimpleUser
public SimpleUser(Long id, String username, String passwordHash, boolean active, int mfaLevel, Set<UserRole> roles) Creates an instance of aSimpleUser
record class.- Parameters:
id
- the value for theid
record componentusername
- the value for theusername
record componentpasswordHash
- the value for thepasswordHash
record componentactive
- the value for theactive
record componentmfaLevel
- the value for themfaLevel
record componentroles
- the value for theroles
record component
-
SimpleUser
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
username
Returns the value of theusername
record component.- Returns:
- the value of the
username
record component
-
passwordHash
Returns the value of thepasswordHash
record component.- Returns:
- the value of the
passwordHash
record component
-
active
public boolean active()Returns the value of theactive
record component.- Returns:
- the value of the
active
record component
-
mfaLevel
public int mfaLevel()Returns the value of themfaLevel
record component.- Returns:
- the value of the
mfaLevel
record component
-
roles
Returns the value of theroles
record component.- Returns:
- the value of the
roles
record component
-