Java Doc for QueryHandler.java in  » Wiki-Engine » JAMWiki » org » jamwiki » db » 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 » Wiki Engine » JAMWiki » org.jamwiki.db 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.jamwiki.db.QueryHandler

All known Subclasses:   org.jamwiki.db.AnsiQueryHandler,
QueryHandler
public interface QueryHandler (Code)
This interface provides all methods needed for retrieving, inserting, or updating data from the database.




Method Summary
 StringconnectionValidationQuery()
     Returns the simplest possible query that can be used to validate whether or not a database connection is valid.
 voidcreateTables(Connection conn)
     Method called to set up all JAMWiki system tables, indexes, and other required database objects.
 voiddeleteRecentChanges(int topicId, Connection conn)
     Delete all records from the recent changes table for a specific topic.
 voiddeleteRoleMapGroup(int groupId, Connection conn)
     Delete all role records for a specific group.
 voiddeleteRoleMapUser(int userId, Connection conn)
     Delete all role records for a specific user.
 voiddeleteTopicCategories(int topicId, Connection conn)
     Delete all categories associated with a topic.
 voiddeleteWatchlistEntry(int virtualWikiId, String topicName, int userId, Connection conn)
     Delete a user's watchlist entry using the topic name to determine which entry to remove.
 voiddropTables(Connection conn)
     Drop all JAMWiki database objects.
 StringexistenceValidationQuery()
     Return a simple query, that if successfully run indicates that JAMWiki tables have been initialized in the database.
 WikiResultSetgetAllTopicNames(int virtualWikiId)
     Retrieve a WikiResultSet containing all topic names that exist for a virtual wiki.
 WikiResultSetgetAllWikiFileVersions(WikiFile wikiFile, boolean descending)
     Retrieve a WikiResultSet consisting of all wiki file version information for a given wiki file.
 WikiResultSetgetCategories(int virtualWikiId, Pagination pagination)
     Retrieve a WikiResultSet containing all categories associated with a particular virtual wiki.
 WikiResultSetgetRecentChanges(String virtualWiki, Pagination pagination, boolean descending)
     Retrieve a WikiResultSet containing all recent changes made to the wiki for a specific virtual wiki.
Parameters:
  virtualWiki - The name of the virtual wiki for which changes are beingretrieved.
Parameters:
  pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved.
Parameters:
  descending - If true then results are sorted newest tooldest.
 WikiResultSetgetRecentChanges(int topicId, Pagination pagination, boolean descending)
     Retrieve a WikiResultSet containing all recent changes made to the wiki for a specific topic.
Parameters:
  topicId - The id of the topic for which recent changes are beingretrieved.
Parameters:
  pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved.
Parameters:
  descending - If true then results are sorted newest tooldest.
 WikiResultSetgetRoleMapByLogin(String loginFragment)
     Retrieve a WikiResultSet of user ids, group ids and role names for all users whose login contains the given login fragment.
Parameters:
  loginFragment - A value that must be contained with the user'slogin.
 WikiResultSetgetRoleMapByRole(String roleName)
     Retrieve a WikiResultSet of user ids, group ids and role names for all users and groups who have been assigned the specified role.
Parameters:
  roleName - The name of the role being queried against.
 WikiResultSetgetRoleMapGroup(String groupName)
     Retrieve a WikiResultSet containing all roles assigned to a given group.
Parameters:
  groupName - The name of the group for whom roles are being retrieved.
 WikiResultSetgetRoleMapGroups()
     Retrieve a WikiResultSet of user ids, group ids and role names for all groups that have been assigned a role. A WikiResultSet of user ids, group ids and role names for allgroups that have been assigned a role.
 WikiResultSetgetRoleMapUser(String login)
     Retrieve a WikiResultSet containing all roles assigned to a given user.
Parameters:
  login - The login of the user for whom roles are being retrieved.
 WikiResultSetgetRoles()
     Retrieve a WikiResultSet containing all roles that have been defined for the wiki.
 WikiResultSetgetTopicsAdmin(int virtualWikiId, Pagination pagination)
     Retrieve a WikiResultSet containing the topic names of all admin-only topics for the virtual wiki.
Parameters:
  virtualWikiId - The id of the virtual wiki for which topic namesare being retrieved.
Parameters:
  pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved.
 WikiResultSetgetUserContributions(String virtualWiki, String userString, Pagination pagination, boolean descending)
     Retrieve a WikiResultSet containing all recent changes made to the wiki by a specific user.
