| net.jforum.dao.ForumDAO
All known Subclasses: net.jforum.dao.generic.GenericForumDAO,
ForumDAO | public interface ForumDAO (Code) | | Model interface for
net.jforum.entities.Forum .
This interface defines methods which are expected to be
implementd by a specific data access driver. The intention is
to provide all functionality needed to update, insert, delete and
select some specific data.
author: Rafael Steil version: $Id: ForumDAO.java,v 1.12 2006/08/28 23:22:27 rafaelsteil Exp $ |
Method Summary | |
public int | addNew(Forum forum) Adds a new Forum. | public List | checkUnreadTopics(int forumId, long lastVisit) Check if the forum has unread topics.
Parameters: forumId - The forum's id to check Parameters: lastVisit - The last visit time the user has seen the forum An java.util.List instance, where each entry is anet.jforum.entities.Topic instance. | public void | decrementTotalTopics(int forumId, int count) | public void | delete(int forumId) Delete a forum. | public int | discoverForumId(String listEmail) | public ForumStats | getBoardStatus() | public LastPostInfo | getLastPostInfo(int forumId) Gets information about the latest message posted in some forum. | public int | getMaxPostId(int forumId) | public List | getModeratorList(int forumId) Get all moderators of some forum
Parameters: forumId - the forum's id to inspect a list with all moderators. | public int | getTotalMessages() | public int | getTotalTopics(int forumId) | public void | incrementTotalTopics(int forumId, int count) | public boolean | isUserSubscribed(int forumId, int userId) Return the subscrition status of the user on the forum. | public void | moveTopics(String[] topics, int fromForumId, int toForumId) | public List | notifyUsers(Forum forum) Get the users to notify
Parameters: forum - The forum ArrayList of User objects. | public void | removeSubscription(int forumId, int userId) | public void | removeSubscriptionByForum(int forumId) | public List | selectAll() Selects all forums data from the database. | public Forum | selectById(int forumId) Gets a specific Forum . | public void | setLastPost(int forumId, int postId) | public void | setModerated(int categoryId, boolean status) Enable or disabled moderation for the forum. | public Forum | setOrderDown(Forum forum, Forum related) Sets the forum's order one level down.
For more information, take a look at @link #setOrderUp method. | public Forum | setOrderUp(Forum forum, Forum related) Sets the forum's order one level up. | public void | subscribeUser(int forumId, int userId) | public void | update(Forum forum) Updates a Forum. |
addNew | public int addNew(Forum forum)(Code) | | Adds a new Forum.
Parameters: forum - Reference to a valid and configured Forum object The forum's ID |
checkUnreadTopics | public List checkUnreadTopics(int forumId, long lastVisit)(Code) | | Check if the forum has unread topics.
Parameters: forumId - The forum's id to check Parameters: lastVisit - The last visit time the user has seen the forum An java.util.List instance, where each entry is anet.jforum.entities.Topic instance. |
decrementTotalTopics | public void decrementTotalTopics(int forumId, int count)(Code) | | Decrements the total number of topics of a forum
Parameters: forumId - The forum ID to update Parameters: count - Decrement a total of count elements |
delete | public void delete(int forumId)(Code) | | Delete a forum.
Parameters: forumId - The forum ID to delete |
discoverForumId | public int discoverForumId(String listEmail)(Code) | | Given an email address, finds the forum Id
Parameters: listEmail - the email of the forum the forum id of the given email, or 0 if not found |
getBoardStatus | public ForumStats getBoardStatus()(Code) | | Ges general statistics from the board
ForumStats |
getLastPostInfo | public LastPostInfo getLastPostInfo(int forumId)(Code) | | Gets information about the latest message posted in some forum.
Parameters: forumId - the forum's id to inspect A LastPostInfo instance |
getMaxPostId | public int getMaxPostId(int forumId)(Code) | | Gets the last post id associated to the forum
Parameters: forumId - The forum id int |
getModeratorList | public List getModeratorList(int forumId)(Code) | | Get all moderators of some forum
Parameters: forumId - the forum's id to inspect a list with all moderators. Each entry is an instance ofnet.jforum.entities.ModeratorInfo |
getTotalMessages | public int getTotalMessages()(Code) | | Gets the total number of messages of a forum
int |
getTotalTopics | public int getTotalTopics(int forumId)(Code) | | Gets the total number os topics of some forum
Total of topics Parameters: forumId - int |
incrementTotalTopics | public void incrementTotalTopics(int forumId, int count)(Code) | | Increments the total number of topics of a forum
Parameters: forumId - The forum ID to update Parameters: count - Increment a total of count elements |
isUserSubscribed | public boolean isUserSubscribed(int forumId, int userId)(Code) | | Return the subscrition status of the user on the forum.
Added by socialnetwork@gmail.com
Parameters: forumId - int Parameters: userId - int boolean |
moveTopics | public void moveTopics(String[] topics, int fromForumId, int toForumId)(Code) | | Move the topics to a new forum
Parameters: topics - The topics id array Parameters: fromForumId - The original forum id Parameters: toForumId - The destination forum id |
notifyUsers | public List notifyUsers(Forum forum)(Code) | | Get the users to notify
Parameters: forum - The forum ArrayList of User objects. Eachentry is an user who will receive the new topic in the forum notification |
removeSubscription | public void removeSubscription(int forumId, int userId)(Code) | | Remove the user's subscription of the forum
Parameters: forumId - The forum id Parameters: userId - the User id |
removeSubscriptionByForum | public void removeSubscriptionByForum(int forumId)(Code) | | Clean all subscriptions of some forum
Parameters: forumId - The forum id |
selectById | public Forum selectById(int forumId)(Code) | | Gets a specific Forum .
Parameters: forumId - The ForumID to search Forum object containing all the information See Also: ForumDAO.selectAll |
setLastPost | public void setLastPost(int forumId, int postId)(Code) | | Sets the last topic of a forum
Parameters: forumId - The forum ID to update Parameters: postId - Last post ID |
setModerated | public void setModerated(int categoryId, boolean status)(Code) | | Enable or disabled moderation for the forum.
Parameters: categoryId - The main category for the forum Parameters: status - a boolean value representing the desired status |
setOrderDown | public Forum setOrderDown(Forum forum, Forum related)(Code) | | Sets the forum's order one level down.
For more information, take a look at @link #setOrderUp method.
The only different between both is that this method sends the
forum order down.
Parameters: forum - The forum to change its order Parameters: related - The forum which comes after the forum we want to change The changed forum, with the new order set |
setOrderUp | public Forum setOrderUp(Forum forum, Forum related)(Code) | | Sets the forum's order one level up.
When you call this method on a specific forum, the forum that
is one level up will be sent down one level, and the forum which
you are sending up wil take the order position of the forum which
was sent down.
Parameters: forum - The forum to change its order Parameters: related - The forum which comes before the forum we want to change The changed forum, with the new order set |
subscribeUser | public void subscribeUser(int forumId, int userId)(Code) | | Subscribe the user for notification of new topic in the forum
Added by socialnetwork@gmail.com
Parameters: forumId - int Parameters: userId - int |
update | public void update(Forum forum)(Code) | | Updates a Forum.
Parameters: forum - Reference to a Forum object to update |
|
|