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 TypeMethodDescriptionbooleanactive()Returns the value of theactiverecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.intmfaLevel()Returns the value of themfaLevelrecord component.Returns the value of thepasswordHashrecord component.roles()Returns the value of therolesrecord component.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.
-
Constructor Details
-
SimpleUser
public SimpleUser(Long id, String username, String passwordHash, boolean active, int mfaLevel, Set<UserRole> roles) Creates an instance of aSimpleUserrecord class.- Parameters:
id- the value for theidrecord componentusername- the value for theusernamerecord componentpasswordHash- the value for thepasswordHashrecord componentactive- the value for theactiverecord componentmfaLevel- the value for themfaLevelrecord componentroles- the value for therolesrecord 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 theidrecord component.- Returns:
- the value of the
idrecord component
-
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
passwordHash
Returns the value of thepasswordHashrecord component.- Returns:
- the value of the
passwordHashrecord component
-
active
public boolean active()Returns the value of theactiverecord component.- Returns:
- the value of the
activerecord component
-
mfaLevel
public int mfaLevel()Returns the value of themfaLevelrecord component.- Returns:
- the value of the
mfaLevelrecord component
-
roles
Returns the value of therolesrecord component.- Returns:
- the value of the
rolesrecord component
-