package com.yeshi.buwan.util.factory;
|
|
import com.yeshi.buwan.domain.SolrVideo;
|
import com.yeshi.buwan.domain.VideoInfo;
|
import com.yeshi.buwan.domain.VideoType;
|
|
public class VideoInfoFactory {
|
|
|
public static VideoInfo create(SolrVideo solrVideo) {
|
VideoInfo video = new VideoInfo();
|
video.setMainActor(solrVideo.getMainactor());
|
video.setShow(solrVideo.getShow() + "");
|
video.setLatestHpicture(solrVideo.getLatestHpicture());
|
video.setDuration(solrVideo.getDuration());
|
video.setScore(solrVideo.getScore());
|
video.setVpicture(solrVideo.getVpicture());
|
video.setLatestVpicture(solrVideo.getLatestVpicture());
|
video.setId(solrVideo.getId());
|
video.setTag(solrVideo.getTag());
|
video.setHpicture(solrVideo.getHpicture());
|
video.setArea(solrVideo.getArea());
|
video.setCreatetime(Long.parseLong(solrVideo.getCreatetime()));
|
video.setWatchCount(solrVideo.getWatchcount() + "");
|
video.setDirector(solrVideo.getDirector());
|
video.setPicture(solrVideo.getPicture());
|
video.setContentType(solrVideo.getContenttype());
|
video.setCommentCount(solrVideo.getCommentcount());
|
video.setVideocount(solrVideo.getVideocount());
|
video.setName(solrVideo.getName());
|
video.setUpdatetime(solrVideo.getUpdatetime());
|
video.setVideoType(new VideoType(solrVideo.getRootVideoType()));
|
|
return video;
|
}
|
}
|