Java Doc for UserGroupStorer.java in  » Portal » mypersonalizer » es » udc » mypersonalizer » kernel » model » repository » sql » storers » 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 » Portal » mypersonalizer » es.udc.mypersonalizer.kernel.model.repository.sql.storers 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   es.udc.mypersonalizer.kernel.model.repository.sql.storers.UserGroupStorer

UserGroupStorer
public class UserGroupStorer (Code)
This "storer" class stores and removes UserGroups in the database.
author:
   Abel Iago Toral Quiroga
author:
   Abel Muinho
since:
   1.0




Method Summary
public  UserGroupaddGroup(Connection connection, UserGroup userGroup)
     Adds a new group of users.
Parameters:
  connection - the connection to the database
Parameters:
  userGroup - a UserGroup representing the new groupof users
throws:
  InternalErrorException - if a failure is detected.
public  voidaddUserToGroup(Connection connection, String loginName, Long userGroupIdentifier)
     Adds a user to a group.
Parameters:
  connection - the connection to the database
Parameters:
  loginName - the user's login name.
Parameters:
  userGroupIdentifier - the group where to add the user.
throws:
  InternalErrorException - if a failure is detected.
public  CollectionfindAllGroups(Connection connection, int startIndex, int count)
     Finds all groups.
public  CollectionfindAllGroupsAssignedToUser(Connection connection, String loginName, int startIndex, int count)
     Finds all groups assigned to a user.
public  CollectionfindAllUsersAssignedToGroup(Connection connection, Long groupId, int startIndex, int count)
     Finds all users assigned to a group.
public  UserGroupfindGroup(Connection connection, Long userGroupIdentifier)
     Finds a specific group by its identifier.
Parameters:
  connection - the connection to the database
Parameters:
  userGroupIdentifier - the user group identifier
throws:
  InternalErrorException - if a failure is detected.
public  UserGroupfindGroupByName(Connection connection, String userGroupName)
     Finds a specific group by its name.
Parameters:
  connection - the connection to the database
Parameters:
  userGroupName - the user group name.
throws:
  InternalErrorException - if a failure is detected.
public  booleangroupExists(Connection connection, Long userGroupIdentifier)
     Checks if a group exists.
public  booleangroupExists(Connection connection, String userGroupName)
     Checks if a group exists.
public  voidremoveAllGroupAssignments(Connection connection, String loginName)
     Removes all groups assignments for a given user.
public  voidremoveGroup(Connection connection, Long userGroupIdentifier)
     Removes a user group and the user assignments to it.
Parameters:
  connection - the connection to the database
Parameters:
  userGroupIdentifier - the group to remove
throws:
  InternalErrorException - if a failure is detected.
public  voidremoveUserFromGroup(Connection connection, String loginName, Long userGroupIdentifier)
     Removes a user from a group
Parameters:
  connection - the connection to the database
Parameters:
  loginName - the user's login name.
Parameters:
  userGroupIdentifier - the group where to remove the user
throws:
  InternalErrorException - if a failure is detected.
public  voidupdateGroup(Connection connection, UserGroup userGroup)
     Updates data of a user group
Parameters:
  connection - the connection to the database
Parameters:
  userGroup - the updated user group information
throws:
  InternalErrorException - if a failure is detected.
public  booleanuserIsAssignedToGroup(Connection connection, String loginName, Long userGroupIdentifier)
     Checks if a user is assigned to a group.



Method Detail
addGroup
public UserGroup addGroup(Connection connection, UserGroup userGroup) throws InternalErrorException, DuplicateInstanceException(Code)
Adds a new group of users.
Parameters:
  connection - the connection to the database
Parameters:
  userGroup - a UserGroup representing the new groupof users
throws:
  InternalErrorException - if a failure is detected. DuplicateInstanceException if the group already exists. a UserGroup with the added group, including itsidentifier.



addUserToGroup
public void addUserToGroup(Connection connection, String loginName, Long userGroupIdentifier) throws InternalErrorException, InstanceNotFoundException, UserAlreadyExistsInGroupException(Code)
Adds a user to a group.
Parameters:
  connection - the connection to the database
Parameters:
  loginName - the user's login name.
Parameters:
  userGroupIdentifier - the group where to add the user.
throws:
  InternalErrorException - if a failure is detected. InstanceNotFoundException if the user groupdoes not exist. UserAlreadyExistsInGroupException if the userwas previously assigned to this group.



findAllGroups
public Collection findAllGroups(Connection connection, int startIndex, int count) throws InternalErrorException(Code)
Finds all groups. Implements Page-by-Page Iterator design pattern.
Parameters:
  connection - the connection to the database
Parameters:
  startIndex - the index of the group fromwhich start to retrive groups.
Parameters:
  count - the number of groups to retrive begining in the startIndex group.
throws:
  InternalErrorException - if a failure is detected. a Collection of UserGroup objects.



