Record Class ArticleDTO

java.lang.Object
java.lang.Record
com.endurancetrio.business.insight.dto.ArticleDTO
Record Components:
id - the unique identifier of the article
slug - the unique URL slug of the article (must be non-null and non-blank)
title - the article title in the requested locale (must be non-null and non-blank)
subtitle - the optional article subtitle in the requested locale
introText - the introductory HTML content (must be non-null and non-blank)
fullText - the optional full HTML content of the article
authorName - the display name of the author, resolved from Author.knownName (must be non-null and non-blank)
publishedDate - the optional publication date of the article
featuredImage - the optional URL of the featured image
featuredImageWidth - the optional width of the featured image in pixels, used for OG meta tags
featuredImageHeight - the optional height of the featured image in pixels, used for OG meta tags
metaTitle - the optional SEO meta title in the requested locale
metaDescription - the optional SEO meta description in the requested locale
locale - the locale code of the resolved content (e.g. "en" or "pt"), must be non-null and non-blank

public record ArticleDTO(Long id, String slug, String title, String subtitle, String introText, String fullText, String authorName, LocalDateTime publishedDate, String featuredImage, Integer featuredImageWidth, Integer featuredImageHeight, String metaTitle, String metaDescription, String locale) extends Record
ArticleDTO carries the full article data for the Insights section, combining the article entity with its locale-resolved content.
  • Constructor Details

    • ArticleDTO

      public ArticleDTO(Long id, String slug, String title, String subtitle, String introText, String fullText, String authorName, LocalDateTime publishedDate, String featuredImage, Integer featuredImageWidth, Integer featuredImageHeight, String metaTitle, String metaDescription, String locale)
      Creates an instance of a ArticleDTO record class.
      Parameters:
      id - the value for the id record component
      slug - the value for the slug record component
      title - the value for the title record component
      subtitle - the value for the subtitle record component
      introText - the value for the introText record component
      fullText - the value for the fullText record component
      authorName - the value for the authorName record component
      publishedDate - the value for the publishedDate record component
      featuredImage - the value for the featuredImage record component
      featuredImageWidth - the value for the featuredImageWidth record component
      featuredImageHeight - the value for the featuredImageHeight record component
      metaTitle - the value for the metaTitle record component
      metaDescription - the value for the metaDescription record component
      locale - the value for the locale 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. All components in this record class are compared with Objects::equals(Object,Object).
      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

      public Long id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • slug

      public String slug()
      Returns the value of the slug record component.
      Returns:
      the value of the slug record component
    • title

      public String title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • subtitle

      public String subtitle()
      Returns the value of the subtitle record component.
      Returns:
      the value of the subtitle record component
    • introText

      public String introText()
      Returns the value of the introText record component.
      Returns:
      the value of the introText record component
    • fullText

      public String fullText()
      Returns the value of the fullText record component.
      Returns:
      the value of the fullText record component
    • authorName

      public String authorName()
      Returns the value of the authorName record component.
      Returns:
      the value of the authorName record component
    • publishedDate

      public LocalDateTime publishedDate()
      Returns the value of the publishedDate record component.
      Returns:
      the value of the publishedDate record component
    • featuredImage

      public String featuredImage()
      Returns the value of the featuredImage record component.
      Returns:
      the value of the featuredImage record component
    • featuredImageWidth

      public Integer featuredImageWidth()
      Returns the value of the featuredImageWidth record component.
      Returns:
      the value of the featuredImageWidth record component
    • featuredImageHeight

      public Integer featuredImageHeight()
      Returns the value of the featuredImageHeight record component.
      Returns:
      the value of the featuredImageHeight record component
    • metaTitle

      public String metaTitle()
      Returns the value of the metaTitle record component.
      Returns:
      the value of the metaTitle record component
    • metaDescription

      public String metaDescription()
      Returns the value of the metaDescription record component.
      Returns:
      the value of the metaDescription record component
    • locale

      public String locale()
      Returns the value of the locale record component.
      Returns:
      the value of the locale record component