| |
|
| java.lang.Object net.jforum.repository.TopicRepository
TopicRepository | public class TopicRepository implements Cacheable(Code) | | Repository for the last n topics for each forum.
author: Rafael Steil author: James Yong version: $Id: TopicRepository.java,v 1.33 2007/09/05 04:00:27 rafaelsteil Exp $ |
addAll | public static void addAll(int forumId, List topics)(Code) | | Add topics to the cache
Parameters: forumId - The forum id to which the topics are related Parameters: topics - The topics to add |
addTopic | public static void addTopic(Topic topic)(Code) | | Adds a new topic to the cache
Parameters: topic - The topic to add |
clearCache | public static void clearCache(int forumId)(Code) | | Clears the cache
Parameters: forumId - The forum id to clear the cache |
getHottestTopics | public static List getHottestTopics()(Code) | | Get all cached hottest topics.
|
getRecentTopics | public static List getRecentTopics()(Code) | | Get all cached recent topics.
|
getTopic | public static Topic getTopic(Topic t)(Code) | | Gets a cached topic.
Parameters: t - The topic to try to get from the cache. The instancepassed as argument should have ae least the topicId and forumId set The topic instance, if found, or null otherwise. |
getTopics | public static List getTopics(int forumid)(Code) | | Get all cached topics related to a forum.
Parameters: forumid - The forum id ArrayList with the topics. |
isLoaded | public static boolean isLoaded(int forumId)(Code) | | |
isTopicCached | public static boolean isTopicCached(Topic topic)(Code) | | Checks if a topic is cached
Parameters: topic - The topic to verify true if the topic is cached, or false if not. |
loadHottestTopics | public static synchronized List loadHottestTopics()(Code) | | Add hottest topics to the cache
|
loadMostRecentTopics | public static synchronized List loadMostRecentTopics()(Code) | | Add recent topics to the cache
|
pushTopic | public static synchronized void pushTopic(Topic topic)(Code) | | Add topic to the FIFO stack
Parameters: topic - The topic to add to stack |
updateTopic | public static void updateTopic(Topic topic)(Code) | | Updates a cached topic
Parameters: topic - The topic to update |
|
|
|