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

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

public class TablePermsDescriptor
extends PermissionsDescriptor

This class describes a row in the SYS.SYSTABLEPERMS system table, which stores the table permissions that have been granted but not revoked.


Field Summary
private  java.lang.String deletePriv
           
private  java.lang.String insertPriv
           
private  java.lang.String referencesPriv
           
private  java.lang.String selectPriv
           
private  java.lang.String tableName
           
private  UUID tableUUID
           
private  java.lang.String triggerPriv
           
private  java.lang.String updatePriv
           
 
Fields inherited from class org.apache.derby.iapi.sql.dictionary.PermissionsDescriptor
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
TablePermsDescriptor(DataDictionary dd, java.lang.String grantee, java.lang.String grantor, UUID tableUUID)
          This constructor just sets up the key fields of a TablePermsDescriptor
TablePermsDescriptor(DataDictionary dd, java.lang.String grantee, java.lang.String grantor, UUID tableUUID, java.lang.String selectPriv, java.lang.String deletePriv, java.lang.String insertPriv, java.lang.String updatePriv, java.lang.String referencesPriv, java.lang.String triggerPriv)
           
TablePermsDescriptor(DataDictionary dd, UUID tablePermsUUID)
           
 
Method Summary
 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.
 boolean equals(java.lang.Object other)
           
 int getCatalogNumber()
           
 java.lang.String getClassType()
          Get the provider's type.
 java.lang.String getDeletePriv()
           
 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 getInsertPriv()
           
 java.lang.String getObjectName()
          Return the name of this Provider.
 java.lang.String getReferencesPriv()
           
 java.lang.String getSelectPriv()
           
 UUID getTableUUID()
           
 java.lang.String getTriggerPriv()
           
 java.lang.String getUpdatePriv()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class org.apache.derby.iapi.sql.dictionary.PermissionsDescriptor
clone, getGrantee, getGrantor, getObjectID, getUUID, isPersistent, keyEquals, keyHashCode, setGrantee, setUUID
 
Methods inherited from class org.apache.derby.iapi.sql.dictionary.TupleDescriptor
getColumnDependableFinder, getDataDictionary, getDependableFinder, getDescriptorName, getDescriptorType, setDataDictionary
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

tableUUID

private UUID tableUUID

tableName

private java.lang.String tableName

selectPriv

private java.lang.String selectPriv

deletePriv

private java.lang.String deletePriv

insertPriv

private java.lang.String insertPriv

updatePriv

private java.lang.String updatePriv

referencesPriv

private java.lang.String referencesPriv

triggerPriv

private java.lang.String triggerPriv
Constructor Detail

TablePermsDescriptor

public TablePermsDescriptor(DataDictionary dd,
                            java.lang.String grantee,
                            java.lang.String grantor,
                            UUID tableUUID,
                            java.lang.String selectPriv,
                            java.lang.String deletePriv,
                            java.lang.String insertPriv,
                            java.lang.String updatePriv,
                            java.lang.String referencesPriv,
                            java.lang.String triggerPriv)
                     throws StandardException
Throws:
StandardException

TablePermsDescriptor

public TablePermsDescriptor(DataDictionary dd,
                            java.lang.String grantee,
                            java.lang.String grantor,
                            UUID tableUUID)
                     throws StandardException
This constructor just sets up the key fields of a TablePermsDescriptor

Throws:
StandardException

TablePermsDescriptor

public TablePermsDescriptor(DataDictionary dd,
                            UUID tablePermsUUID)
                     throws StandardException
Throws:
StandardException
Method Detail

getCatalogNumber

public int getCatalogNumber()
Specified by:
getCatalogNumber in class PermissionsDescriptor

getTableUUID

public UUID getTableUUID()

getSelectPriv

public java.lang.String getSelectPriv()

getDeletePriv

public java.lang.String getDeletePriv()

getInsertPriv

public java.lang.String getInsertPriv()

getUpdatePriv

public java.lang.String getUpdatePriv()

getReferencesPriv

public java.lang.String getReferencesPriv()

getTriggerPriv

public java.lang.String getTriggerPriv()

toString

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

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object
Returns:
true iff the key part of this permissions descriptor equals the key part of another permissions descriptor.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
Returns:
the hashCode for the key part of this permissions descriptor

checkOwner

public boolean checkOwner(java.lang.String authorizationId)
                   throws StandardException
Description copied from class: PermissionsDescriptor
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

Specified by:
checkOwner in class PermissionsDescriptor
Returns:
boolean If passed authorization id is owner of the table
Throws:
StandardException
See Also:
PermissionsDescriptor.checkOwner(java.lang.String)

getObjectName

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

Returns:
String The name of this provider.

getClassType

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

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.

Returns:
the stored form of this provider
See Also:
Dependable.getDependableFinder()

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.