Class RoleGrantDescriptor
java.lang.Object
org.apache.derby.iapi.sql.dictionary.TupleDescriptor
org.apache.derby.iapi.sql.dictionary.RoleGrantDescriptor
- All Implemented Interfaces:
Dependable, Provider
This class is used by rows in the SYS.SYSROLES system table.
An instance contains information for exactly: One <role
definition>, cf. ISO/IEC 9075-2:2003 section 12.4
or one <grant role statement>, section 12.5.
A role definition is also modeled as a role grant (hence the class
name), but with the special grantor "_SYSTEM", and with a grantee
of the definer, in Derby this is always the current user. For a
role definition, the WITH ADMIN flag is also set. The information
contained in the isDef flag is usually redundant, but was added as
a precaution against a real user named _SYSTEM, for example when
upgrading an older database that did not forbid this.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate final Stringprivate final booleanprivate final Stringprivate final UUIDprivate booleanFields inherited from interface Dependable
ACTIVATION, ALIAS, COLUMNS_IN_TABLE, COLUMNS_PERMISSION, CONGLOMERATE, CONSTRAINT, DEFAULT, FILE, HEAP, INDEX, PERM, PREPARED_STATEMENT, ROLE_GRANT, ROUTINE_PERMISSION, SCHEMA, SEQUENCE, STORED_PREPARED_STATEMENT, TABLE, TABLE_PERMISSION, TRIGGER, VIEW -
Constructor Summary
ConstructorsConstructorDescriptionRoleGrantDescriptor(DataDictionary dd, UUID uuid, String roleName, String grantee, String grantor, boolean withAdminOption, boolean isDef) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidDrop this role.descriptorGet the provider's type.Get an object which can be written to disk and which, when read from disk, will find or reconstruct this in-memory Dependable.Each descriptor must identify itself with its type; i.e index, check constraint whatever.Get the provider's UUIDReturn the name of this Provider.getUUID()booleanisDef()booleanIs this provider persistent?booleanvoidsetWithAdminOption(boolean b) toString()Methods inherited from class TupleDescriptor
getColumnDependableFinder, getDataDictionary, getDependableFinder, setDataDictionary
-
Field Details
-
uuid
-
roleName
-
grantee
-
grantor
-
withAdminOption
private boolean withAdminOption -
isDef
private final boolean isDef
-
-
Constructor Details
-
RoleGrantDescriptor
public RoleGrantDescriptor(DataDictionary dd, UUID uuid, String roleName, String grantee, String grantor, boolean withAdminOption, boolean isDef) Constructor- Parameters:
dd- data dictionaryuuid- unique identification in time and space of this role descriptorroleName-grantee-grantor-withAdminOption-isDef-
-
-
Method Details
-
getUUID
-
getGrantee
-
getGrantor
-
isDef
public boolean isDef() -
getRoleName
-
isWithAdminOption
public boolean isWithAdminOption() -
setWithAdminOption
public void setWithAdminOption(boolean b) -
toString
-
getDescriptorType
Description copied from class:TupleDescriptorEach descriptor must identify itself with its type; i.e index, check constraint whatever.- Overrides:
getDescriptorTypein classTupleDescriptor
-
getDescriptorName
- Overrides:
getDescriptorNamein classTupleDescriptor
-
drop
Drop this role.descriptor- Throws:
StandardException- Could not be dropped.
-
getObjectID
Get the provider's UUID- Specified by:
getObjectIDin interfaceDependable- Returns:
- The provider's UUID
-
isPersistent
public boolean isPersistent()Is this provider persistent? A stored dependency will be required if both the dependent and provider are persistent.- Specified by:
isPersistentin interfaceDependable- Overrides:
isPersistentin classTupleDescriptor- Returns:
- boolean Whether or not this provider is persistent.
-
getObjectName
Return the name of this Provider. (Useful for errors.)- Specified by:
getObjectNamein interfaceDependable- Returns:
- String The name of this provider.
-
getClassType
Get the provider's type.- Specified by:
getClassTypein interfaceDependable- Returns:
- char The provider's type.
-
getDependableFinder
Description copied from interface:DependableGet an object which can be written to disk and which, when read from disk, will find or reconstruct this in-memory Dependable.- Specified by:
getDependableFinderin interfaceDependable- Returns:
- the stored form of this provider
- See Also:
-