Interface CommentMapper


public interface CommentMapper
Maps between comment entities and DTOs using MapStruct.
  • Method Summary

    Modifier and Type
    Method
    Description
    toCommentDTO(CommentEntity commentEntity, Long postId, Long authorId)
    Converts a comment entity to a comment DTO.
  • Method Details

    • toCommentDTO

      CommentDTO toCommentDTO(CommentEntity commentEntity, Long postId, Long authorId)
      Converts a comment entity to a comment DTO.
      Parameters:
      commentEntity - the comment entity to convert
      postId - the ID of the post the comment belongs to
      authorId - the ID of the comment author
      Returns:
      comment DTO with all fields populated