Package com.skyline.wo.model

Examples of com.skyline.wo.model.Article


  public ModelAndView modifyArticleExecute(@PathVariable Long articleId, String title, String content, String digest, Long categoryId,
      String categoryName, Integer authority, String submitToken) {
    User user = (User) WebHelper.getSessionAttribute(null, Constant.SESSION_USER);
    ModelAndView mav = new ModelAndView();
    if (user != null) {
      Article article = new Article(authority, user.getId(), user.getPortrait(), user.getNickname(), title, content, digest,
          categoryId, categoryName);
      article.setSubmitToken(submitToken);
      // //
      String errMsg = validateForm("modifyArticleForm", article);
      if (errMsg != null) {
        ModelAndView returnMav = modifyArticleRequest(articleId);
        return processValidationErrors("errMsg", errMsg, returnMav);
View Full Code Here


  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;
  }
View Full Code Here

  public static ArticleSimpleMapper 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.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;
  }
View Full Code Here

TOP

Related Classes of com.skyline.wo.model.Article

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.