Record Class ArticleDTO
java.lang.Object
java.lang.Record
com.endurancetrio.business.insight.dto.ArticleDTO
- Record Components:
id- the unique identifier of the articleslug- 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 localeintroText- the introductory HTML content (must be non-null and non-blank)fullText- the optional full HTML content of the article- the display name of the author, resolved fromAuthor.knownName(must be non-null and non-blank)publishedDate- the optional publication date of the articlefeaturedImage- the optional URL of the featured imagefeaturedImageWidth- the optional width of the featured image in pixels, used for OG meta tagsfeaturedImageHeight- the optional height of the featured image in pixels, used for OG meta tagsmetaTitle- the optional SEO meta title in the requested localemetaDescription- the optional SEO meta description in the requested localelocale- 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 Summary
ConstructorsConstructorDescriptionArticleDTO(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 aArticleDTOrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theauthorNamerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefeaturedImagerecord component.Returns the value of thefeaturedImageHeightrecord component.Returns the value of thefeaturedImageWidthrecord component.fullText()Returns the value of thefullTextrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theintroTextrecord component.locale()Returns the value of thelocalerecord component.Returns the value of themetaDescriptionrecord component.Returns the value of themetaTitlerecord component.Returns the value of thepublishedDaterecord component.slug()Returns the value of theslugrecord component.subtitle()Returns the value of thesubtitlerecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
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 aArticleDTOrecord class.- Parameters:
id- the value for theidrecord componentslug- the value for theslugrecord componenttitle- the value for thetitlerecord componentsubtitle- the value for thesubtitlerecord componentintroText- the value for theintroTextrecord componentfullText- the value for thefullTextrecord componentauthorName- the value for theauthorNamerecord componentpublishedDate- the value for thepublishedDaterecord componentfeaturedImage- the value for thefeaturedImagerecord componentfeaturedImageWidth- the value for thefeaturedImageWidthrecord componentfeaturedImageHeight- the value for thefeaturedImageHeightrecord componentmetaTitle- the value for themetaTitlerecord componentmetaDescription- the value for themetaDescriptionrecord componentlocale- the value for thelocalerecord component
-
-
Method Details
-
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. -
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. -
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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
slug
Returns the value of theslugrecord component.- Returns:
- the value of the
slugrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
subtitle
Returns the value of thesubtitlerecord component.- Returns:
- the value of the
subtitlerecord component
-
introText
Returns the value of theintroTextrecord component.- Returns:
- the value of the
introTextrecord component
-
fullText
Returns the value of thefullTextrecord component.- Returns:
- the value of the
fullTextrecord component
-
authorName
Returns the value of theauthorNamerecord component.- Returns:
- the value of the
authorNamerecord component
-
publishedDate
Returns the value of thepublishedDaterecord component.- Returns:
- the value of the
publishedDaterecord component
-
featuredImage
Returns the value of thefeaturedImagerecord component.- Returns:
- the value of the
featuredImagerecord component
-
featuredImageWidth
Returns the value of thefeaturedImageWidthrecord component.- Returns:
- the value of the
featuredImageWidthrecord component
-
featuredImageHeight
Returns the value of thefeaturedImageHeightrecord component.- Returns:
- the value of the
featuredImageHeightrecord component
-
metaTitle
Returns the value of themetaTitlerecord component.- Returns:
- the value of the
metaTitlerecord component
-
metaDescription
Returns the value of themetaDescriptionrecord component.- Returns:
- the value of the
metaDescriptionrecord component
-
locale
Returns the value of thelocalerecord component.- Returns:
- the value of the
localerecord component
-