admin
2020-09-02 ab141df783309d4a704f7b7d20aa465bf42ed371
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.yeshi.buwan.util.factory;
 
import com.yeshi.buwan.domain.SolrVideo;
import com.yeshi.buwan.domain.VideoInfo;
 
import java.util.Date;
 
public class SolrVideoFactory {
 
 
    public static SolrVideo create(VideoInfo videoInfo) {
        SolrVideo solrVideo = new SolrVideo();
        solrVideo.setMainactor(videoInfo.getMainActor());
        solrVideo.setShow(Integer.parseInt(videoInfo.getShow()));
        solrVideo.setLatestHpicture(videoInfo.getLatestHpicture());
        solrVideo.setDuration(videoInfo.getDuration());
        solrVideo.setScore(videoInfo.getScore());
        solrVideo.setVpicture(videoInfo.getVpicture());
        solrVideo.setLatestVpicture(videoInfo.getLatestVpicture());
        solrVideo.setId(videoInfo.getId());
        solrVideo.setTag(videoInfo.getTag());
        solrVideo.setHpicture(videoInfo.getHpicture());
        solrVideo.setArea(videoInfo.getArea());
        solrVideo.setCreatetime(videoInfo.getCreatetime() + "");
        solrVideo.setWatchcount(Integer.parseInt(videoInfo.getWatchCount()));
        solrVideo.setDirector(videoInfo.getDirector());
        solrVideo.setPicture(videoInfo.getPicture());
        solrVideo.setContenttype(videoInfo.getContentType());
        solrVideo.setSolrTime(new Date());
        solrVideo.setCommentcount(videoInfo.getCommentCount());
        solrVideo.setVideocount(videoInfo.getVideocount());
        solrVideo.setName(videoInfo.getName());
        solrVideo.setUpdatetime(videoInfo.getUpdatetime());
        return solrVideo;
    }
}