/**
 * cn.edu.fudan.iipl
 * Copyright (c).
 */
package cn.edu.fudan.iipl.util;

import cn.edu.fudan.iipl.entity.Article;
import cn.edu.fudan.iipl.form.ArticleForm;

/**
 * article转换类
 * @author racing
 * @version $Id: ArticleConvertor.java, v 0.1 Aug 8, 2015 6:49:01 PM racing Exp $
 */
public class ArticleConvertor {

    /**
     * ArticleForm转换成Article
     * @param form
     * @return Article
     */
    public static Article convertToArticleForm(ArticleForm form) {
        Article article = new Article();
        article.setTitle(form.getTitle());
        article.setMainBody(form.getMainBody());
        article.setCategory(form.getCategory());
        article.setGmtCreate(form.getGmtCreate());
        article.setGmtModify(form.getGmtModify());
        article.setAuthor(form.getAuthor());
        return article;
    }
}

@@ -1,32 +1,21 @@
 /**%0A * 
-cn.edu.fudan.iipl
+ychen.
 %0A * Copy
@@ -426,10 +426,8 @@
 vert
-To
 Arti
@@ -433,16 +433,25 @@
 icleForm
+ToArticle
 (Article

add convertArticleFormToArticle