org.apache.derby.iapi.sql.dictionary
Class PermissionsDescriptor

java.lang.Object
  extended by org.apache.derby.iapi.sql.dictionary.TupleDescriptor
      extended by org.apache.derby.iapi.sql.dictionary.PermissionsDescriptor
All Implemented Interfaces:
java.lang.Cloneable, Dependable, Provider
Direct Known Subclasses:
ColPermsDescriptor, PermDescriptor, RoutinePermsDescriptor, TablePermsDescriptor

public abstract class PermissionsDescriptor
extends TupleDescriptor
implements java.lang.Cloneable, Provider

This class is used by rows in the SYS.SYSTABLEPERMS, SYS.SYSCOLPERMS, and SYS.SYSROUTINEPERMS system tables.


Field Summary
private  java.lang.String grantee
           
private  java.lang.String grantor
           
protected  UUID oid
           
 
Fields 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
PermissionsDescriptor(DataDictionary dd, java.lang.String grantee, java.lang.String grantor)
           
 
Method Summary
abstract  boolean checkOwner(java.lang.String authorizationId)
          This method checks if the passed authorization id is same as the owner of the object on which this permission is defined.
 java.lang.Object clone()
           
abstract  int getCatalogNumber()
           
 java.lang.String getGrantee()
           
 java.lang.String getGrantor()
           
 UUID getObjectID()
          Get the provider's UUID
 UUID getUUID()
          Gets the UUID of the table.
 boolean isPersistent()
          Is this provider persistent?
protected  boolean keyEquals(PermissionsDescriptor other)
           
protected  int keyHashCode()
           
 void setGrantee(java.lang.String grantee)
           
 void setUUID(UUID oid)
          Sets the UUID of the table
 
Methods 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 Detail

oid

protected UUID oid

grantee

private java.lang.String grantee

grantor

private final java.lang.String grantor
Constructor Detail

PermissionsDescriptor

PermissionsDescriptor(DataDictionary dd,
                      java.lang.String grantee,
                      java.lang.String grantor)
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

getCatalogNumber

public abstract int getCatalogNumber()

keyEquals

protected boolean keyEquals(PermissionsDescriptor other)
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

public void setGrantee(java.lang.String grantee)

getGrantee

public final java.lang.String getGrantee()

getGrantor

public final java.lang.String getGrantor()

getUUID

public UUID getUUID()
Gets the UUID of the table.

Returns:
The UUID of the table.

setUUID

public void setUUID(UUID oid)
Sets the UUID of the table

Parameters:
oid - The UUID of the table to be set in the descriptor

checkOwner

public abstract boolean checkOwner(java.lang.String authorizationId)
                            throws StandardException
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

public UUID getObjectID()
Get the provider's UUID

Specified by:
getObjectID in interface Dependable
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 interface Dependable
Overrides:
isPersistent in class TupleDescriptor
Returns:
boolean Whether or not this provider is persistent.

Built on Thu 2012-03-29 21:53:33+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.