Class DB_Roles
java.lang.Object
org.apache.derby.impl.tools.dblook.DB_Roles
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
doRoles
(Connection conn) Generate role definition statements and role grant statements.private static void
Generate role definition statementsprivate static void
private static String
roleDefinitionStatement
(ResultSet rs, String roleName) Generate a role definition statement for the current rowprivate static String
roleGrantStatement
(ResultSet rs, String roleName, String grantee, boolean isWithAdminOption) Generate role grant statement for the current row
-
Constructor Details
-
DB_Roles
public DB_Roles()
-
-
Method Details
-
doRoles
Generate role definition statements and role grant statements. Note that privileges granted to roles are handled by DB_GrantRevoke, similar to privileges granted to users.- Parameters:
conn
- Connection to use- Throws:
SQLException
-
generateRoleDefinitions
Generate role definition statements- Parameters:
rs
- Result set holding required information- Throws:
SQLException
-
roleDefinitionStatement
Generate a role definition statement for the current row- Parameters:
rs
- @{code ResultSet} holding role definition informationroleName
- The role defined, already quoted- Throws:
SQLException
-
generateRoleGrants
- Throws:
SQLException
-
roleGrantStatement
private static String roleGrantStatement(ResultSet rs, String roleName, String grantee, boolean isWithAdminOption) throws SQLException Generate role grant statement for the current row- Parameters:
rs
- @{ResultSet} holding role grant informationroleName
- The role granted, already quotedgrantee
- The authorization id to whom the role is granted (a role or a user), already quotedisWithAdminOption
- @{code true} if ADMIN OPTION was used for the grant- Throws:
SQLException
-