Record Class UserResponse
java.lang.Object
java.lang.Record
com.example.security.user.dto.UserResponse
- Record Components:
id- identificador de la cuentaname- nombre visibleemail- correo de la cuentarole- rol asignadoenabled- indica si la cuenta está habilitada
-
Constructor Summary
ConstructorsConstructorDescriptionUserResponse(Long id, String name, String email, Role role, boolean enabled) Creates an instance of aUserResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionemail()Returns the value of theemailrecord component.booleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.static UserResponseConstruye el perfil público con los campos que puede recibir el cliente.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.name()Returns the value of thenamerecord component.role()Returns the value of therolerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UserResponse
Creates an instance of aUserResponserecord class.
-
-
Method Details
-
from
Construye el perfil público con los campos que puede recibir el cliente.- Parameters:
user- entidad de origen- Returns:
- perfil público sin el hash de contraseña
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
id
-
name
-
email
-
role
-
enabled
-