Record Class ActorDTO

java.lang.Object
java.lang.Record
de.gustavblass.fsu.fmi.roombooking.dto.ActorDTO
Record Components:
id - The Actor.id in the database.
userName - The Actor.userName used for authentication.
name - The clear name of the Actor.
eMailAddress - The Actor.eMailAddress.
role - The role that the Actor has.
enabled - Whether the Actor's account is enabled/activated.
locked - Whether the Actor's account is locked.

public record ActorDTO(@NonNull Long id, @NonNull String userName, @NonNull String name, @NonNull String eMailAddress, @NonNull ActorRole role, boolean enabled, boolean locked) extends Record
Represents an Actor, but with the Actor.password() stripped away.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final @NonNull String
    The field for the eMailAddress record component.
    private final boolean
    The field for the enabled record component.
    private final @NonNull Long
    The field for the id record component.
    private final boolean
    The field for the locked record component.
    private final @NonNull String
    The field for the name record component.
    private final @NonNull ActorRole
    The field for the role record component.
    private final @NonNull String
    The field for the userName record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ActorDTO(@NonNull Long id, @NonNull String userName, @NonNull String name, @NonNull String eMailAddress, @NonNull ActorRole role, boolean enabled, boolean locked)
    Creates an instance of a ActorDTO record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull String
    Returns the value of the eMailAddress record component.
    boolean
    Returns the value of the enabled record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    @NonNull Long
    id()
    Returns the value of the id record component.
    boolean
    Returns the value of the locked record component.
    @NonNull String
    Returns the value of the name record component.
    @NonNull ActorRole
    Returns the value of the role record component.
    final String
    Returns a string representation of this record class.
    @NonNull String
    Returns the value of the userName record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • id

      @NonNull private final @NonNull Long id
      The field for the id record component.
    • userName

      @NonNull private final @NonNull String userName
      The field for the userName record component.
    • name

      @NonNull private final @NonNull String name
      The field for the name record component.
    • eMailAddress

      @NonNull private final @NonNull String eMailAddress
      The field for the eMailAddress record component.
    • role

      @NonNull private final @NonNull ActorRole role
      The field for the role record component.
    • enabled

      private final boolean enabled
      The field for the enabled record component.
    • locked

      private final boolean locked
      The field for the locked record component.
  • Constructor Details

    • ActorDTO

      public ActorDTO(@NonNull @NonNull Long id, @NonNull @NonNull String userName, @NonNull @NonNull String name, @NonNull @NonNull String eMailAddress, @NonNull @NonNull ActorRole role, boolean enabled, boolean locked)
      Creates an instance of a ActorDTO record class.
      Parameters:
      id - the value for the id record component
      userName - the value for the userName record component
      name - the value for the name record component
      eMailAddress - the value for the eMailAddress record component
      role - the value for the role record component
      enabled - the value for the enabled record component
      locked - the value for the locked record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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 the compare method from their corresponding wrapper classes.
      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.
    • id

      @NonNull public @NonNull Long id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • userName

      @NonNull public @NonNull String userName()
      Returns the value of the userName record component.
      Returns:
      the value of the userName record component
    • name

      @NonNull public @NonNull String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • eMailAddress

      @NonNull public @NonNull String eMailAddress()
      Returns the value of the eMailAddress record component.
      Returns:
      the value of the eMailAddress record component
    • role

      @NonNull public @NonNull ActorRole role()
      Returns the value of the role record component.
      Returns:
      the value of the role record component
    • enabled

      public boolean enabled()
      Returns the value of the enabled record component.
      Returns:
      the value of the enabled record component
    • locked

      public boolean locked()
      Returns the value of the locked record component.
      Returns:
      the value of the locked record component