src/main/java/org/odessajavaclub/topic/adapter/out/persistence/TopicEntityMapper.java
public Topic toTopic(TopicEntity topicEntity) {
    Topic topic = new Topic();
    Topic.TopicId topicId =
        topicEntity.getId() != null ? new Topic.TopicId(topicEntity.getId()) : null;
    topic.setId(topicId);
    topic.setAuthor(topicEntity.getAuthor());
    topic.setTitle(topicEntity.getTitle());
    topic.setEvent(topicEntity.getEvent());
    topic.setStatus(topicEntity.getStatus());
    topic.setType(topicEntity.getType());
    topic.setScore(topicEntity.getScore());
    return topic;
  }
/**
   * Maps {@link TopicEntity} to {@link Topic}.
   *
   * @param topicEntity {@link TopicEntity}
   * @return {@link Topic}
   */
Maps  TopicEntity to  Topic.
@param topicEntity  TopicEntity
@return  Topic
Maps TopicEntity to Topic . @param topicEntity TopicEntity @return Topic
public Topic toTopic(TopicEntity topicEntity) {
    Topic topic = new Topic();
    Topic.TopicId topicId =
        topicEntity.getId() != null ? new Topic.TopicId(topicEntity.getId()) : null;
    topic.setId(topicId);
    topic.setAuthor(topicEntity.getAuthor());
    topic.setTitle(topicEntity.getTitle());
    topic.setEvent(topicEntity.getEvent());
    topic.setStatus(topicEntity.getStatus());
    topic.setType(topicEntity.getType());
    topic.setScore(topicEntity.getScore());
    return topic;
  }
public Topic toTopic ( TopicEntity topicEntity ) { Topic topic = new Topic ( ) ; Topic . TopicId topicId = topicEntity . getId ( ) != null ? new Topic . TopicId ( topicEntity . getId ( ) ) : null ; topic . setId ( topicId ) ; topic . setAuthor ( topicEntity . getAuthor ( ) ) ; topic . setTitle ( topicEntity . getTitle ( ) ) ; topic . setEvent ( topicEntity . getEvent ( ) ) ; topic . setStatus ( topicEntity . getStatus ( ) ) ; topic . setType ( topicEntity . getType ( ) ) ; topic . setScore ( topicEntity . getScore ( ) ) ; return topic ; }
Maps {@link TopicEntity} to {@link Topic}.
Maps { @link TopicEntity } to { @link Topic } .