Java Doc for TopicDAO.java in  » Forum » JForum-2.1.8 » net » jforum » dao » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Forum » JForum 2.1.8 » net.jforum.dao 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


net.jforum.dao.TopicDAO

All known Subclasses:   net.jforum.dao.generic.GenericTopicDAO,
TopicDAO
public interface TopicDAO (Code)
Model interface for net.jforum.entities.Topic . 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: TopicDAO.java,v 1.18 2007/09/09 22:53:36 rafaelsteil Exp $




Method Summary
public  intaddNew(Topic topic)
     Adds a new Topic.
public  intcountUserTopics(int userId)
    
public  voiddecrementTotalReplies(int topicId)
    
public  voiddelete(Topic topic, boolean fromModeration)
     Delete a Topic.
public  voiddeleteByForum(int forumId)
    
public  voiddeleteTopics(List topics, boolean fromModeration)
     Deletes a set of topics
Parameters:
  topics - The topics to delete.
public  SearchResultfindTopicsByDateRange(SearchArgs args)
    
public  voidfixFirstLastPostId(int topicId)
     Fixes the fields topic_first_post_id and topic_last_post_id.
public  intgetMaxPostId(int topicId)
    
public  intgetMinPostId(int topicId)
    
public  intgetTotalPosts(int topicId)
     Gets the number of posts the topic has.
public  voidincrementTotalReplies(int topicId)
    
public  voidincrementTotalViews(int topicId)
    
public  booleanisUserSubscribed(int topicId, int userId)
     Return the subscrition status of the user on the topic.
public  voidlockUnlock(int[] topicId, int status)
     Lock or unlock a topic.
public  ListnotifyUsers(Topic topic)
     Get the users to notify
Parameters:
  topic - The topic ArrayList of User objects.
public  voidremoveSubscription(int topicId, int userId)
    
public  voidremoveSubscriptionByTopic(int topicId)
    
public  ListselectAllByForum(int forumId)
     Selects all topics associated to a specific forum
Parameters:
  forumId - The forum id to select the topics ArrayList with all topics found.
public  ListselectAllByForumByLimit(int forumId, int startFrom, int count)
     Selects all topics associated to a specific forum, limiting the total number of records returned.
Parameters:
  forumId - The forum id to select the topics ArrayList with all topics found.
public  TopicselectById(int topicId)
     Gets a specific Topic.
public  ListselectByUserByLimit(int userId, int startFrom, int count)
    
public  ListselectHottestTopics(int limit)
    
public  TopicselectRaw(int topicId)
     Gets a topic's information from the topics table only. No other information, like usernames, are fetched.
public  ListselectRecentTopics(int limit)
    
public  ListselectTopicTitlesByIds(Collection idList)
    
public  voidsetFirstPostId(int topicId, int postId)
    
public  voidsetLastPostId(int topicId, int postId)
    
public  voidsetModerationStatus(int forumId, boolean status)
     Sets the moderatation flag for all topics of a given forum.
public  voidsetModerationStatusByTopic(int topicId, boolean status)
     Sets the moderatation flag for a given topic.
public  voidsubscribeUser(int topicId, int userId)
    
public  voidsubscribeUsers(int topicId, List users)
    
public  MaptopicPosters(int topicId)
     Get all unique posters of some topic
Parameters:
  topicId - int A Map instance with all topic posts.
public  voidupdate(Topic topic)
     Updates a Topic.
public  voidupdateReadStatus(int topicId, int userId, boolean read)
    



Method Detail
addNew
public int addNew(Topic topic)(Code)
Adds a new Topic.
Parameters:
  topic - Reference to a valid and configured Topic object The new ID



countUserTopics
public int countUserTopics(int userId)(Code)
How many topics were created by a given user
Parameters:
  userId - the user id to check the number of topics created by the user



decrementTotalReplies
public void decrementTotalReplies(int topicId)(Code)
Decrements the number of replies the topic has
Parameters:
  topicId - The topic ID to decrement the total number of replies



delete
public void delete(Topic topic, boolean fromModeration)(Code)
Delete a Topic.
Parameters:
  topic - The Topic ID to delete
Parameters:
  fromModeration - boolean



deleteByForum
public void deleteByForum(int forumId)(Code)
Deletes all topics from a forum
Parameters:
  forumId - int



deleteTopics
public void deleteTopics(List topics, boolean fromModeration)(Code)
Deletes a set of topics
Parameters:
  topics - The topics to delete. Each entry must bean instance of net.jforum.entities.Topic
Parameters:
  fromModeration - boolean



findTopicsByDateRange
public SearchResult findTopicsByDateRange(SearchArgs args)(Code)

Parameters:
  args -



fixFirstLastPostId
public void fixFirstLastPostId(int topicId)(Code)
Fixes the fields topic_first_post_id and topic_last_post_id.
Parameters:
  topicId - The topic id to fix



getMaxPostId
public int getMaxPostId(int topicId)(Code)
Gets the last post id associated to the topic
Parameters:
  topicId - The topic id int



getMinPostId
public int getMinPostId(int topicId)(Code)
Gets the first post id associated to the topic
Parameters:
  topicId - The topic id int