findAllGroupsAssignedToUser
public Collection findAllGroupsAssignedToUser(Connection connection, String loginName, int startIndex, int count) throws InternalErrorException(Code)
Finds all groups assigned to a user. Implements Page-by-Page Iterator design pattern.
Parameters:
  connection - the connection to the database
Parameters:
  loginName - the user's login name.
Parameters:
  startIndex - the index of the group assigned to this user fromwhich start to retrive groups.
Parameters:
  count - the number of groups to retrive begining in the startIndex group. If count is < 0, then will returnall the remaining user groups from startIndex.
throws:
  InternalErrorException - if a failure is detected. a Collection of UserGroup objectsrepresenting groups assigned to this user.



findAllUsersAssignedToGroup
public Collection findAllUsersAssignedToGroup(Connection connection, Long groupId, int startIndex, int count) throws InternalErrorException(Code)
Finds all users assigned to a group. Implements Page-by-Page Iterator design pattern.
Parameters:
  connection - the connection to the database
Parameters:
  groupId - the groupIdentifier.
Parameters:
  startIndex - the index of the user assigned to this user group fromwhich start to retrive users.
Parameters:
  count - the number of users to retrive begining in the startIndex user.
throws:
  InternalErrorException - if a failure is detected. a Collection with the login names of theusers assigned to the group.



findGroup
public UserGroup findGroup(Connection connection, Long userGroupIdentifier) throws InternalErrorException, InstanceNotFoundException(Code)
Finds a specific group by its identifier.
Parameters:
  connection - the connection to the database
Parameters:
  userGroupIdentifier - the user group identifier
throws:
  InternalErrorException - if a failure is detected. a Collection of UserGroup objects.



findGroupByName
public UserGroup findGroupByName(Connection connection, String userGroupName) throws InternalErrorException, InstanceNotFoundException(Code)
Finds a specific group by its name.
Parameters:
  connection - the connection to the database
Parameters:
  userGroupName - the user group name.
throws:
  InternalErrorException - if a failure is detected. a Collection of UserGroup objects.



groupExists
public boolean groupExists(Connection connection, Long userGroupIdentifier) throws InternalErrorException(Code)
Checks if a group exists.
Parameters:
  connection - the connection to the database
Parameters:
  userGroupIdentifier - the user group identifier true if the group exists,false otherwise
throws:
  InternalErrorException - if a failure is detected.



groupExists
public boolean groupExists(Connection connection, String userGroupName) throws InternalErrorException(Code)
Checks if a group exists.
Parameters:
  connection - the connection to the database
Parameters:
  userGroupName - the user group name true if the group exists,false otherwise
throws:
  InternalErrorException - if a failure is detected.



removeAllGroupAssignments
public void removeAllGroupAssignments(Connection connection, String loginName) throws InternalErrorException(Code)
Removes all groups assignments for a given user.
Parameters:
  connection - the connection to the database.
Parameters:
  loginName - the user login name.
throws:
  InternalErrorException - if a failure is detected.



removeGroup
public void removeGroup(Connection connection, Long userGroupIdentifier) throws InternalErrorException, InstanceNotFoundException(Code)
Removes a user group and the user assignments to it.
Parameters:
  connection - the connection to the database
Parameters:
  userGroupIdentifier - the group to remove
throws:
  InternalErrorException - if a failure is detected. InstanceNotFoundException if the user groupdoes not exist.



removeUserFromGroup
public void removeUserFromGroup(Connection connection, String loginName, Long userGroupIdentifier) throws InternalErrorException, InstanceNotFoundException, UserDoesNotExistInGroupException(Code)
Removes a user from a group
Parameters:
  connection - the connection to the database
Parameters:
  loginName - the user's login name.
Parameters:
  userGroupIdentifier - the group where to remove the user
throws:
  InternalErrorException - if a failure is detected. InstanceNotFoundException if the user groupdoes not exist. UserDoesNotExistInGroupException if the user is not assigned to this group.



updateGroup
public void updateGroup(Connection connection, UserGroup userGroup) throws InternalErrorException, DuplicateInstanceException, InstanceNotFoundException(Code)
Updates data of a user group
Parameters:
  connection - the connection to the database
Parameters:
  userGroup - the updated user group information
throws:
  InternalErrorException - if a failure is detected. InstanceNotFoundException if the user group does not exist.



userIsAssignedToGroup
public boolean userIsAssignedToGroup(Connection connection, String loginName, Long userGroupIdentifier) throws InternalErrorException(Code)
Checks if a user is assigned to a group.
Parameters:
  connection - the connection to the database
Parameters:
  loginName - the login name of the user
Parameters:
  userGroupIdentifier - the user group identifier true if the user is assigned to the group,false otherwise
throws:
  InternalErrorException - if a failure is detected.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

w__w___w_.___j_a__va_2___s__.__c__o___m__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.