Class PrivilegeNode
java.lang.Object
org.apache.derby.impl.sql.compile.QueryTreeNode
org.apache.derby.impl.sql.compile.PrivilegeNode
- All Implemented Interfaces:
Visitable
This node represents a set of privileges that are granted or revoked on one object.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate Providerprivate TableNameprivate intprivate Stringprivate booleanstatic final intprivate RoutineDesignatorstatic final intprivate TablePrivilegesNodestatic final intstatic final intFields inherited from class QueryTreeNode
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_CYCLE, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX -
Constructor Summary
ConstructorsConstructorDescriptionPrivilegeNode(int objectType, Object objectOfPrivilege, TablePrivilegesNode specificPrivileges, ContextManager cm) Initialize a PrivilegeNode for use against SYS.SYSTABLEPERMS and SYS.SYSROUTINEPERMS.PrivilegeNode(int objectType, TableName objectName, String privilege, boolean restrict, ContextManager cm) Constructor a PrivilegeNode for use against SYS.SYSPERMS. -
Method Summary
Modifier and TypeMethodDescription(package private) voidAccept a visitor on all child nodes.Bind this GrantNode.(package private) PrivilegeInfoprivate StandardExceptionReport an unimplemented featureMethods inherited from class QueryTreeNode
accept, addTag, addUDTUsagePriv, addUDTUsagePriv, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, convertDefaultNode, copyTagsFrom, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, generate, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContext, getContextManager, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getLongProperty, getNullNode, getOffsetOrderedNodes, getOptimizerFactory, getOptimizerTracer, getParameterTypes, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, getUDTDesc, isAtomic, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, optimizerTracingIsOn, orReliability, parseSearchCondition, parseStatement, printLabel, printSubNodes, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setEndOffset, setRefActionInfo, stackPrint, taggedWith, toString, treePrint, treePrint, verifyClassExist
-
Field Details
-
TABLE_PRIVILEGES
public static final int TABLE_PRIVILEGES- See Also:
-
ROUTINE_PRIVILEGES
public static final int ROUTINE_PRIVILEGES- See Also:
-
SEQUENCE_PRIVILEGES
public static final int SEQUENCE_PRIVILEGES- See Also:
-
UDT_PRIVILEGES
public static final int UDT_PRIVILEGES- See Also:
-
AGGREGATE_PRIVILEGES
public static final int AGGREGATE_PRIVILEGES- See Also:
-
objectType
private int objectType -
objectName
-
specificPrivileges
-
routineDesignator
-
privilege
-
restrict
private boolean restrict -
dependencyProvider
-
-
Constructor Details
-
PrivilegeNode
PrivilegeNode(int objectType, Object objectOfPrivilege, TablePrivilegesNode specificPrivileges, ContextManager cm) throws StandardException Initialize a PrivilegeNode for use against SYS.SYSTABLEPERMS and SYS.SYSROUTINEPERMS.- Parameters:
objectType-objectOfPrivilege- (a TableName or RoutineDesignator)specificPrivileges- null for routines and usagecm- the context manager- Throws:
StandardException
-
PrivilegeNode
PrivilegeNode(int objectType, TableName objectName, String privilege, boolean restrict, ContextManager cm) Constructor a PrivilegeNode for use against SYS.SYSPERMS.- Parameters:
objectType- E.g., SEQUENCEobjectName- A possibles schema-qualified nameprivilege- A PermDescriptor privilege, e.g.PermDescriptor.USAGE_PRIVrestrict- True if this is a REVOKE...RESTRICT actioncm- The context manager
-
-
Method Details
-
bind
public QueryTreeNode bind(HashMap<Provider, Provider> dependencies, List<String> grantees, boolean isGrant) throws StandardExceptionBind 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 granteesisGrant- grant if true; revoke if false- Returns:
- the bound node
- Throws:
StandardException- Standard error policy.
-
makePrivilegeInfo
- Returns:
- PrivilegeInfo for this node
- Throws:
StandardException
-
unimplementedFeature
Report an unimplemented feature -
acceptChildren
Description copied from class:QueryTreeNodeAccept a visitor on all child nodes. All sub-classes that add fields that should be visited, should override this method and callaccept(v)on all visitable fields, as well assuper.acceptChildren(v)to make sure all visitable fields defined by the super-class are accepted too.- Overrides:
acceptChildrenin classQueryTreeNode- Parameters:
v- the visitor- Throws:
StandardException- on errors raised by the visitor
-