1 43 package net.jforum.dao; 44 45 import java.util.Collection ; 46 import java.util.List ; 47 import java.util.Map ; 48 49 import net.jforum.entities.Topic; 50 51 61 public interface TopicDAO 62 { 63 70 public void fixFirstLastPostId(int topicId) throws Exception ; 71 72 80 public Topic selectById(int topicId) throws Exception ; 81 82 90 public Topic selectRaw(int topicId) throws Exception ; 91 92 99 public List selectAllByForum(int forumId) throws Exception ; 100 101 public List selectTopicTitlesByIds(Collection idList) throws Exception ; 102 103 111 public List selectAllByForumByLimit(int forumId, int startFrom, int count) throws Exception ; 112 113 119 public List selectByUserByLimit(int userId,int startFrom, int count) throws Exception ; 120 121 127 public int countUserTopics(int userId) throws Exception ; 128 129 136 public List selectLastN(int count) throws Exception ; 137 138 146 public void delete(Topic topic) throws Exception ; 147 148 154 public void deleteTopics(List topics) throws Exception ; 155 156 161 public void deleteByForum(int forumId) throws Exception ; 162 163 170 public void update(Topic topic) throws Exception ; 171 172 179 public int addNew(Topic topic) throws Exception ; 180 181 187 public void incrementTotalViews(int topicId) throws Exception ; 188 189 195 public void incrementTotalReplies(int topicId) throws Exception ; 196 197 203 public void decrementTotalReplies(int topicId) throws Exception ; 204 205 212 public void setLastPostId(int topicId, int postId) throws Exception ; 213 214 220 public int getMaxPostId(int topicId) throws Exception ; 221 222 229 public int getTotalPosts(int topicId) throws Exception ; 230 231 239 public List notifyUsers(Topic topic) throws Exception ; 240 241 248 public void subscribeUser(int topicId, int userId) throws Exception ; 249 250 258 public boolean isUserSubscribed(int topicId, int userId) throws Exception ; 259 260 267 public void removeSubscription(int topicId, int userId) throws Exception ; 268 269 275 public void removeSubscriptionByTopic(int topicId) throws Exception ; 276 277 285 public void updateReadStatus(int topicId, int userId, boolean read) throws Exception ; 286 287 295 public void lockUnlock(int[] topicId, int status) throws Exception ; 296 297 303 public List selectRecentTopics (int limit) throws Exception ; 304 305 312 public void setFirstPostId(int topicId, int postId) throws Exception ; 313 314 320 public int getMinPostId(int topicId) throws Exception ; 321 322 329 public void setModerationStatus(int forumId, boolean status) throws Exception ; 330 331 338 public void setModerationStatusByTopic(int topicId, boolean status) throws Exception ; 339 340 348 public Map topicPosters(int topicId) throws Exception ; 349 } 350 | Popular Tags |