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

public abstract Class PermissionsDescriptor

extends TupleDescriptor
implements Cloneable, Provider
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.sql.depend.Provider, org.apache.derby.catalog.Dependable, java.lang.Cloneable
Known Direct Subclasses
org.apache.derby.iapi.sql.dictionary.RoutinePermsDescriptor, org.apache.derby.iapi.sql.dictionary.TablePermsDescriptor, org.apache.derby.iapi.sql.dictionary.ColPermsDescriptor, org.apache.derby.iapi.sql.dictionary.PermDescriptor
Imports
org.apache.derby.catalog.UUID, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.sql.depend.Provider, org.apache.derby.iapi.sql.dictionary.DataDictionary, org.apache.derby.shared.common.sanity.SanityManager

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

Field Summary

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

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public abstract boolean

Returns:

boolean If passed authorization id is owner of the table
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.

public Object
clone()

Overrides java.lang.Object.clone.

Creates and returns a copy of this object.

public abstract int
public final String
public final String
public UUID

Returns:

The provider's UUID
getObjectID
()

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

Get the provider's UUID

public UUID

Returns:

The UUID of the table.
getUUID
()

Gets the UUID of the table.

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?

protected boolean

Returns:

true iff the key part of this permissions descriptor equals the key part of another permissions descriptor.
keyEquals
(PermissionsDescriptor other)

protected int

Returns:

the hashCode for the key part of this permissions descriptor
keyHashCode
()

public void
setGrantee(String grantee)

public void
setUUID(UUID
The UUID of the table to be set in the descriptor
oid
)

Sets the UUID of the table

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

Field Detail

granteeback to summary
private String grantee
grantorback to summary
private final String grantor
oidback to summary
protected UUID oid

Constructor Detail

PermissionsDescriptorback to summary
pack-priv PermissionsDescriptor(DataDictionary dd, String grantee, String grantor)

Method Detail

checkOwnerback to summary
public abstract boolean checkOwner(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

boolean If passed authorization id is owner of the table

cloneback to summary
public Object clone()

Overrides java.lang.Object.clone.

Doc from java.lang.Object.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Returns:Object

a clone of this instance.

getCatalogNumberback to summary
public abstract int getCatalogNumber()
getGranteeback to summary
public final String getGrantee()
getGrantorback to summary
public final 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

getUUIDback to summary
public UUID getUUID()

Gets the UUID of the table.

Returns:UUID

The UUID of the table.

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.

keyEqualsback to summary
protected boolean keyEquals(PermissionsDescriptor other)
Returns:boolean

true iff the key part of this permissions descriptor equals the key part of another permissions descriptor.

keyHashCodeback to summary
protected int keyHashCode()
Returns:int

the hashCode for the key part of this permissions descriptor

setGranteeback to summary
public void setGrantee(String grantee)
setUUIDback to summary
public void setUUID(UUID oid)

Sets the UUID of the table

Parameters
oid:UUID

The UUID of the table to be set in the descriptor