Parameters:
  virtualWiki - The name of the virtual wiki for which user contributionsare being retrieved.
Parameters:
  userString - The login of the user for whom changes are being retrieved; orfor anonymous users, the IP address of the user.
Parameters:
  pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved.
Parameters:
  descending - If true then results are sorted newest tooldest.
 WikiResultSetgetVirtualWikis(Connection conn)
     Retrieve a WikiResultSet containing all virtual wiki information for all virtual wikis.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
 WikiResultSetgetWatchlist(int virtualWikiId, int userId)
     Retrieve a WikiResultSet containing the topic ID and topic name for topics in the user's watchlist.
Parameters:
  virtualWikiId - The virtual wiki ID for the virtual wiki for thewatchlist topics.
Parameters:
  userId - The user ID for the user retrieving the watchlist.
 WikiResultSetgetWatchlist(int virtualWikiId, int userId, Pagination pagination)
     Retrieve a WikiResultSet containing all recent changes for topics in the user's watchlist.
Parameters:
  virtualWikiId - The virtual wiki ID for the virtual wiki for thewatchlist topics.
Parameters:
  userId - The user ID for the user retrieving the watchlist.
Parameters:
  pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved.
 voidinsertCategory(Category category, int virtualWikiId, Connection conn)
     Add a new category record to the database.
 voidinsertRecentChange(RecentChange change, int virtualWikiId, Connection conn)
     Add a new recent change record to the database.
 voidinsertRole(Role role, Connection conn)
     Add a new role record to the database.
 voidinsertRoleMap(int userId, int groupId, String role, Connection conn)
     Add a new role mapping for a specific user or group.
 voidinsertTopic(Topic topic, int virtualWikiId, Connection conn)
     Add a new topic record to the database.
 voidinsertTopicVersion(TopicVersion topicVersion, Connection conn)
     Add a new topic version record to the database.
 voidinsertVirtualWiki(VirtualWiki virtualWiki, Connection conn)
     Add a new virtual wiki record to the database.
 voidinsertWatchlistEntry(int virtualWikiId, String topicName, int userId, Connection conn)
     Add a new watchlist entry record to the database.
 voidinsertWikiFile(WikiFile wikiFile, int virtualWikiId, Connection conn)
     Add a new wiki file record to the database.
 voidinsertWikiFileVersion(WikiFileVersion wikiFileVersion, Connection conn)
     Add a new wiki file version record to the database.
 voidinsertWikiGroup(WikiGroup group, Connection conn)
     Add a new group record to the database.
 voidinsertWikiUser(WikiUser user, Connection conn)
     Add a new user record to the database.
 voidinsertWikiUserInfo(WikiUserInfo userInfo, Connection conn)
     Add a new user information record to the database.
 WikiResultSetlookupCategoryTopics(int virtualWikiId, String categoryName)
     Retrieve a result set containing the topic name and sort key for all topics associated with a category.
Parameters:
  virtualWikiId - The virtual wiki id for the virtual wiki of the topicsbeing retrieved.
Parameters:
  categoryName - The name of the category for which associated topicsare to be retrieved.
 WikiResultSetlookupTopic(int virtualWikiId, String topicName, boolean caseSensitive, Connection conn)
     Retrieve a WikiResultSet containing all topic information for a given topic.
Parameters:
  virtualWikiId - The virtual wiki id for the virtual wiki of the topicbeing retrieved.
Parameters:
  topicName - The name of the topic being retrieved.
Parameters:
  caseSensitive - Set to true if the topic name should besearched for in a case-sensitive manner.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
 WikiResultSetlookupTopicByType(int virtualWikiId, int topicType, Pagination pagination)
     Retrieve a result set of all topics of a given type within a virtual wiki.
Parameters:
  virtualWikiId - The virtual wiki id for the virtual wiki of the topicsbeing retrieved.
Parameters:
  topicType - The topic type (image, normal, etc) for the topics to beretrieved.
Parameters:
  pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved.
 WikiResultSetlookupTopicCount(int virtualWikiId)
     Return a count of all topics, including redirects, comments pages and templates, currently available on the Wiki.
 WikiResultSetlookupTopicVersion(int topicVersionId, Connection conn)
     Retrieve a result set containing a specific topic version.
Parameters:
  topicVersionId - The id for the topic version record being retrieved.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
 WikiResultSetlookupWikiFile(int virtualWikiId, int topicId)
     Retrieve a result set containing all wiki file information for a given WikiFile.
