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
Fields Modifier and Type Field Description private java.lang.String
roleName
-
Fields inherited from interface org.apache.derby.iapi.sql.execute.ConstantAction
WHEN_MATCHED_THEN_DELETE, WHEN_MATCHED_THEN_UPDATE, WHEN_NOT_MATCHED_THEN_INSERT
-
-
Constructor Summary
Constructors Constructor Description CreateRoleConstantAction(java.lang.String roleName)
Make the ConstantAction for a CREATE ROLE statement.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
executeConstantAction(Activation activation)
This is the guts of the Execution-time logic for CREATE ROLE.private boolean
knownUser(java.lang.String roleName, java.lang.String currentUser, LanguageConnectionContext lcc, DataDictionary dd, TransactionController tc)
Heuristically, try to determine is a proposed role identifier is already known to Derby as a user name.java.lang.String
toString()
-
Methods inherited from class org.apache.derby.impl.sql.execute.DDLConstantAction
addColumnDependencies, adjustUDTDependencies, adjustUDTDependencies, constructToString, getAndCheckSchemaDescriptor, getSchemaDescriptorForCreate, lockTableForDDL, storeConstraintDependenciesOnPrivileges, storeViewTriggerDependenciesOnPrivileges
-
-
-
-
Method Detail
-
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 classjava.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
-
-