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

    Constructors
    Constructor
    Description
    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)
    Creates an instance of a UserUpdateDTOAdmin record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the adminId record component.
    @NotBlank(message="birthdate cannot be empty") @NotEmpty LocalDate
    Returns the value of the birthDate record component.
    @NotBlank(message="email cannot be empty") @NotEmpty String
    Returns the value of the email 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 the firstName record component.
    final int
    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 the isAccountBlocked record component.
    @NotBlank(message="last name cannot be empty") @NotEmpty String
    Returns the value of the lastName record component.
    @NotBlank(message="middle name cannot be empty") @NotEmpty String
    Returns the value of the middleName record component.
    To string method.
    @NotBlank(message="username name cannot be empty") @NotEmpty String
    Returns the value of the username record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 a UserUpdateDTOAdmin record class.
      Parameters:
      adminId - the value for the adminId record component
      username - the value for the username record component
      firstName - the value for the firstName record component
      lastName - the value for the lastName record component
      middleName - the value for the middleName record component
      email - the value for the email record component
      isAccountBlocked - the value for the isAccountBlocked record component
      birthDate - the value for the birthDate record component
  • Method Details

    • toString

      public String toString()
      To string method.
      Specified by:
      toString in class Record
      Returns:
      The string.
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • adminId

      public String adminId()
      Returns the value of the adminId 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 the username 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 the firstName 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 the lastName 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 the middleName 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 the email 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 the isAccountBlocked 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 the birthDate record component.
      Returns:
      the value of the birthDate record component