Record Class UserDTO
java.lang.Object
java.lang.Record
io.github.navjotsrakhra.eventmanager.user.authentication.data.model.dto.UserDTO
public record UserDTO(long ID, String username, List<Role> roles,
boolean accountLocked, boolean accountExpired, boolean credentialsExpired)
extends Record
The UserDTO record represents an exposed version of a UserObject, providing
simplified access to user data.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theaccountExpiredrecord component.booleanReturns the value of theaccountLockedrecord component.booleanReturns the value of thecredentialsExpiredrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longID()Returns the value of theIDrecord 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
-
UserDTO
public UserDTO(long ID, String username, List<Role> roles, boolean accountLocked, boolean accountExpired, boolean credentialsExpired) Creates an instance of aUserDTOrecord class.- Parameters:
ID- the value for theIDrecord componentusername- the value for theusernamerecord componentroles- the value for therolesrecord componentaccountLocked- the value for theaccountLockedrecord componentaccountExpired- the value for theaccountExpiredrecord componentcredentialsExpired- the value for thecredentialsExpiredrecord component
-
-
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
public long 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
-
roles
Returns the value of therolesrecord component.- Returns:
- the value of the
rolesrecord component
-
accountLocked
public boolean accountLocked()Returns the value of theaccountLockedrecord component.- Returns:
- the value of the
accountLockedrecord component
-
accountExpired
public boolean accountExpired()Returns the value of theaccountExpiredrecord component.- Returns:
- the value of the
accountExpiredrecord component
-
credentialsExpired
public boolean credentialsExpired()Returns the value of thecredentialsExpiredrecord component.- Returns:
- the value of the
credentialsExpiredrecord component
-