Ejemplo n.º 1
0
  public ForumThread createForumThread(ForumThread forumThread) {

    // TODO: 檢查討論區名稱是否已經存在

    UUID uuid = UUID.randomUUID();
    forumThread.setUuid(String.valueOf(uuid));
    forumThread.setCreateTime(new Timestamp((new Date()).getTime()));

    ForumThread createdForumThread = forumThreadDao.create(forumThread);
    return createdForumThread;
  }
Ejemplo n.º 2
0
  public List<ForumThread> queryForumThreadList(String forumUuid) {
    Map<String, Object> params = new HashMap<String, Object>();
    params.put("forumUuid", forumUuid);

    @SuppressWarnings("unchecked")
    List<ForumThread> resultSet =
        (List<ForumThread>)
            forumThreadDao.queryByNamedQuery("ForumManagement.queryForumThreadList", params);

    return resultSet;
  }