Parameters:
  virtualWikiId - The virtual wiki id for the virtual wiki of the wiki filebeing retrieved.
Parameters:
  topicId - The id of the parent topic for the wiki file being retrieved.
 WikiResultSetlookupWikiFileCount(int virtualWikiId)
     Return a count of all wiki files currently available on the Wiki.
 WikiResultSetlookupWikiUser(int userId, Connection conn)
     Retrieve a result set containing all user information for a given WikiUser.
Parameters:
  userId - The id of the user record being retrieved.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
 WikiResultSetlookupWikiUser(String login, Connection conn)
     Retrieve a result set containing all user information for a given WikiUser.
Parameters:
  login - The login of the user record being retrieved.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
 WikiResultSetlookupWikiUser(String login, String encryptedPassword, Connection conn)
     Retrieve a result set containing all user information for a given WikiUser.
Parameters:
  login - The login of the user record being retrieved.
Parameters:
  encryptedPassword - The encrypted password for the user record beingretrieved.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
 WikiResultSetlookupWikiUserCount()
     Return a count of all wiki users.
 WikiResultSetlookupWikiUserInfo(String login)
     Retrieve a result set containing all user information for a given WikiUserInfo.
Parameters:
  login - The login of the user record being retrieved.
 WikiResultSetlookupWikiUsers(Pagination pagination)
     Retrieve a result set of all logins for every wiki user.
Parameters:
  pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved.
 intnextTopicId(Connection conn)
     Retrieve the next available topic id from the topic table.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
 intnextTopicVersionId(Connection conn)
     Retrieve the next available topic version id from the topic version table.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
 intnextVirtualWikiId(Connection conn)
     Retrieve the next available virtual wiki id from the virtual wiki table.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
 intnextWikiFileId(Connection conn)
     Retrieve the next available wiki file id from the wiki file table.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
 intnextWikiFileVersionId(Connection conn)
     Retrieve the next available wiki file version id from the wiki file version table.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
 intnextWikiGroupId(Connection conn)
     Retrieve the next available wiki group id from the wiki group table.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
 intnextWikiUserId(Connection conn)
     Retrieve the next available wiki user id from the wiki user table.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
 voidreloadRecentChanges(Connection conn)
     Refresh the recent changes content by reloading the recent changes table.
 voidupdateRole(Role role, Connection conn)
     Update a role record in the database.
 voidupdateTopic(Topic topic, int virtualWikiId, Connection conn)
     Update a topic record in the database.
 voidupdateVirtualWiki(VirtualWiki virtualWiki, Connection conn)
     Update a virtual wiki record in the database.
 voidupdateWikiFile(WikiFile wikiFile, int virtualWikiId, Connection conn)
     Update a wiki file record in the database.
 voidupdateWikiGroup(WikiGroup group, Connection conn)
     Update a group record in the database.
 voidupdateWikiUser(WikiUser user, Connection conn)
     Update a wiki user record in the database.
 voidupdateWikiUserInfo(WikiUserInfo userInfo, Connection conn)
     Update a wiki user information record in the database.



Method Detail
connectionValidationQuery
String connectionValidationQuery()(Code)
Returns the simplest possible query that can be used to validate whether or not a database connection is valid. Note that the query returned MUST NOT query any JAMWiki tables since it will be used prior to setting up the JAMWiki tables. Returns a simple query that can be used to validate a databaseconnection.



createTables
void createTables(Connection conn) throws Exception(Code)
Method called to set up all JAMWiki system tables, indexes, and other required database objects. If a failure occurs during object creation then this method will not attempt to clean up any objects that were created prior to the failure.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



deleteRecentChanges
void deleteRecentChanges(int topicId, Connection conn) throws Exception(Code)
Delete all records from the recent changes table for a specific topic.
Parameters:
  topicId - The topic id for which recent changes are being deleted.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



deleteRoleMapGroup
void deleteRoleMapGroup(int groupId, Connection conn) throws Exception(Code)
Delete all role records for a specific group.
Parameters:
  groupId - The group id for which role records are being deleted.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



deleteRoleMapUser
void deleteRoleMapUser(int userId, Connection conn) throws Exception(Code)
Delete all role records for a specific user.
Parameters:
  userId - The user id for which role records are being deleted.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



deleteTopicCategories
void deleteTopicCategories(int topicId, Connection conn) throws Exception(Code)
Delete all categories associated with a topic.
Parameters:
  topicId - The topic for which category association records are beingdeleted.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



