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

java.lang.Object
  extended by org.apache.derby.iapi.sql.dictionary.TupleDescriptor
      extended by org.apache.derby.iapi.sql.dictionary.RoleGrantDescriptor
All Implemented Interfaces:
Dependable, Provider

public class RoleGrantDescriptor
extends TupleDescriptor
implements 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
private  java.lang.String grantee
           
private  java.lang.String grantor
           
private  boolean isDef
           
private  java.lang.String roleName
           
private  UUID uuid
           
private  boolean withAdminOption
           
 
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
RoleGrantDescriptor(DataDictionary dd, UUID uuid, java.lang.String roleName, java.lang.String grantee, java.lang.String grantor, boolean withAdminOption, boolean isDef)
          Constructor
 
Method Summary
 void drop(LanguageConnectionContext lcc)
          Drop this role.descriptor
 java.lang.String getClassType()
          Get the provider's type.
 DependableFinder getDependableFinder()
          Get an object which can be written to disk and which, when read from disk, will find or reconstruct this in-memory Dependable.
 java.lang.String getDescriptorName()
           
 java.lang.String getDescriptorType()
          Each descriptor must identify itself with its type; i.e index, check constraint whatever.
 java.lang.String getGrantee()
           
 java.lang.String getGrantor()
           
 UUID getObjectID()
          Get the provider's UUID
 java.lang.String getObjectName()
          Return the name of this Provider.
 java.lang.String getRoleName()
           
 UUID getUUID()
           
 boolean isDef()
           
 boolean isPersistent()
          Is this provider persistent?
 boolean isWithAdminOption()
           
 void setWithAdminOption(boolean b)
           
 java.lang.String toString()
           
 
Methods inherited from class org.apache.derby.iapi.sql.dictionary.TupleDescriptor
getColumnDependableFinder, getDataDictionary, getDependableFinder, setDataDictionary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

uuid

private final UUID uuid

roleName

private final java.lang.String roleName

grantee

private final java.lang.String grantee

grantor

private final java.lang.String grantor

withAdminOption

private boolean withAdminOption

isDef

private final boolean isDef
Constructor Detail

RoleGrantDescriptor

public RoleGrantDescriptor(DataDictionary dd,
                           UUID uuid,
                           java.lang.String roleName,
                           java.lang.String grantee,
                           java.lang.String grantor,
                           boolean withAdminOption,
                           boolean isDef)
Constructor

Parameters:
dd - data dictionary
uuid - unique identification in time and space of this role descriptor
roleName -
grantee -
grantor -
withAdminOption -
isDef -
Method Detail

getUUID

public UUID getUUID()

getGrantee

public java.lang.String getGrantee()

getGrantor

public java.lang.String getGrantor()

isDef

public boolean isDef()

getRoleName

public java.lang.String getRoleName()

isWithAdminOption

public boolean isWithAdminOption()

setWithAdminOption

public void setWithAdminOption(boolean b)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getDescriptorType

public java.lang.String getDescriptorType()
Description copied from class: TupleDescriptor
Each descriptor must identify itself with its type; i.e index, check constraint whatever.

Overrides:
getDescriptorType in class TupleDescriptor

getDescriptorName

public java.lang.String getDescriptorName()
Overrides:
getDescriptorName in class TupleDescriptor

drop

public void drop(LanguageConnectionContext lcc)
          throws StandardException
Drop this role.descriptor

Throws:
StandardException - Could not be dropped.

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.

getObjectName

public java.lang.String getObjectName()
Return the name of this Provider. (Useful for errors.)

Specified by:
getObjectName in interface Dependable
Returns:
String The name of this provider.

getClassType

public java.lang.String getClassType()
Get the provider's type.

Specified by:
getClassType in interface Dependable
Returns:
char The provider's type.

getDependableFinder

public DependableFinder getDependableFinder()
Description copied from interface: Dependable
Get an object which can be written to disk and which, when read from disk, will find or reconstruct this in-memory Dependable.

Specified by:
getDependableFinder in interface Dependable
Returns:
the stored form of this provider
See Also:
Dependable.getDependableFinder()

Built on Thu 2011-03-10 11:54:14+0000, from revision ???

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