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 aUserUpdateDTOAdminrecord class. -
Method Summary
Modifier and TypeMethodDescriptionadminId()Returns the value of theadminIdrecord component.@NotBlank(message="birthdate cannot be empty") @NotEmpty LocalDateReturns the value of thebirthDaterecord component.@NotBlank(message="email cannot be empty") @NotEmpty Stringemail()Returns the value of theemailrecord component.final booleanIndicates whether some other object is "equal to" this one.@NotBlank(message="first name cannot be empty") @NotEmpty StringReturns the value of thefirstNamerecord component.final inthashCode()Returns a hash code value for this object.@jakarta.validation.constraints.NotBlank(message="isBlocked cannot be empty"),@jakarta.validation.constraints.NotEmpty booleanReturns the value of theisAccountBlockedrecord component.@NotBlank(message="last name cannot be empty") @NotEmpty StringlastName()Returns the value of thelastNamerecord component.@NotBlank(message="middle name cannot be empty") @NotEmpty StringReturns the value of themiddleNamerecord component.toString()To string method.@NotBlank(message="username name cannot be empty") @NotEmpty Stringusername()Returns the value of theusernamerecord 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 aUserUpdateDTOAdminrecord class.- Parameters:
adminId- the value for theadminIdrecord componentusername- the value for theusernamerecord componentfirstName- the value for thefirstNamerecord componentlastName- the value for thelastNamerecord componentmiddleName- the value for themiddleNamerecord componentemail- the value for theemailrecord componentisAccountBlocked- the value for theisAccountBlockedrecord componentbirthDate- the value for thebirthDaterecord 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 theadminIdrecord component.- Returns:
- the value of the
adminIdrecord 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 theusernamerecord component.- Returns:
- the value of the
usernamerecord 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 thefirstNamerecord component.- Returns:
- the value of the
firstNamerecord 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 thelastNamerecord component.- Returns:
- the value of the
lastNamerecord 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 themiddleNamerecord component.- Returns:
- the value of the
middleNamerecord component
-
email
@NotBlank(message="email cannot be empty") @NotEmpty public @NotBlank(message="email cannot be empty") @NotEmpty String email()Returns the value of theemailrecord component.- Returns:
- the value of the
emailrecord 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 theisAccountBlockedrecord component.- Returns:
- the value of the
isAccountBlockedrecord component
-
birthDate
@NotBlank(message="birthdate cannot be empty") @NotEmpty public @NotBlank(message="birthdate cannot be empty") @NotEmpty LocalDate birthDate()Returns the value of thebirthDaterecord component.- Returns:
- the value of the
birthDaterecord component
-