deleteWatchlistEntry
void deleteWatchlistEntry(int virtualWikiId, String topicName, int userId, Connection conn) throws Exception(Code)
Delete a user's watchlist entry using the topic name to determine which entry to remove.
Parameters:
  virtualWikiId - The id of the virtual wiki for which the watchlistentry is being deleted.
Parameters:
  topicName - The topic name for which the watchlist entry is beingdeleted.
Parameters:
  userId - The user for which the watchlist entry is being deleted.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



dropTables
void dropTables(Connection conn)(Code)
Drop all JAMWiki database objects. This method drops tables, indexes, and any database objects, as well as all data in those objects. Note that if a failure occurs while deleting any one object the method will continue trying to delete any remaining objects.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.



existenceValidationQuery
String existenceValidationQuery()(Code)
Return a simple query, that if successfully run indicates that JAMWiki tables have been initialized in the database. Returns a simple query that, if successfully run, indicatesthat JAMWiki tables have been set up in the database.



getAllTopicNames
WikiResultSet getAllTopicNames(int virtualWikiId) throws Exception(Code)
Retrieve a WikiResultSet containing all topic names that exist for a virtual wiki. This method will not return the names of previously deleted topics.
Parameters:
  virtualWikiId - The id of the virtual wiki for which topic namesare being retrieved. A WikiResultSet containing the names of all topics for the virtualwiki, not including any previously deleted topics.
throws:
  Exception - Thrown if any error occurs during method execution.



getAllWikiFileVersions
WikiResultSet getAllWikiFileVersions(WikiFile wikiFile, boolean descending) throws Exception(Code)
Retrieve a WikiResultSet consisting of all wiki file version information for a given wiki file. Version information is sorted by wiki file version id, which in effect sorts the wiki file versions from newest to oldest.
Parameters:
  wikiFile - A WikiFile object for which version information is to be retrieved.
Parameters:
  descending - If true then results are sorted newest tooldest. A WikiResultSet containing wiki file version information for allversions of the specified wiki file.
throws:
  Exception - Thrown if any error occurs during method execution.



getCategories
WikiResultSet getCategories(int virtualWikiId, Pagination pagination) throws Exception(Code)
Retrieve a WikiResultSet containing all categories associated with a particular virtual wiki. The result set may be limited by specifying the number of results to retrieve in a Pagination object.
Parameters:
  virtualWikiId - The virtual wiki id for the virtual wiki from which allcategories are to be retrieved.
Parameters:
  pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved. A WikiResultSet containing all categories associated with a particularvirtual wiki.
throws:
  Exception - Thrown if any error occurs during method execution.



getRecentChanges
WikiResultSet getRecentChanges(String virtualWiki, Pagination pagination, boolean descending) throws Exception(Code)
Retrieve a WikiResultSet containing all recent changes made to the wiki for a specific virtual wiki.
Parameters:
  virtualWiki - The name of the virtual wiki for which changes are beingretrieved.
Parameters:
  pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved.
Parameters:
  descending - If true then results are sorted newest tooldest. A WikiResultSet containing all recent changes for a particular virtualwiki.
throws:
  Exception - Thrown if any error occurs during method execution.



getRecentChanges
WikiResultSet getRecentChanges(int topicId, Pagination pagination, boolean descending) throws Exception(Code)
Retrieve a WikiResultSet containing all recent changes made to the wiki for a specific topic.
Parameters:
  topicId - The id of the topic for which recent changes are beingretrieved.
Parameters:
  pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved.
Parameters:
  descending - If true then results are sorted newest tooldest. A WikiResultSet containing all recent changes for a particular virtualwiki.
throws:
  Exception - Thrown if any error occurs during method execution.



getRoleMapByLogin
WikiResultSet getRoleMapByLogin(String loginFragment) throws Exception(Code)
Retrieve a WikiResultSet of user ids, group ids and role names for all users whose login contains the given login fragment.
Parameters:
  loginFragment - A value that must be contained with the user'slogin. This method will return partial matches, so "name" willmatch "name", "firstname" and "namesake". A WikiResultSet of user ids, group ids and role names for allusers whose login contains the login fragment. If no matches arefound then this method returns an empty WikiResultSet.
throws:
  Exception - Thrown if any error occurs during method execution.



getRoleMapByRole
WikiResultSet getRoleMapByRole(String roleName) throws Exception(Code)
Retrieve a WikiResultSet of user ids, group ids and role names for all users and groups who have been assigned the specified role.
Parameters:
  roleName - The name of the role being queried against. A WikiResultSet of user ids, group ids and role names for allusers and groups who have been assigned the specified role, or anempty WikiResultSet if no matches are found.
