public class StatementColumnPermission extends StatementTablePermission
Modifier and Type | Field and Description |
---|---|
private FormatableBitSet |
columns |
privType, tableUUID
Constructor and Description |
---|
StatementColumnPermission(UUID tableUUID,
int privType,
FormatableBitSet columns)
Constructor for StatementColumnPermission.
|
Modifier and Type | Method and Description |
---|---|
private FormatableBitSet |
addPermittedColumns(DataDictionary dd,
boolean forGrant,
java.lang.String authorizationId,
FormatableBitSet permittedColumns)
Add one user's set of permitted columns to a list of permitted columns.
|
boolean |
allColumnsCoveredByUserOrPUBLIC(java.lang.String authid,
DataDictionary dd)
Returns false if the current role is necessary to cover
the necessary permission(s).
|
void |
check(LanguageConnectionContext lcc,
boolean forGrant,
Activation activation) |
boolean |
equals(java.lang.Object obj)
Method to check if another instance of column access descriptor matches this.
|
FormatableBitSet |
getColumns()
Return list of columns that need access
|
PermissionsDescriptor |
getPermissionDescriptor(java.lang.String authid,
DataDictionary dd)
Get the PermissionsDescriptor for the passed authorization id for this
object.
|
PermissionsDescriptor |
getPUBLIClevelColPermsDescriptor(java.lang.String authid,
DataDictionary dd)
This method gets called in execution phase after it is established that
all the required privileges exist for the given sql.
|
java.lang.String |
toString() |
private FormatableBitSet |
tryRole(LanguageConnectionContext lcc,
DataDictionary dd,
boolean forGrant,
java.lang.String r)
Try to use the supplied role r to see what column privileges are we
entitled to.
|
getPrivName, getPrivType, getTableDescriptor, getTableUUID, hashCode, hasPermissionOnTable, oneAuthHasPermissionOnTable
genericCheck, getObjectType, getPrivilegedObject, isCorrectPermission
private FormatableBitSet columns
public StatementColumnPermission(UUID tableUUID, int privType, FormatableBitSet columns)
tableUUID
- UUID of the tableprivType
- Access privilege requestedcolumns
- List of columnspublic FormatableBitSet getColumns()
public boolean equals(java.lang.Object obj)
equals
in class StatementTablePermission
obj
- Another instance of StatementPermissionpublic void check(LanguageConnectionContext lcc, boolean forGrant, Activation activation) throws StandardException
check
in class StatementTablePermission
lcc
- LanguageConnectionContextactivation
- activation for statement needing checkStandardException
- if the permission has not been grantedStatementPermission.check(org.apache.derby.iapi.sql.conn.LanguageConnectionContext, boolean, org.apache.derby.iapi.sql.Activation)
private FormatableBitSet addPermittedColumns(DataDictionary dd, boolean forGrant, java.lang.String authorizationId, FormatableBitSet permittedColumns) throws StandardException
StandardException
public PermissionsDescriptor getPermissionDescriptor(java.lang.String authid, DataDictionary dd) throws StandardException
StatementPermission
getPermissionDescriptor
in class StatementTablePermission
authid
- AuthorizationIddd
- DataDictionaryStandardException
StatementPermission.getPermissionDescriptor(java.lang.String, org.apache.derby.iapi.sql.dictionary.DataDictionary)
public PermissionsDescriptor getPUBLIClevelColPermsDescriptor(java.lang.String authid, DataDictionary dd) throws StandardException
StandardException
public boolean allColumnsCoveredByUserOrPUBLIC(java.lang.String authid, DataDictionary dd) throws StandardException
authid
- authentication id of the current userdd
- data dictionaryStandardException
private FormatableBitSet tryRole(LanguageConnectionContext lcc, DataDictionary dd, boolean forGrant, java.lang.String r) throws StandardException
lcc
- language connection contextdd
- data dictionaryforGrant
- true of a GRANTable permission is soughtr
- the role to inspect to see if it can supply the required
privileges
return the set of columns on which we have privileges through this roleStandardException
public java.lang.String toString()
toString
in class StatementTablePermission
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.