Top Description Fields Constructors Methods
org.apache.derby.iapi.sql.dictionary

public Class RoleGrantDescriptor

extends TupleDescriptor
implements Provider
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.sql.depend.Provider, org.apache.derby.catalog.Dependable
Imports
org.apache.derby.catalog.UUID, .DependableFinder, .Dependable, org.apache.derby.shared.common.error.StandardException, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.services.io.StoredFormatIds, org.apache.derby.iapi.sql.conn.LanguageConnectionContext, org.apache.derby.iapi.sql.depend.Provider, org.apache.derby.iapi.store.access.TransactionController

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

Modifier and TypeField and Description
private final String
private final String
private final boolean
private final String
private final UUID
private boolean

Constructor Summary

AccessConstructor and Description
public
RoleGrantDescriptor(DataDictionary
data dictionary
dd
,
UUID
unique identification in time and space of this role descriptor
uuid
,
String roleName, String grantee, String grantor, boolean withAdminOption, boolean isDef)

Constructor

Method Summary

Modifier and TypeMethod and Description
public void
drop(LanguageConnectionContext lcc)

Drop this role.descriptor

public String

Returns:

char The provider's type.
getClassType
()

Implements org.apache.derby.catalog.Dependable.getClassType.

Get the provider's type.

public DependableFinder

Returns:

the stored form of this provider
getDependableFinder
()

Implements org.apache.derby.catalog.Dependable.getDependableFinder.

Get an object which can be written to disk and which, when read from disk, will find or reconstruct this in-memory Dependable.

public String
public String
getDescriptorType()

Overrides org.apache.derby.iapi.sql.dictionary.TupleDescriptor.getDescriptorType.

Each descriptor must identify itself with its type; i.e index, check constraint whatever.

public String
public String
public UUID

Returns:

The provider's UUID
getObjectID
()

Implements org.apache.derby.catalog.Dependable.getObjectID.

Get the provider's UUID

public String

Returns:

String The name of this provider.
getObjectName
()

Implements org.apache.derby.catalog.Dependable.getObjectName.

Return the name of this Provider.

public String
public UUID
public boolean
public boolean

Returns:

boolean Whether or not this provider is persistent.
isPersistent
()

Overrides org.apache.derby.iapi.sql.dictionary.TupleDescriptor.isPersistent.

Implements org.apache.derby.catalog.Dependable.isPersistent.

Is this provider persistent?

public boolean
public void
setWithAdminOption(boolean b)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from org.apache.derby.iapi.sql.dictionary.TupleDescriptor:
getColumnDependableFindergetDataDictionarygetDependableFindersetDataDictionary

Field Detail

granteeback to summary
private final String grantee
grantorback to summary
private final String grantor
isDefback to summary
private final boolean isDef
roleNameback to summary
private final String roleName
uuidback to summary
private final UUID uuid
withAdminOptionback to summary
private boolean withAdminOption

Constructor Detail

RoleGrantDescriptorback to summary
public RoleGrantDescriptor(DataDictionary dd, UUID uuid, String roleName, String grantee, String grantor, boolean withAdminOption, boolean isDef)

Constructor

Parameters
dd:DataDictionary

data dictionary

uuid:UUID

unique identification in time and space of this role descriptor

Method Detail

dropback to summary
public void drop(LanguageConnectionContext lcc) throws StandardException

Drop this role.descriptor

Exceptions
StandardException:
Could not be dropped.
getClassTypeback to summary
public String getClassType()

Implements org.apache.derby.catalog.Dependable.getClassType.

Get the provider's type.

Returns:String

char The provider's type.

getDependableFinderback to summary
public DependableFinder getDependableFinder()

Implements org.apache.derby.catalog.Dependable.getDependableFinder.

Doc from org.apache.derby.catalog.Dependable.getDependableFinder.

Get an object which can be written to disk and which, when read from disk, will find or reconstruct this in-memory Dependable.

Returns:DependableFinder

the stored form of this provider

See Also
Dependable#getDependableFinder
getDescriptorNameback to summary
public String getDescriptorName()

Overrides org.apache.derby.iapi.sql.dictionary.TupleDescriptor.getDescriptorName.

getDescriptorTypeback to summary
public String getDescriptorType()

Overrides org.apache.derby.iapi.sql.dictionary.TupleDescriptor.getDescriptorType.

Doc from org.apache.derby.iapi.sql.dictionary.TupleDescriptor.getDescriptorType.

Each descriptor must identify itself with its type; i.e index, check constraint whatever.

getGranteeback to summary
public String getGrantee()
getGrantorback to summary
public String getGrantor()
getObjectIDback to summary
public UUID getObjectID()

Implements org.apache.derby.catalog.Dependable.getObjectID.

Get the provider's UUID

Returns:UUID

The provider's UUID

getObjectNameback to summary
public String getObjectName()

Implements org.apache.derby.catalog.Dependable.getObjectName.

Return the name of this Provider. (Useful for errors.)

Returns:String

String The name of this provider.

getRoleNameback to summary
public String getRoleName()
getUUIDback to summary
public UUID getUUID()
isDefback to summary
public boolean isDef()
isPersistentback to summary
public boolean isPersistent()

Overrides org.apache.derby.iapi.sql.dictionary.TupleDescriptor.isPersistent.

Implements org.apache.derby.catalog.Dependable.isPersistent.

Is this provider persistent? A stored dependency will be required if both the dependent and provider are persistent.

Returns:boolean

boolean Whether or not this provider is persistent.

isWithAdminOptionback to summary
public boolean isWithAdminOption()
setWithAdminOptionback to summary
public void setWithAdminOption(boolean b)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object