All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.haoxuer.discover.article.rest.convert.ArticleLikeSimpleConver Maven / Gradle / Ivy

There is a newer version: 3.3.18-20230117
Show newest version
package com.haoxuer.discover.article.rest.convert;

import com.haoxuer.discover.article.api.domain.simple.ArticleLikeSimple;
import com.haoxuer.discover.article.data.entity.ArticleLike;
import com.haoxuer.discover.data.rest.core.Conver;


public class ArticleLikeSimpleConver implements Conver {
    @Override
    public ArticleLikeSimple conver(ArticleLike source) {
        ArticleLikeSimple result = new ArticleLikeSimple();
        result.setId(source.getId());
        if(source.getUser()!=null){
           result.setUser(source.getUser().getId());
        }
        if(source.getArticle()!=null){
           result.setArticle(source.getArticle().getId());
        }


        return result;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy