Record Class ChangeUserNameDTO
java.lang.Object
java.lang.Record
de.gustavblass.fsu.fmi.roombooking.dto.ChangeUserNameDTO
- Record Components:
newUserName- The new user name which shall replace the old one.
public record ChangeUserNameDTO(@NotNull @NotBlank @Length(min=3,max=32) @Pattern(regexp="^[a-zA-Z0-9][a-z0-9.\\-_]+[a-zA-Z0-9]$") String newUserName)
extends Record
Represents an
Actor's with to change their Actor.userName.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @NotNull @NotBlank @Length(min=3,max=32) @Pattern(regexp="^[a-zA-Z0-9][a-z0-9.\\-_]+[a-zA-Z0-9]$") StringThe field for thenewUserNamerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionChangeUserNameDTO(@NotNull @NotBlank @Length(min=3,max=32) @Pattern(regexp="^[a-zA-Z0-9][a-z0-9.\\-_]+[a-zA-Z0-9]$") String newUserName) Creates an instance of aChangeUserNameDTOrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull @NotBlank @Length(min=3,max=32) @Pattern(regexp="^[a-zA-Z0-9][a-z0-9.\\-_]+[a-zA-Z0-9]$") StringReturns the value of thenewUserNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
newUserName
@NotNull @NotBlank @Length(min=3, max=32) @Pattern(regexp="^[a-zA-Z0-9][a-z0-9.\\-_]+[a-zA-Z0-9]$") private final @NotNull @NotBlank @Length(min=3,max=32) @Pattern(regexp="^[a-zA-Z0-9][a-z0-9.\\-_]+[a-zA-Z0-9]$") String newUserNameThe field for thenewUserNamerecord component.
-
-
Constructor Details
-
ChangeUserNameDTO
public ChangeUserNameDTO(@NotNull @NotBlank @Length(min=3,max=32) @Pattern(regexp="^[a-zA-Z0-9][a-z0-9.\\-_]+[a-zA-Z0-9]$") @NotNull @NotBlank @Length(min=3,max=32) @Pattern(regexp="^[a-zA-Z0-9][a-z0-9.\\-_]+[a-zA-Z0-9]$") String newUserName) Creates an instance of aChangeUserNameDTOrecord class.- Parameters:
newUserName- the value for thenewUserNamerecord 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). -
newUserName
@NotNull @NotBlank @Length(min=3, max=32) @Pattern(regexp="^[a-zA-Z0-9][a-z0-9.\\-_]+[a-zA-Z0-9]$") public @NotNull @NotBlank @Length(min=3,max=32) @Pattern(regexp="^[a-zA-Z0-9][a-z0-9.\\-_]+[a-zA-Z0-9]$") String newUserName()Returns the value of thenewUserNamerecord component.- Returns:
- the value of the
newUserNamerecord component
-