org.apache.derby.impl.sql.compile
Class PrivilegeNode

java.lang.Object
  extended by org.apache.derby.impl.sql.compile.QueryTreeNode
      extended by org.apache.derby.impl.sql.compile.PrivilegeNode
All Implemented Interfaces:
Visitable

public class PrivilegeNode
extends QueryTreeNode

This node represents a set of privileges that are granted or revoked on one object.


Field Summary
private  Provider dependencyProvider
           
private  TableName objectName
           
private  int objectType
           
private  java.lang.String privilege
           
private  boolean restrict
           
static int ROUTINE_PRIVILEGES
           
private  RoutineDesignator routineDesignator
           
static int SEQUENCE_PRIVILEGES
           
private  TablePrivilegesNode specificPrivileges
           
static int TABLE_PRIVILEGES
           
static int UDT_PRIVILEGES
           
 
Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, isPrivilegeCollectionRequired
 
Constructor Summary
PrivilegeNode()
           
 
Method Summary
 QueryTreeNode bind(java.util.HashMap dependencies, java.util.List grantees, boolean isGrant)
          Bind this GrantNode.
 void init(java.lang.Object objectType, java.lang.Object objectOfPrivilege, java.lang.Object specificPrivileges)
          Initialize a PrivilegeNode for use against SYS.SYSTABLEPERMS and SYS.SYSROUTINEPERMS.
 void init(java.lang.Object objectType, java.lang.Object objectName, java.lang.Object privilege, java.lang.Object restrict)
          Initialize a PrivilegeNode for use against SYS.SYSPERMS.
(package private)  PrivilegeInfo makePrivilegeInfo()
           
private  StandardException unimplementedFeature()
          Report an unimplemented feature
 
Methods inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
accept, acceptChildren, bindOffsetFetch, bindRowMultiSet, bindUserType, checkReliability, checkReliability, convertDefaultNode, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, foundString, generate, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContextManager, getCursorInfo, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getNodeFactory, getNodeType, getNullNode, getParameterTypes, getRowEstimate, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, init, init, init, init, init, init, init, init, init, init, init, init, isAtomic, isInstanceOf, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, orReliability, parseStatement, printLabel, printSubNodes, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setContextManager, setEndOffset, setNodeType, setRefActionInfo, stackPrint, toString, treePrint, treePrint, verifyClassExist
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TABLE_PRIVILEGES

public static final int TABLE_PRIVILEGES
See Also:
Constant Field Values

ROUTINE_PRIVILEGES

public static final int ROUTINE_PRIVILEGES
See Also:
Constant Field Values

SEQUENCE_PRIVILEGES

public static final int SEQUENCE_PRIVILEGES
See Also:
Constant Field Values

UDT_PRIVILEGES

public static final int UDT_PRIVILEGES
See Also:
Constant Field Values

objectType

private int objectType

objectName

private TableName objectName

specificPrivileges

private TablePrivilegesNode specificPrivileges

routineDesignator

private RoutineDesignator routineDesignator

privilege

private java.lang.String privilege

restrict

private boolean restrict

dependencyProvider

private Provider dependencyProvider
Constructor Detail

PrivilegeNode

public PrivilegeNode()
Method Detail

init

public void init(java.lang.Object objectType,
                 java.lang.Object objectOfPrivilege,
                 java.lang.Object specificPrivileges)
          throws StandardException
Initialize a PrivilegeNode for use against SYS.SYSTABLEPERMS and SYS.SYSROUTINEPERMS.

Overrides:
init in class QueryTreeNode
Parameters:
objectType - (an Integer)
objectOfPrivilege - (a TableName or RoutineDesignator)
specificPrivileges - null for routines and usage
Throws:
StandardException - Thrown on error

init

public void init(java.lang.Object objectType,
                 java.lang.Object objectName,
                 java.lang.Object privilege,
                 java.lang.Object restrict)
Initialize a PrivilegeNode for use against SYS.SYSPERMS.

Overrides:
init in class QueryTreeNode
Parameters:
objectType - E.g., SEQUENCE
objectName - A possibles schema-qualified name
privilege - A PermDescriptor privilege, e.g. PermDescriptor.USAGE_PRIV
restrict - True if this is a REVOKE...RESTRICT action

bind

public QueryTreeNode bind(java.util.HashMap dependencies,
                          java.util.List grantees,
                          boolean isGrant)
                   throws StandardException
Bind this GrantNode. Resolve all table, column, and routine references. Register a dependency on the object of the privilege if it has not already been done

Parameters:
dependencies - The list of privilege objects that this statement has already seen. If the object of this privilege is not in the list then this statement is registered as dependent on the object.
grantees - The list of grantees
isGrant - grant if true; revoke if false
Returns:
the bound node
Throws:
StandardException - Standard error policy.

makePrivilegeInfo

PrivilegeInfo makePrivilegeInfo()
                          throws StandardException
Returns:
PrivilegeInfo for this node
Throws:
StandardException

unimplementedFeature

private StandardException unimplementedFeature()
Report an unimplemented feature


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.