Record Class ChangePasswordDTO
java.lang.Object
java.lang.Record
de.gustavblass.fsu.fmi.roombooking.dto.ChangePasswordDTO
- Record Components:
currentPassword- The password stored in the database before the change.newPassword- What the current password shall be replaced with.repeatedNewPassword- The new password again, in order to confirm the user has not made a typo.
public record ChangePasswordDTO(@NotNull @NotBlank String currentPassword, @NotNull @NotBlank String newPassword, @NotNull @NotBlank String repeatedNewPassword)
extends Record
Represents the data necessary to update the
Actor.password().-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @NotNull @NotBlank StringThe field for thecurrentPasswordrecord component.private final @NotNull @NotBlank StringThe field for thenewPasswordrecord component.private final @NotNull @NotBlank StringThe field for therepeatedNewPasswordrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionChangePasswordDTO(@NotNull @NotBlank String currentPassword, @NotNull @NotBlank String newPassword, @NotNull @NotBlank String repeatedNewPassword) Creates an instance of aChangePasswordDTOrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull @NotBlank StringReturns the value of thecurrentPasswordrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull @NotBlank StringReturns the value of thenewPasswordrecord component.@NotNull @NotBlank StringReturns the value of therepeatedNewPasswordrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
currentPassword
The field for thecurrentPasswordrecord component. -
newPassword
The field for thenewPasswordrecord component. -
repeatedNewPassword
The field for therepeatedNewPasswordrecord component.
-
-
Constructor Details
-
ChangePasswordDTO
public ChangePasswordDTO(@NotNull @NotBlank @NotNull @NotBlank String currentPassword, @NotNull @NotBlank @NotNull @NotBlank String newPassword, @NotNull @NotBlank @NotNull @NotBlank String repeatedNewPassword) Creates an instance of aChangePasswordDTOrecord class.- Parameters:
currentPassword- the value for thecurrentPasswordrecord componentnewPassword- the value for thenewPasswordrecord componentrepeatedNewPassword- the value for therepeatedNewPasswordrecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
currentPassword
Returns the value of thecurrentPasswordrecord component.- Returns:
- the value of the
currentPasswordrecord component
-
newPassword
Returns the value of thenewPasswordrecord component.- Returns:
- the value of the
newPasswordrecord component
-
repeatedNewPassword
Returns the value of therepeatedNewPasswordrecord component.- Returns:
- the value of the
repeatedNewPasswordrecord component
-