示例#1
0
 public static Topic fromTopic(core.entities.Topic topic) {
   Topic topicModel = new Topic();
   topicModel.setTopicId(topic.getTopicId());
   topicModel.setDescription(topic.getDescription());
   topicModel.setCategory(topic.getCategory());
   topicModel.setChoices(new ArrayList<Choice>(topic.getChoices()));
   topicModel.setDateTime(topic.getDateTime().toString());
   topicModel.setUserId(topic.getUserId());
   return topicModel;
 }