Record Class UserUpdateDTOAdmin
java.lang.Object
java.lang.Record
callofproject.dev.authentication.dto.admin.UserUpdateDTOAdmin
public record UserUpdateDTOAdmin(String adminId, @NotBlank(message="username name cannot be empty") @NotEmpty String username, @NotBlank(message="first name cannot be empty") @NotEmpty String firstName, @NotBlank(message="last name cannot be empty") @NotEmpty String lastName, @NotBlank(message="middle name cannot be empty") @NotEmpty String middleName, @NotBlank(message="email cannot be empty") @NotEmpty String email, @jakarta.validation.constraints.NotBlank(message="isBlocked cannot be empty"),@jakarta.validation.constraints.NotEmpty boolean isAccountBlocked, @NotBlank(message="birthdate cannot be empty") @NotEmpty LocalDate birthDate)
extends Record
Data Transfer Object for a user update request.
-
Constructor Summary
ConstructorsConstructorDescriptionUserUpdateDTOAdmin
(String adminId, @NotBlank(message="username name cannot be empty") @NotEmpty String username, @NotBlank(message="first name cannot be empty") @NotEmpty String firstName, @NotBlank(message="last name cannot be empty") @NotEmpty String lastName, @NotBlank(message="middle name cannot be empty") @NotEmpty String middleName, @NotBlank(message="email cannot be empty") @NotEmpty String email, @jakarta.validation.constraints.NotBlank(message="isBlocked cannot be empty"),@jakarta.validation.constraints.NotEmpty boolean isAccountBlocked, @NotBlank(message="birthdate cannot be empty") @NotEmpty LocalDate birthDate) Creates an instance of aUserUpdateDTOAdmin
record class. -
Method Summary
Modifier and TypeMethodDescriptionadminId()
Returns the value of theadminId
record component.@NotBlank(message="birthdate cannot be empty") @NotEmpty LocalDate
Returns the value of thebirthDate
record component.@NotBlank(message="email cannot be empty") @NotEmpty String
email()
Returns the value of theemail
record component.final boolean
Indicates whether some other object is "equal to" this one.@NotBlank(message="first name cannot be empty") @NotEmpty String
Returns the value of thefirstName
record component.final int
hashCode()
Returns a hash code value for this object.@jakarta.validation.constraints.NotBlank(message="isBlocked cannot be empty"),@jakarta.validation.constraints.NotEmpty boolean
Returns the value of theisAccountBlocked
record component.@NotBlank(message="last name cannot be empty") @NotEmpty String
lastName()
Returns the value of thelastName
record component.@NotBlank(message="middle name cannot be empty") @NotEmpty String
Returns the value of themiddleName
record component.toString()
To string method.@NotBlank(message="username name cannot be empty") @NotEmpty String
username()
Returns the value of theusername
record component.
-
Constructor Details
-
UserUpdateDTOAdmin
public UserUpdateDTOAdmin(String adminId, @NotBlank(message="username name cannot be empty") @NotEmpty @NotBlank(message="username name cannot be empty") @NotEmpty String username, @NotBlank(message="first name cannot be empty") @NotEmpty @NotBlank(message="first name cannot be empty") @NotEmpty String firstName, @NotBlank(message="last name cannot be empty") @NotEmpty @NotBlank(message="last name cannot be empty") @NotEmpty String lastName, @NotBlank(message="middle name cannot be empty") @NotEmpty @NotBlank(message="middle name cannot be empty") @NotEmpty String middleName, @NotBlank(message="email cannot be empty") @NotEmpty @NotBlank(message="email cannot be empty") @NotEmpty String email, @NotBlank(message="isBlocked cannot be empty") @NotEmpty @jakarta.validation.constraints.NotBlank(message="isBlocked cannot be empty"),@jakarta.validation.constraints.NotEmpty boolean isAccountBlocked, @NotBlank(message="birthdate cannot be empty") @NotEmpty @NotBlank(message="birthdate cannot be empty") @NotEmpty LocalDate birthDate) Creates an instance of aUserUpdateDTOAdmin
record class.- Parameters:
adminId
- the value for theadminId
record componentusername
- the value for theusername
record componentfirstName
- the value for thefirstName
record componentlastName
- the value for thelastName
record componentmiddleName
- the value for themiddleName
record componentemail
- the value for theemail
record componentisAccountBlocked
- the value for theisAccountBlocked
record componentbirthDate
- the value for thebirthDate
record component
-
-
Method Details
-
toString
To string method. -
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 '=='. -
adminId
Returns the value of theadminId
record component.- Returns:
- the value of the
adminId
record component
-
username
@NotBlank(message="username name cannot be empty") @NotEmpty public @NotBlank(message="username name cannot be empty") @NotEmpty String username()Returns the value of theusername
record component.- Returns:
- the value of the
username
record component
-
firstName
@NotBlank(message="first name cannot be empty") @NotEmpty public @NotBlank(message="first name cannot be empty") @NotEmpty String firstName()Returns the value of thefirstName
record component.- Returns:
- the value of the
firstName
record component
-
lastName
@NotBlank(message="last name cannot be empty") @NotEmpty public @NotBlank(message="last name cannot be empty") @NotEmpty String lastName()Returns the value of thelastName
record component.- Returns:
- the value of the
lastName
record component
-
middleName
@NotBlank(message="middle name cannot be empty") @NotEmpty public @NotBlank(message="middle name cannot be empty") @NotEmpty String middleName()Returns the value of themiddleName
record component.- Returns:
- the value of the
middleName
record component
-
email
@NotBlank(message="email cannot be empty") @NotEmpty public @NotBlank(message="email cannot be empty") @NotEmpty String email()Returns the value of theemail
record component.- Returns:
- the value of the
email
record component
-
isAccountBlocked
@NotBlank(message="isBlocked cannot be empty") @NotEmpty public @jakarta.validation.constraints.NotBlank(message="isBlocked cannot be empty"),@jakarta.validation.constraints.NotEmpty boolean isAccountBlocked()Returns the value of theisAccountBlocked
record component.- Returns:
- the value of the
isAccountBlocked
record component
-
birthDate
@NotBlank(message="birthdate cannot be empty") @NotEmpty public @NotBlank(message="birthdate cannot be empty") @NotEmpty LocalDate birthDate()Returns the value of thebirthDate
record component.- Returns:
- the value of the
birthDate
record component
-