org.apache.derby.impl.sql.execute
Class CreateRoleConstantAction
java.lang.Object
org.apache.derby.impl.sql.execute.DDLConstantAction
org.apache.derby.impl.sql.execute.CreateRoleConstantAction
- All Implemented Interfaces:
- ConstantAction
class CreateRoleConstantAction
- extends DDLConstantAction
This class performs actions that are ALWAYS performed for a
CREATE ROLE statement at execution time.
These SQL objects are stored in the SYS.SYSROLES table.
Field Summary |
private java.lang.String |
roleName
|
Constructor Summary |
CreateRoleConstantAction(java.lang.String roleName)
Make the ConstantAction for a CREATE ROLE statement. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
roleName
private java.lang.String roleName
CreateRoleConstantAction
public CreateRoleConstantAction(java.lang.String roleName)
- Make the ConstantAction for a CREATE ROLE statement.
When executed, will create a role by the given name.
- Parameters:
roleName
- The name of the role being created
executeConstantAction
public void executeConstantAction(Activation activation)
throws StandardException
- This is the guts of the Execution-time logic for CREATE ROLE.
- Parameters:
activation
- The execution environment for this constant action.
- Throws:
StandardException
- Thrown on failure- See Also:
ConstantAction.executeConstantAction(org.apache.derby.iapi.sql.Activation)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
knownUser
private boolean knownUser(java.lang.String roleName,
java.lang.String currentUser,
LanguageConnectionContext lcc,
DataDictionary dd,
TransactionController tc)
throws StandardException
- Heuristically, try to determine is a proposed role identifier
is already known to Derby as a user name. Method: If BUILTIN
authentication is used, check if there is such a user. If
external authentication is used, we lose. If there turns out
to be collision, and we can't detect it here, we should block
such a user from connecting (FIXME), since there is now a role
with that name.
- Throws:
StandardException
Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.