| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | doRoles(Connection
Connection to use conn)Generate role definition statements and role grant statements. |
| private static void | generateRoleDefinitions(ResultSet
Result set holding required information rs)Generate role definition statements |
| private static void | |
| private static String | roleDefinitionStatement(ResultSet
@{code ResultSet} holding role definition information rs, String The role defined, already quoted roleName)Generate a role definition statement for the current row |
| private static String | roleGrantStatement(ResultSet
@{ResultSet} holding role grant information rs, String The role granted, already quoted roleName, String The authorization id to whom the role is granted (a role
or a user), already quoted grantee, boolean @{code true} if ADMIN OPTION was used for the
grant isWithAdminOption)Generate role grant statement for the current row |
| DB_Roles | back to summary |
|---|---|
| public DB_Roles() | |
| doRoles | back to summary |
|---|---|
| public static void doRoles(Connection conn) throws SQLException 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.
| |
| generateRoleDefinitions | back to summary |
|---|---|
| private static void generateRoleDefinitions(ResultSet rs) throws SQLException Generate role definition statements
| |
| generateRoleGrants | back to summary |
|---|---|
| private static void generateRoleGrants(ResultSet rs) throws SQLException | |
| roleDefinitionStatement | back to summary |
|---|---|
| private static String roleDefinitionStatement(ResultSet rs, String roleName) throws SQLException Generate a role definition statement for the current row | |
| roleGrantStatement | back to summary |
|---|---|
| private static String roleGrantStatement(ResultSet rs, String roleName, String grantee, boolean isWithAdminOption) throws SQLException Generate role grant statement for the current row | |