Record Class TrackerAccountDTO

java.lang.Object
java.lang.Record
com.endurancetrio.business.tracker.dto.TrackerAccountDTO
All Implemented Interfaces:
Serializable

public record TrackerAccountDTO(@NotBlank(message="Owner is required") @Size(min=1,max=50,message="Owner must be between 1 and 50 characters") String owner, @NotBlank(message="Key is required") @Size(min=32,max=64,message="Key must be between 32 and 64 characters") @Pattern(regexp="^[A-Za-z0-9]+$",message="Key must contain only alphanumeric characters") String key, boolean enabled) extends Record implements Serializable
The TrackerAccountDTO represents a tracker account with its owner, key, and enabled status.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    TrackerAccountDTO(@NotBlank(message="Owner is required") @Size(min=1,max=50,message="Owner must be between 1 and 50 characters") String owner, @NotBlank(message="Key is required") @Size(min=32,max=64,message="Key must be between 32 and 64 characters") @Pattern(regexp="^[A-Za-z0-9]+$",message="Key must contain only alphanumeric characters") String key, boolean enabled)
    Creates an instance of a TrackerAccountDTO record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    @NotBlank(message="Key is required") @Size(min=32,max=64,message="Key must be between 32 and 64 characters") @Pattern(regexp="^[A-Za-z0-9]+$",message="Key must contain only alphanumeric characters") String
    key()
    Returns the value of the key record component.
    @NotBlank(message="Owner is required") @Size(min=1,max=50,message="Owner must be between 1 and 50 characters") String
    Returns the value of the owner record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

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

    • TrackerAccountDTO

      public TrackerAccountDTO(@NotBlank(message="Owner is required") @Size(min=1,max=50,message="Owner must be between 1 and 50 characters") @NotBlank(message="Owner is required") @Size(min=1,max=50,message="Owner must be between 1 and 50 characters") String owner, @NotBlank(message="Key is required") @Size(min=32,max=64,message="Key must be between 32 and 64 characters") @Pattern(regexp="^[A-Za-z0-9]+$",message="Key must contain only alphanumeric characters") @NotBlank(message="Key is required") @Size(min=32,max=64,message="Key must be between 32 and 64 characters") @Pattern(regexp="^[A-Za-z0-9]+$",message="Key must contain only alphanumeric characters") String key, boolean enabled)
      Creates an instance of a TrackerAccountDTO record class.
      Parameters:
      owner - the value for the owner record component
      key - the value for the key record component
      enabled - the value for the enabled 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 '=='.
      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.
    • owner

      @NotBlank(message="Owner is required") @Size(min=1, max=50, message="Owner must be between 1 and 50 characters") public @NotBlank(message="Owner is required") @Size(min=1,max=50,message="Owner must be between 1 and 50 characters") String owner()
      Returns the value of the owner record component.
      Returns:
      the value of the owner record component
    • key

      @NotBlank(message="Key is required") @Size(min=32, max=64, message="Key must be between 32 and 64 characters") @Pattern(regexp="^[A-Za-z0-9]+$", message="Key must contain only alphanumeric characters") public @NotBlank(message="Key is required") @Size(min=32,max=64,message="Key must be between 32 and 64 characters") @Pattern(regexp="^[A-Za-z0-9]+$",message="Key must contain only alphanumeric characters") String key()
      Returns the value of the key record component.
      Returns:
      the value of the key record component
    • enabled

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