public class DB_Roles
extends java.lang.Object
Constructor and Description |
---|
DB_Roles() |
Modifier and Type | Method and Description |
---|---|
static void |
doRoles(java.sql.Connection conn)
Generate role definition statements and role grant statements.
|
private static void |
generateRoleDefinitions(java.sql.ResultSet rs)
Generate role definition statements
|
private static void |
generateRoleGrants(java.sql.ResultSet rs) |
private static java.lang.String |
roleDefinitionStatement(java.sql.ResultSet rs,
java.lang.String roleName)
Generate a role definition statement for the current row
|
private static java.lang.String |
roleGrantStatement(java.sql.ResultSet rs,
java.lang.String roleName,
java.lang.String grantee,
boolean isWithAdminOption)
Generate role grant statement for the current row
|
public static void doRoles(java.sql.Connection conn) throws java.sql.SQLException
conn
- Connection to usejava.sql.SQLException
private static void generateRoleDefinitions(java.sql.ResultSet rs) throws java.sql.SQLException
rs
- Result set holding required informationjava.sql.SQLException
private static java.lang.String roleDefinitionStatement(java.sql.ResultSet rs, java.lang.String roleName) throws java.sql.SQLException
rs
- @{code ResultSet} holding role definition informationroleName
- The role defined, already quotedjava.sql.SQLException
private static void generateRoleGrants(java.sql.ResultSet rs) throws java.sql.SQLException
java.sql.SQLException
private static java.lang.String roleGrantStatement(java.sql.ResultSet rs, java.lang.String roleName, java.lang.String grantee, boolean isWithAdminOption) throws java.sql.SQLException
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
grantjava.sql.SQLException
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.