throws:
  Exception - Thrown if any error occurs during method execution.



getRoleMapGroup
WikiResultSet getRoleMapGroup(String groupName) throws Exception(Code)
Retrieve a WikiResultSet containing all roles assigned to a given group.
Parameters:
  groupName - The name of the group for whom roles are being retrieved. A WikiResultSet of role names for the given user, or an emptyWikiResultSet if no roles are assigned to the user.
throws:
  Exception - Thrown if any error occurs during method execution.



getRoleMapGroups
WikiResultSet getRoleMapGroups() throws Exception(Code)
Retrieve a WikiResultSet of user ids, group ids and role names for all groups that have been assigned a role. A WikiResultSet of user ids, group ids and role names for allgroups that have been assigned a role. If no matches are found thenthis method returns an empty WikiResultSet.
throws:
  Exception - Thrown if any error occurs during method execution.



getRoleMapUser
WikiResultSet getRoleMapUser(String login) throws Exception(Code)
Retrieve a WikiResultSet containing all roles assigned to a given user.
Parameters:
  login - The login of the user for whom roles are being retrieved. A WikiResultSet of role names for the given user, or an emptyWikiResultSet if no roles are assigned to the user.
throws:
  Exception - Thrown if any error occurs during method execution.



getRoles
WikiResultSet getRoles() throws Exception(Code)
Retrieve a WikiResultSet containing all roles that have been defined for the wiki. Returns a WikiResult set containing all roles that have beendefined for the wiki.
throws:
  Exception - Thrown if any error occurs during method execution.



getTopicsAdmin
WikiResultSet getTopicsAdmin(int virtualWikiId, Pagination pagination) throws Exception(Code)
Retrieve a WikiResultSet containing the topic names of all admin-only topics for the virtual wiki.
Parameters:
  virtualWikiId - The id of the virtual wiki for which topic namesare being retrieved.
Parameters:
  pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved. A WikiResultSet containing the topic names of all admin-onlytopics for the virtual wiki.
throws:
  Exception - Thrown if any error occurs during method execution.



getUserContributions
WikiResultSet getUserContributions(String virtualWiki, String userString, Pagination pagination, boolean descending) throws Exception(Code)
Retrieve a WikiResultSet containing all recent changes made to the wiki by a specific user.
Parameters:
  virtualWiki - The name of the virtual wiki for which user contributionsare being retrieved.
Parameters:
  userString - The login of the user for whom changes are being retrieved; orfor anonymous users, the IP address of the user.
Parameters:
  pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved.
Parameters:
  descending - If true then results are sorted newest tooldest. A WikiResultSet containing all recent changes made by a particular user.
throws:
  Exception - Thrown if any error occurs during method execution.



getVirtualWikis
WikiResultSet getVirtualWikis(Connection conn) throws Exception(Code)
Retrieve a WikiResultSet containing all virtual wiki information for all virtual wikis.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method. Returns a WikiResult set containing all virtual wiki informationfor every virtual wiki.
throws:
  Exception - Thrown if any error occurs during method execution.



getWatchlist
WikiResultSet getWatchlist(int virtualWikiId, int userId) throws Exception(Code)
Retrieve a WikiResultSet containing the topic ID and topic name for topics in the user's watchlist.
Parameters:
  virtualWikiId - The virtual wiki ID for the virtual wiki for thewatchlist topics.
Parameters:
  userId - The user ID for the user retrieving the watchlist. A WikiResultSet containing topic ID and topic name for allwatchlist items.
throws:
  Exception - Thrown if any error occurs during method execution.



getWatchlist
WikiResultSet getWatchlist(int virtualWikiId, int userId, Pagination pagination) throws Exception(Code)
Retrieve a WikiResultSet containing all recent changes for topics in the user's watchlist.
Parameters:
  virtualWikiId - The virtual wiki ID for the virtual wiki for thewatchlist topics.
Parameters:
  userId - The user ID for the user retrieving the watchlist.
Parameters:
  pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved. A WikiResultSet containing recent changes for the watchlist.
throws:
  Exception - Thrown if any error occurs during method execution.



insertCategory
void insertCategory(Category category, int virtualWikiId, Connection conn) throws Exception(Code)
Add a new category record to the database. Note that this method will fail if an existing category of the same name is already associated with the topic.
Parameters:
  category - The category record that is being created.
