src/main/java/org/odessajavaclub/topic/domain/Topic.java
public static Topic from(Topic topic, TopicId topicId) {
    Topic result = new Topic();
    result.setId(topicId);
    result.setTitle(topic.getTitle());
    result.setEvent(topic.getEvent());
    result.setType(topic.getType());
    result.setStatus(topic.getStatus());
    result.setScore(topic.getScore());
    return result;
  }
/**
   * Constructs a {@link Topic} from a {@link Topic} and topic id.
   *
   * @param topic   topic
   * @param topicId topic id
   * @return an instance of {@link Topic}
   */
Constructs a  Topic from a  Topic and topic id.
@param topic   topic
@param topicId topic id
@return an instance of  Topic
Constructs a Topic from a Topic and topic id . @param topic topic @param topicId topic id @return an instance of Topic
public static Topic from(Topic topic, TopicId topicId) {
    Topic result = new Topic();
    result.setId(topicId);
    result.setTitle(topic.getTitle());
    result.setEvent(topic.getEvent());
    result.setType(topic.getType());
    result.setStatus(topic.getStatus());
    result.setScore(topic.getScore());
    return result;
  }
public static Topic from ( Topic topic , TopicId topicId ) { Topic result = new Topic ( ) ; result . setId ( topicId ) ; result . setTitle ( topic . getTitle ( ) ) ; result . setEvent ( topic . getEvent ( ) ) ; result . setType ( topic . getType ( ) ) ; result . setStatus ( topic . getStatus ( ) ) ; result . setScore ( topic . getScore ( ) ) ; return result ; }
Constructs a {@link Topic} from a {@link Topic} and topic id.
Constructs a { @link Topic } from a { @link Topic } and topic id .