public static ArticleMapper getMapper() {
return MAPPER;
}
public Article mapRow(ResultSet rs, int rowNum) throws SQLException {
Article article = new Article();
article.setAuthority(rs.getInt(COLUMN_AUTHORITY));
article.setCommentNum(rs.getInt(COLUMN_COMMENT_NUM));
article.setContent(rs.getString(COLUMN_CONTENT));
article.setCategoryId(rs.getLong(COLUMN_CATEGORY_ID));
article.setCategoryName(rs.getString(COLUMN_CATEGORY_NAME));
article.setDigest(rs.getString(COLUMN_DIGEST));
article.setCreateTime(rs.getTimestamp(COLUMN_CREATE_TIME));
article.setId(rs.getLong(COLUMN_ID));
article.setOwnerId(rs.getLong(COLUMN_OWNER_ID));
article.setOwnerNickname(rs.getString(COLUMN_OWNER_NICKNAME));
article.setOwnerPortrait(rs.getString(COLUMN_OWNER_PORTRAIT));
article.setVisitNum(rs.getInt(COLUMN_VISIT_NUM));
article.setShareNum(rs.getInt(COLUMN_SHARE_NUM));
article.setTitle(rs.getString(COLUMN_TITLE));
article.setUpdateTime(rs.getTimestamp(COLUMN_UPATE_TIME));
article.setUp(rs.getInt(COLUMN_UP));
article.setDown(rs.getInt(COLUMN_DOWN));
return article;
}