Class StatementGenericPermission
java.lang.Object
org.apache.derby.iapi.sql.dictionary.StatementPermission
org.apache.derby.iapi.sql.dictionary.StatementGenericPermission
This class describes a generic permission (such as USAGE)
required by a statement.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStatementGenericPermission(UUID objectID, String objectType, String privilege) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheck(LanguageConnectionContext lcc, boolean forGrant, Activation activation) Get the type of the privileged object.getPermissionDescriptor(String authid, DataDictionary dd) Get the PermissionsDescriptor for the passed authorization id for this object.Get the privileged object associated with this permission.booleanReturn true if the passed in permission matches the one required by this StatementPermission.toString()Methods inherited from class StatementPermission
genericCheck
-
Field Details
-
_objectID
-
_objectType
-
_privilege
-
-
Constructor Details
-
StatementGenericPermission
-
-
Method Details
-
getObjectID
-
getPrivilege
-
getObjectType
Description copied from class:StatementPermissionGet the type of the privileged object.- Overrides:
getObjectTypein classStatementPermission- See Also:
-
check
public void check(LanguageConnectionContext lcc, boolean forGrant, Activation activation) throws StandardException - Specified by:
checkin classStatementPermission- Parameters:
lcc- LanguageConnectionContextforGrant-activation- activation for statement needing check- Throws:
StandardException- if the permission has not been granted- See Also:
-
isCorrectPermission
Description copied from class:StatementPermissionReturn true if the passed in permission matches the one required by this StatementPermission.- Overrides:
isCorrectPermissionin classStatementPermission- See Also:
-
getPrivilegedObject
Description copied from class:StatementPermissionGet the privileged object associated with this permission.- Overrides:
getPrivilegedObjectin classStatementPermission- Throws:
StandardException- See Also:
-
getPermissionDescriptor
public PermissionsDescriptor getPermissionDescriptor(String authid, DataDictionary dd) throws StandardException Description copied from class:StatementPermissionGet the PermissionsDescriptor for the passed authorization id for this object. This method gets called during the execution phase of create view/constraint/trigger. The return value of this method is saved in dependency system to keep track of views/constraints/triggers dependencies on required permissions. This happens in execution phase after it has been established that passed authorization id has all the permissions it needs to create that view/constraint/trigger. Which means that we can only get to writing into dependency system once all the required privileges are confirmed.- Specified by:
getPermissionDescriptorin classStatementPermission- Parameters:
authid- AuthorizationIddd- DataDictionary- Returns:
- PermissionsDescriptor The PermissionsDescriptor for the passed authorization id on this object
- Throws:
StandardException- See Also:
-
toString
-