Parameters:
  virtualWikiId - The virtual wiki id for the record that is being added.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



insertRecentChange
void insertRecentChange(RecentChange change, int virtualWikiId, Connection conn) throws Exception(Code)
Add a new recent change record to the database.
Parameters:
  change - The RecentChange record that is to be added to the database.
Parameters:
  virtualWikiId - The virtual wiki id for the record that is being added.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



insertRole
void insertRole(Role role, Connection conn) throws Exception(Code)
Add a new role record to the database. The role must not already exist in the database or else an error will be thrown.
Parameters:
  role - The Role record that is to be added to the database.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



insertRoleMap
void insertRoleMap(int userId, int groupId, String role, Connection conn) throws Exception(Code)
Add a new role mapping for a specific user or group. The role mapping must not already exist in the database or else an error will be thrown.
Parameters:
  userId - The user id for the user being assigned a role, or -1 ifa group is being assigned a role.
Parameters:
  groupId - The group id for the group being assigned a role, or -1if a user is being assigned a role.
Parameters:
  role - The role name for the role being assigned.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



insertTopic
void insertTopic(Topic topic, int virtualWikiId, Connection conn) throws Exception(Code)
Add a new topic record to the database. The topic must not already exist in the database or else an error will be thrown.
Parameters:
  topic - The Topic record that is to be added to the database.
Parameters:
  virtualWikiId - The virtual wiki id for the record that is being added.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



insertTopicVersion
void insertTopicVersion(TopicVersion topicVersion, Connection conn) throws Exception(Code)
Add a new topic version record to the database. The topic version must not already exist in the database or else an error will be thrown.
Parameters:
  topicVersion - The TopicVersion record that is to be added to the database.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



insertVirtualWiki
void insertVirtualWiki(VirtualWiki virtualWiki, Connection conn) throws Exception(Code)
Add a new virtual wiki record to the database. The virtual wiki must not already exist in the database or else an error will be thrown.
Parameters:
  virtualWiki - The VirtualWiki record that is to be added to the database.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



insertWatchlistEntry
void insertWatchlistEntry(int virtualWikiId, String topicName, int userId, Connection conn) throws Exception(Code)
Add a new watchlist entry record to the database. An identical entry must not already exist or else an exception will be thrown.
Parameters:
  virtualWikiId - The virtual wiki id for the watchlist entry beinginserted.
Parameters:
  topicName - The name of the topic for the watchlist entry. Thisvalue should be set only for topics that do not yet exist, and shouldbe set to null for existing topics.
Parameters:
  userId - The ID of the user for the watchlist entry.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



insertWikiFile
void insertWikiFile(WikiFile wikiFile, int virtualWikiId, Connection conn) throws Exception(Code)
Add a new wiki file record to the database. The wiki file must not already exist in the database or else an error will be thrown.
Parameters:
  wikiFile - The WikiFile record that is to be added to the database.
Parameters:
  virtualWikiId - The virtual wiki id for the record that is being added.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



insertWikiFileVersion
void insertWikiFileVersion(WikiFileVersion wikiFileVersion, Connection conn) throws Exception(Code)
Add a new wiki file version record to the database. The wiki file version must not already exist in the database or else an error will be thrown.
Parameters:
  wikiFileVersion - The WikiFileVersion record that is to be addedto the database.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



insertWikiGroup
void insertWikiGroup(WikiGroup group, Connection conn) throws Exception(Code)
Add a new group record to the database. The group must not already exist in the database or else an error will be thrown.
Parameters:
  group - The WikiGroup record that is to be added to the database.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



insertWikiUser
void insertWikiUser(WikiUser user, Connection conn) throws Exception(Code)
Add a new user record to the database. The user must not already exist in the database or else an error will be thrown.
Parameters:
  user - The WikiUser record that is to be added to the database.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



insertWikiUserInfo
void insertWikiUserInfo(WikiUserInfo userInfo, Connection conn) throws Exception(Code)
Add a new user information record to the database. The user information must not already exist in the database or else an error will be thrown.
Parameters:
  userInfo - The WikiUserInfo record that is to be added to thedatabase.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



lookupCategoryTopics
WikiResultSet lookupCategoryTopics(int virtualWikiId, String categoryName) throws Exception(Code)
Retrieve a result set containing the topic name and sort key for all topics associated with a category.
Parameters:
  virtualWikiId - The virtual wiki id for the virtual wiki of the topicsbeing retrieved.
