Record Class UserAccountRow
java.lang.Object
java.lang.Record
com.irurueta.authserver.authorization.infrastructure.persistence.password.UserAccountRow
- Record Components:
id- identifier of the user.username- name the user signs in with.password- encoded password.enabled- whether the account is enabled.email- e-mail address, ornullwhen the user has none.emailVerified- whether the e-mail address was verified.tenant- tenant the user belongs to.
public record UserAccountRow(UUID id, String username, String password, boolean enabled, String email, boolean emailVerified, String tenant)
extends Record
Columns of a user row joined with its encoded password, before the authorities, which live in a table of their
own, are loaded.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for theemailrecord component.private final booleanThe field for theemailVerifiedrecord component.private final booleanThe field for theenabledrecord component.private final UUIDThe field for theidrecord component.private final StringThe field for thepasswordrecord component.private final StringThe field for thetenantrecord component.private final StringThe field for theusernamerecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionemail()Returns the value of theemailrecord component.booleanReturns the value of theemailVerifiedrecord component.booleanenabled()Returns the value of theenabledrecord 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.password()Returns the value of thepasswordrecord component.tenant()Returns the value of thetenantrecord component.final StringtoString()Returns a string representation of this record class.toUserAccount(List<String> authorities) Completes the row into an account.username()Returns the value of theusernamerecord component.
-
Field Details
-
id
The field for theidrecord component. -
username
The field for theusernamerecord component. -
password
The field for thepasswordrecord component. -
enabled
private final boolean enabledThe field for theenabledrecord component. -
email
The field for theemailrecord component. -
emailVerified
private final boolean emailVerifiedThe field for theemailVerifiedrecord component. -
tenant
The field for thetenantrecord component.
-
-
Constructor Details
-
UserAccountRow
public UserAccountRow(UUID id, String username, String password, boolean enabled, String email, boolean emailVerified, String tenant) Creates an instance of aUserAccountRowrecord class.- Parameters:
id- the value for theidrecord componentusername- the value for theusernamerecord componentpassword- the value for thepasswordrecord componentenabled- the value for theenabledrecord componentemail- the value for theemailrecord componentemailVerified- the value for theemailVerifiedrecord componenttenant- the value for thetenantrecord component
-
-
Method Details
-
toUserAccount
Completes the row into an account.- Parameters:
authorities- authorities of the user, loaded separately.- Returns:
- the account.
-
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
-
password
Returns the value of thepasswordrecord component.- Returns:
- the value of the
passwordrecord component
-
enabled
public boolean enabled()Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-
email
Returns the value of theemailrecord component.- Returns:
- the value of the
emailrecord component
-
emailVerified
public boolean emailVerified()Returns the value of theemailVerifiedrecord component.- Returns:
- the value of the
emailVerifiedrecord component
-
tenant
Returns the value of thetenantrecord component.- Returns:
- the value of the
tenantrecord component
-