blob: 8fe729e94739165d82f7f8573f87f5476a7839aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package com.blog.web.mappers;
import com.blog.web.dto.ArticleDto;
import com.blog.web.dto.ArticlePublicDto;
import com.blog.web.models.Article;
public class ArticleMapper {
private ArticleMapper() {
}
public static Article mapToArticle(ArticleDto articleDto) {
return new Article(articleDto);
}
public static ArticleDto mapToArticleDto(Article article) {
return new ArticleDto(article);
}
public static ArticlePublicDto mapToArticlePublicDto(Article article) {
return new ArticlePublicDto(article);
}
}
|