public class DB_Roles
extends java.lang.Object
| Constructor | Description |
|---|---|
DB_Roles() |
| Modifier and Type | Method | 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.SQLExceptionprivate static void generateRoleDefinitions(java.sql.ResultSet rs)
throws java.sql.SQLException
rs - Result set holding required informationjava.sql.SQLExceptionprivate static java.lang.String roleDefinitionStatement(java.sql.ResultSet rs,
java.lang.String roleName)
throws java.sql.SQLException
rs - roleName - The role defined, already quotedjava.sql.SQLExceptionprivate static void generateRoleGrants(java.sql.ResultSet rs)
throws java.sql.SQLException
java.sql.SQLExceptionprivate static java.lang.String roleGrantStatement(java.sql.ResultSet rs,
java.lang.String roleName,
java.lang.String grantee,
boolean isWithAdminOption)
throws java.sql.SQLException
rs - roleName - The role granted, already quotedgrantee - The authorization id to whom the role is granted (a role
or a user), already quotedisWithAdminOption - java.sql.SQLExceptionApache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.