Parameters:
  categoryName - The name of the category for which associated topicsare to be retrieved. A WikiResultSet containing topic name and sort key for all topicsassociated with a specific category.
throws:
  Exception - Thrown if any error occurs during method execution.



lookupTopic
WikiResultSet lookupTopic(int virtualWikiId, String topicName, boolean caseSensitive, Connection conn) throws Exception(Code)
Retrieve a WikiResultSet containing all topic information for a given topic.
Parameters:
  virtualWikiId - The virtual wiki id for the virtual wiki of the topicbeing retrieved.
Parameters:
  topicName - The name of the topic being retrieved.
Parameters:
  caseSensitive - Set to true if the topic name should besearched for in a case-sensitive manner.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method. A WikiResultSet containing all topic information for the given topicname and virtual wiki. If no matching topic is found an empty result set isreturned.
throws:
  Exception - Thrown if any error occurs during method execution.



lookupTopicByType
WikiResultSet lookupTopicByType(int virtualWikiId, int topicType, Pagination pagination) throws Exception(Code)
Retrieve a result set of all topics of a given type within a virtual wiki.
Parameters:
  virtualWikiId - The virtual wiki id for the virtual wiki of the topicsbeing retrieved.
Parameters:
  topicType - The topic type (image, normal, etc) for the topics to beretrieved.
Parameters:
  pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved. A WikiResult set of all non-deleted topics for the given virtual wikiof the specified topic type, and within the bounds specified by the paginationobject.
throws:
  Exception - Thrown if any error occurs during method execution.



lookupTopicCount
WikiResultSet lookupTopicCount(int virtualWikiId) throws Exception(Code)
Return a count of all topics, including redirects, comments pages and templates, currently available on the Wiki. This method excludes deleted topics.
Parameters:
  virtualWikiId - The virtual wiki id for the virtual wiki of the topicsbeing retrieved.



lookupTopicVersion
WikiResultSet lookupTopicVersion(int topicVersionId, Connection conn) throws Exception(Code)
Retrieve a result set containing a specific topic version.
Parameters:
  topicVersionId - The id for the topic version record being retrieved.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method. A WikiResultSet containing the topic version record, or an emptyresult set if no matching record is found.
throws:
  Exception - Thrown if any error occurs during method execution.



lookupWikiFile
WikiResultSet lookupWikiFile(int virtualWikiId, int topicId) throws Exception(Code)
Retrieve a result set containing all wiki file information for a given WikiFile.
Parameters:
  virtualWikiId - The virtual wiki id for the virtual wiki of the wiki filebeing retrieved.
Parameters:
  topicId - The id of the parent topic for the wiki file being retrieved. A WikiResultSet containing all wiki file information for the given topicid and virtual wiki. If no matching wiki file is found an empty result set isreturned.
throws:
  Exception - Thrown if any error occurs during method execution.



lookupWikiFileCount
WikiResultSet lookupWikiFileCount(int virtualWikiId) throws Exception(Code)
Return a count of all wiki files currently available on the Wiki. This method excludes deleted files.
Parameters:
  virtualWikiId - The virtual wiki id for the virtual wiki of the filesbeing retrieved.



lookupWikiUser
WikiResultSet lookupWikiUser(int userId, Connection conn) throws Exception(Code)
Retrieve a result set containing all user information for a given WikiUser.
Parameters:
  userId - The id of the user record being retrieved.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method. A WikiResultSet containing all information for the given user, oran empty result set if no matching user exists.
throws:
  Exception - Thrown if any error occurs during method execution.



lookupWikiUser
WikiResultSet lookupWikiUser(String login, Connection conn) throws Exception(Code)
Retrieve a result set containing all user information for a given WikiUser.
Parameters:
  login - The login of the user record being retrieved.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method. A WikiResultSet containing all information for the given user, oran empty result set if no matching user exists.
throws:
  Exception - Thrown if any error occurs during method execution.



lookupWikiUser
WikiResultSet lookupWikiUser(String login, String encryptedPassword, Connection conn) throws Exception(Code)
Retrieve a result set containing all user information for a given WikiUser.
Parameters:
  login - The login of the user record being retrieved.
Parameters:
  encryptedPassword - The encrypted password for the user record beingretrieved.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method. A WikiResultSet containing all information for the given user, oran empty result set if no matching user exists.
throws:
  Exception - Thrown if any error occurs during method execution.



lookupWikiUserCount
WikiResultSet lookupWikiUserCount() throws Exception(Code)
Return a count of all wiki users.



