Class ColPermsDescriptor
- java.lang.Object
-
- org.apache.derby.iapi.sql.dictionary.TupleDescriptor
-
- org.apache.derby.iapi.sql.dictionary.PermissionsDescriptor
-
- org.apache.derby.iapi.sql.dictionary.ColPermsDescriptor
-
- All Implemented Interfaces:
java.lang.Cloneable,Dependable,Provider
public class ColPermsDescriptor extends PermissionsDescriptor
This class describes a row in the SYS.SYSCOLPERMS system table, which keeps the column permissions that have been granted but not revoked.
-
-
Field Summary
Fields Modifier and Type Field Description private FormatableBitSetcolumnsprivate java.lang.StringtableNameprivate UUIDtableUUIDprivate java.lang.Stringtype-
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
Constructors Constructor Description ColPermsDescriptor(DataDictionary dd, java.lang.String grantee, java.lang.String grantor, UUID tableUUID, java.lang.String type)This constructor just initializes the key fields of a ColPermsDescriptorColPermsDescriptor(DataDictionary dd, java.lang.String grantee, java.lang.String grantor, UUID tableUUID, java.lang.String type, FormatableBitSet columns)ColPermsDescriptor(DataDictionary dd, UUID colPermsUUID)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckOwner(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.booleanequals(java.lang.Object other)intgetCatalogNumber()java.lang.StringgetClassType()Get the provider's type.FormatableBitSetgetColumns()DependableFindergetDependableFinder()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.StringgetObjectName()Return the name of this Provider.UUIDgetTableUUID()java.lang.StringgetType()inthashCode()java.lang.StringtoString()-
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
-
-
-
-
Field Detail
-
tableUUID
private UUID tableUUID
-
type
private java.lang.String type
-
columns
private FormatableBitSet columns
-
tableName
private java.lang.String tableName
-
-
Constructor Detail
-
ColPermsDescriptor
public ColPermsDescriptor(DataDictionary dd, java.lang.String grantee, java.lang.String grantor, UUID tableUUID, java.lang.String type, FormatableBitSet columns) throws StandardException
- Throws:
StandardException
-
ColPermsDescriptor
public ColPermsDescriptor(DataDictionary dd, java.lang.String grantee, java.lang.String grantor, UUID tableUUID, java.lang.String type) throws StandardException
This constructor just initializes the key fields of a ColPermsDescriptor- Throws:
StandardException
-
ColPermsDescriptor
public ColPermsDescriptor(DataDictionary dd, UUID colPermsUUID) throws StandardException
- Throws:
StandardException
-
-
Method Detail
-
getCatalogNumber
public int getCatalogNumber()
- Specified by:
getCatalogNumberin classPermissionsDescriptor
-
getTableUUID
public UUID getTableUUID()
-
getType
public java.lang.String getType()
-
getColumns
public FormatableBitSet getColumns()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.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:
hashCodein classjava.lang.Object- Returns:
- the hashCode for the key part of this permissions descriptor
-
checkOwner
public boolean checkOwner(java.lang.String authorizationId) throws StandardExceptionDescription copied from class:PermissionsDescriptorThis 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:
checkOwnerin classPermissionsDescriptor- 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:DependableGet 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()
-
-