Package com.freewebsys.sns.service

Examples of com.freewebsys.sns.service.CommentException


  public void deleteCommentById(Integer id) throws CommentException {
    try{
      Comment comment = (Comment) baseDao.findById(Comment.class, id);
      baseDao.delete(comment);
    } catch (Exception e) {
      throw new CommentException("Comment删除异常");
    }
  }
View Full Code Here


  @Transactional
  public void saveComment(Comment comment) throws CommentException {
    try {
      baseDao.save(comment);
    } catch (Exception e) {
      throw new CommentException("Comment保存异常");
    }
  }
View Full Code Here

  @Transactional
  public Comment findCommentById(Integer id) throws CommentException {
    try {
      return (Comment) baseDao.findById(Comment.class, id);
    } catch (Exception e) {
      throw new CommentException("Comment按ID查询异常");
    }
  }
View Full Code Here

      hql += values[0].toString();
      // Object[]需要进行强制转换.
      hql += " order by module.createTime desc ";
      return baseDao.findPage(start, limit, hql, (Object[]) values[1]);
    } catch (Exception e) {
      throw new CommentException("Comment分页异常");
    }
  }
View Full Code Here

      Object[] values = CommonDaoUtil.commonQuery(map);
      hql += values[0].toString();
      // Object[]需要进行强制转换.
      return baseDao.find(hql, (Object[]) values[1]);
    } catch (Exception e) {
      throw new CommentException("查询Comment全部异常");
    }
  }
View Full Code Here

TOP

Related Classes of com.freewebsys.sns.service.CommentException

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.