lookupWikiUserInfo
WikiResultSet lookupWikiUserInfo(String login) throws Exception(Code)
Retrieve a result set containing all user information for a given WikiUserInfo.
Parameters:
  login - The login of the user record being retrieved. A WikiResultSet containing all information for the given user, oran empty result set if no matching user exists.
throws:
  Exception - Thrown if any error occurs during method execution.



lookupWikiUsers
WikiResultSet lookupWikiUsers(Pagination pagination) throws Exception(Code)
Retrieve a result set of all logins for every wiki user.
Parameters:
  pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved. A WikiResult set of all logins for all wiki users, within thebounds specified by the pagination object.
throws:
  Exception - Thrown if any error occurs during method execution.



nextTopicId
int nextTopicId(Connection conn) throws Exception(Code)
Retrieve the next available topic id from the topic table.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method. The next available topic id from the topic table.
throws:
  Exception - Thrown if any error occurs during method execution.



nextTopicVersionId
int nextTopicVersionId(Connection conn) throws Exception(Code)
Retrieve the next available topic version id from the topic version table.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method. The next available topic version id from the topic version table.
throws:
  Exception - Thrown if any error occurs during method execution.



nextVirtualWikiId
int nextVirtualWikiId(Connection conn) throws Exception(Code)
Retrieve the next available virtual wiki id from the virtual wiki table.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method. The next available virtual wiki id from the virtual wiki table.
throws:
  Exception - Thrown if any error occurs during method execution.



nextWikiFileId
int nextWikiFileId(Connection conn) throws Exception(Code)
Retrieve the next available wiki file id from the wiki file table.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method. The next available wiki file id from the wiki file table.
throws:
  Exception - Thrown if any error occurs during method execution.



nextWikiFileVersionId
int nextWikiFileVersionId(Connection conn) throws Exception(Code)
Retrieve the next available wiki file version id from the wiki file version table.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method. The next available wiki file version id from the wiki fileversion table.
throws:
  Exception - Thrown if any error occurs during method execution.



nextWikiGroupId
int nextWikiGroupId(Connection conn) throws Exception(Code)
Retrieve the next available wiki group id from the wiki group table.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method. The next available wiki group id from the wiki group table.
throws:
  Exception - Thrown if any error occurs during method execution.



nextWikiUserId
int nextWikiUserId(Connection conn) throws Exception(Code)
Retrieve the next available wiki user id from the wiki user table.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method. The next available wiki user id from the wiki user table.
throws:
  Exception - Thrown if any error occurs during method execution.



reloadRecentChanges
void reloadRecentChanges(Connection conn) throws Exception(Code)
Refresh the recent changes content by reloading the recent changes table.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



updateRole
void updateRole(Role role, Connection conn) throws Exception(Code)
Update a role record in the database.
Parameters:
  role - The Role record that is to be updated in the database.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



updateTopic
void updateTopic(Topic topic, int virtualWikiId, Connection conn) throws Exception(Code)
Update a topic record in the database.
Parameters:
  topic - The Topic record that is to be updated in the database.
Parameters:
  virtualWikiId - The virtual wiki id for the record that is being updated.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



updateVirtualWiki
void updateVirtualWiki(VirtualWiki virtualWiki, Connection conn) throws Exception(Code)
Update a virtual wiki record in the database.
Parameters:
  virtualWiki - The VirtualWiki record that is to be updated in the database.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



updateWikiFile
void updateWikiFile(WikiFile wikiFile, int virtualWikiId, Connection conn) throws Exception(Code)
Update a wiki file record in the database.
Parameters:
  wikiFile - The WikiFile record that is to be updated in the database.
Parameters:
  virtualWikiId - The virtual wiki id for the record that is being updated.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



updateWikiGroup
void updateWikiGroup(WikiGroup group, Connection conn) throws Exception(Code)
Update a group record in the database.
Parameters:
  group - The WikiGroup record that is to be updated in the database.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



updateWikiUser
void updateWikiUser(WikiUser user, Connection conn) throws Exception(Code)
Update a wiki user record in the database.
Parameters:
  user - The WikiUser record that is to be updated in the database.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



updateWikiUserInfo
void updateWikiUserInfo(WikiUserInfo userInfo, Connection conn) throws Exception(Code)
Update a wiki user information record in the database.
Parameters:
  userInfo - The WikiUserInfo record that is to be updated in thedatabase.
Parameters:
  conn - A database connection to use when connecting to the databasefrom this method.
throws:
  Exception - Thrown if any error occurs during method execution.



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