Record Class PostUpdateResponseDTO
java.lang.Object
java.lang.Record
com.example.blogs.app.api.post.dto.PostUpdateResponseDTO
public record PostUpdateResponseDTO(Long id, String title, String description, String content, String slug, String previewImageUrl, LocalDateTime updatedAt)
extends Record
Response DTO for post update operations with updated fields and timestamp.
-
Constructor Summary
ConstructorsConstructorDescriptionPostUpdateResponseDTO(Long id, String title, String description, String content, String slug, String previewImageUrl, LocalDateTime updatedAt) Creates an instance of aPostUpdateResponseDTOrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncontent()Returns the value of thecontentrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of thepreviewImageUrlrecord component.slug()Returns the value of theslugrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theupdatedAtrecord component.
-
Constructor Details
-
PostUpdateResponseDTO
public PostUpdateResponseDTO(Long id, String title, String description, String content, String slug, String previewImageUrl, LocalDateTime updatedAt) Creates an instance of aPostUpdateResponseDTOrecord class.- Parameters:
id- the value for theidrecord componenttitle- the value for thetitlerecord componentdescription- the value for thedescriptionrecord componentcontent- the value for thecontentrecord componentslug- the value for theslugrecord componentpreviewImageUrl- the value for thepreviewImageUrlrecord componentupdatedAt- the value for theupdatedAtrecord 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
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
slug
Returns the value of theslugrecord component.- Returns:
- the value of the
slugrecord component
-
previewImageUrl
Returns the value of thepreviewImageUrlrecord component.- Returns:
- the value of the
previewImageUrlrecord component
-
updatedAt
Returns the value of theupdatedAtrecord component.- Returns:
- the value of the
updatedAtrecord component
-