Class PermissionsDescriptor
java.lang.Object
org.apache.derby.iapi.sql.dictionary.TupleDescriptor
org.apache.derby.iapi.sql.dictionary.PermissionsDescriptor
- All Implemented Interfaces:
Cloneable
,Dependable
,Provider
- Direct Known Subclasses:
ColPermsDescriptor
,PermDescriptor
,RoutinePermsDescriptor
,TablePermsDescriptor
This class is used by rows in the SYS.SYSTABLEPERMS, SYS.SYSCOLPERMS, and SYS.SYSROUTINEPERMS
system tables.
-
Field Summary
FieldsFields inherited from interface org.apache.derby.catalog.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
checkOwner
(String authorizationId) This method checks if the passed authorization id is same as the owner of the object on which this permission is defined.clone()
abstract int
final String
final String
Get the provider's UUIDgetUUID()
Gets the UUID of the table.boolean
Is this provider persistent?protected boolean
keyEquals
(PermissionsDescriptor other) protected int
void
setGrantee
(String grantee) void
Sets the UUID of the tableMethods inherited from class org.apache.derby.iapi.sql.dictionary.TupleDescriptor
getColumnDependableFinder, getDataDictionary, getDependableFinder, getDescriptorName, getDescriptorType, setDataDictionary
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.derby.catalog.Dependable
getClassType, getDependableFinder, getObjectName
-
Field Details
-
oid
-
grantee
-
grantor
-
-
Constructor Details
-
PermissionsDescriptor
PermissionsDescriptor(DataDictionary dd, String grantee, String grantor)
-
-
Method Details
-
clone
-
getCatalogNumber
public abstract int getCatalogNumber() -
keyEquals
- Returns:
- true iff the key part of this permissions descriptor equals the key part of another permissions descriptor.
-
keyHashCode
protected int keyHashCode()- Returns:
- the hashCode for the key part of this permissions descriptor
-
setGrantee
-
getGrantee
-
getGrantor
-
getUUID
Gets the UUID of the table.- Returns:
- The UUID of the table.
-
setUUID
Sets the UUID of the table- Parameters:
oid
- The UUID of the table to be set in the descriptor
-
checkOwner
This method checks if the passed authorization id is same as the owner of the object on which this permission is defined. This method gets called by create view/constraint/trigger to see if this permission needs to be saved in dependency system for the view/constraint/trigger. If the same user is the owner of the the object being accessed and the newly created object, then no need to keep this privilege dependency- Returns:
- boolean If passed authorization id is owner of the table
- Throws:
StandardException
-
getObjectID
Get the provider's UUID- Specified by:
getObjectID
in 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:
isPersistent
in interfaceDependable
- Overrides:
isPersistent
in classTupleDescriptor
- Returns:
- boolean Whether or not this provider is persistent.
-