getTotalPosts
public int getTotalPosts(int topicId)(Code)
Gets the number of posts the topic has.
Parameters:
  topicId - The topic id The number of posts



incrementTotalReplies
public void incrementTotalReplies(int topicId)(Code)
Increments the number of replies the topic has
Parameters:
  topicId - The topic ID to increment the total number of replies



incrementTotalViews
public void incrementTotalViews(int topicId)(Code)
Increments the number of times the topic was saw
Parameters:
  topicId - The topic ID to increment the total number of views



isUserSubscribed
public boolean isUserSubscribed(int topicId, int userId)(Code)
Return the subscrition status of the user on the topic.
Parameters:
  topicId - The topic id
Parameters:
  userId - The user id true if the user is waiting notification on the topic



lockUnlock
public void lockUnlock(int[] topicId, int status)(Code)
Lock or unlock a topic.
Parameters:
  topicId - The topic id to perform the action on
Parameters:
  status - Use Topic.STATUS_LOCKED to lock the topic, orTopic.STATUS_UNLOCKED to unlock.



notifyUsers
public List notifyUsers(Topic topic)(Code)
Get the users to notify
Parameters:
  topic - The topic ArrayList of User objects. Eachentry is an user who will receive the topic anwser notification



removeSubscription
public void removeSubscription(int topicId, int userId)(Code)
Remove the user's subscription of the topic
Parameters:
  topicId - The topic id
Parameters:
  userId - the User id



removeSubscriptionByTopic
public void removeSubscriptionByTopic(int topicId)(Code)
Clean all subscriptions of some topic
Parameters:
  topicId - The topic id



selectAllByForum
public List selectAllByForum(int forumId)(Code)
Selects all topics associated to a specific forum
Parameters:
  forumId - The forum id to select the topics ArrayList with all topics found. Each entry is a net.jforum.Topic object



selectAllByForumByLimit
public List selectAllByForumByLimit(int forumId, int startFrom, int count)(Code)
Selects all topics associated to a specific forum, limiting the total number of records returned.
Parameters:
  forumId - The forum id to select the topics ArrayList with all topics found. Each entry is a net.jforum.Topic object
Parameters:
  startFrom - int
Parameters:
  count - int



selectById
public Topic selectById(int topicId)(Code)
Gets a specific Topic.
Parameters:
  topicId - The Topic ID to search Topicobject containing all the information
See Also:   TopicDAO.selectAllByForum(int forumId)



selectByUserByLimit
public List selectByUserByLimit(int userId, int startFrom, int count)(Code)
Selects all topics associated to a specific user and belonging to given forums
Parameters:
  userId - int User ID.
Parameters:
  startFrom - int
Parameters:
  count - int List



selectHottestTopics
public List selectHottestTopics(int limit)(Code)
Selects hottest topics
Parameters:
  limit - The number of topics to retrieve List



selectRaw
public Topic selectRaw(int topicId)(Code)
Gets a topic's information from the topics table only. No other information, like usernames, are fetched.
Parameters:
  topicId - The topic id to get A topic instance



selectRecentTopics
public List selectRecentTopics(int limit)(Code)
Selects recent topics
Parameters:
  limit - The number of topics to retrieve List



selectTopicTitlesByIds
public List selectTopicTitlesByIds(Collection idList)(Code)



setFirstPostId
public void setFirstPostId(int topicId, int postId)(Code)
Sets the ID of the first post of the topic
Parameters:
  topicId - Topic ID
Parameters:
  postId - Post ID



setLastPostId
public void setLastPostId(int topicId, int postId)(Code)
Sets the ID of the last post of the topic
Parameters:
  topicId - Topic ID
Parameters:
  postId - Post ID



setModerationStatus
public void setModerationStatus(int forumId, boolean status)(Code)
Sets the moderatation flag for all topics of a given forum.
Parameters:
  forumId - The forum id
Parameters:
  status - boolean



setModerationStatusByTopic
public void setModerationStatusByTopic(int topicId, boolean status)(Code)
Sets the moderatation flag for a given topic.
Parameters:
  topicId - The topic id
Parameters:
  status - boolean



subscribeUser
public void subscribeUser(int topicId, int userId)(Code)
Subscribe the user for notification of new post in the topic
Parameters:
  topicId - The topic id
Parameters:
  userId - The user id



subscribeUsers
public void subscribeUsers(int topicId, List users)(Code)
Subscribe a set of users for notification of new post in the topic
Parameters:
  topicId - the topic id
Parameters:
  users - the relation of User instances to subscribe



topicPosters
public Map topicPosters(int topicId)(Code)
Get all unique posters of some topic
Parameters:
  topicId - int A Map instance with all topic posts. Key is the userid, value is an net.jforum.entities.User instance with minimumdata filled



update
public void update(Topic topic)(Code)
Updates a Topic.
Parameters:
  topic - Reference to a Topic object to update



updateReadStatus
public void updateReadStatus(int topicId, int userId, boolean read)(Code)
Change the topic read status
Parameters:
  topicId - The topic id
Parameters:
  userId - The user id
Parameters:
  read - true or false



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.