Top Description Fields Constructors Methods
org.apache.derby.impl.sql.compile

pack-priv Class PrivilegeNode

extends QueryTreeNode
Class Inheritance
Imports
java.util.HashMap, .List, org.apache.derby.catalog.AliasInfo, .TypeDescriptor, org.apache.derby.catalog.types.RoutineAliasInfo, org.apache.derby.shared.common.error.StandardException, org.apache.derby.shared.common.reference.SQLState, org.apache.derby.iapi.services.context.ContextManager, org.apache.derby.iapi.sql.compile.Visitor, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.sql.depend.Provider, org.apache.derby.iapi.sql.dictionary.AliasDescriptor, .PrivilegedSQLObject, .SchemaDescriptor, .TableDescriptor, org.apache.derby.impl.sql.execute.GenericPrivilegeInfo, .PrivilegeInfo

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

Field Summary

Modifier and TypeField and Description
public static final int
private Provider
private TableName
private int
private String
private boolean
public static final int
private RoutineDesignator
public static final int
private TablePrivilegesNode
public static final int
public static final int
Inherited from org.apache.derby.impl.sql.compile.QueryTreeNode:
AUTOINCREMENT_CREATE_MODIFYAUTOINCREMENT_CYCLEAUTOINCREMENT_INC_INDEXAUTOINCREMENT_IS_AUTOINCREMENT_INDEXAUTOINCREMENT_START_INDEX

Constructor Summary

AccessConstructor and Description
pack-priv
PrivilegeNode(int objectType, Object
(a TableName or RoutineDesignator)
objectOfPrivilege
,
TablePrivilegesNode
null for routines and usage
specificPrivileges
,
ContextManager
the context manager
cm
)

Initialize a PrivilegeNode for use against SYS.SYSTABLEPERMS and SYS.SYSROUTINEPERMS.

pack-priv
PrivilegeNode(int
E.g., SEQUENCE
objectType
,
TableName
A possibles schema-qualified name
objectName
,
String
A PermDescriptor privilege, e.g. PermDescriptor.USAGE_PRIV
privilege
,
boolean
True if this is a REVOKE...RESTRICT action
restrict
,
ContextManager
The context manager
cm
)

Constructor a PrivilegeNode for use against SYS.SYSPERMS.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
acceptChildren(Visitor
the visitor
v
)

Overrides org.apache.derby.impl.sql.compile.QueryTreeNode.acceptChildren.

Accept a visitor on all child nodes.

public QueryTreeNode

Returns:

the bound node
bind
(HashMap<Provider, Provider>
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.
dependencies
,
List<String>
The list of grantees
grantees
,
boolean
grant if true; revoke if false
isGrant
)

Bind this GrantNode.

pack-priv PrivilegeInfo

Returns:

PrivilegeInfo for this node
makePrivilegeInfo
()

private StandardException
unimplementedFeature()

Report an unimplemented feature

Inherited from org.apache.derby.impl.sql.compile.QueryTreeNode:
acceptaddTagaddUDTUsagePrivaddUDTUsagePrivbindOffsetFetchbindRowMultiSetbindUserCatalogTypebindUserTypecheckReliabilitycheckReliabilityconvertDefaultNodecopyTagsFromcreateTypeDependencydebugFlushdebugPrintdisablePrivilegeCollectionformatNodeStringgenerategenerateAuthorizeCheckgetBeginOffsetgetClassFactorygetCompilerContextgetContextgetContextManagergetDataDictionarygetDependencyManagergetEndOffsetgetExecutionFactorygetGenericConstantActionFactorygetIntPropertygetLanguageConnectionContextgetLongPropertygetNullNodegetOffsetOrderedNodesgetOptimizerFactorygetOptimizerTracergetParameterTypesgetSchemaDescriptorgetSchemaDescriptorgetStatementTypegetTableDescriptorgetTypeCompilergetUDTDescisAtomicisPrivilegeCollectionRequiredisSessionSchemaisSessionSchemamakeConstantActionmakeTableNamemakeTableNamenodeHeaderoptimizerTracingIsOnorReliabilityparseSearchConditionparseStatementprintLabelprintSubNodesreferencesSessionSchemaresolveTableToSynonymsetBeginOffsetsetEndOffsetsetRefActionInfostackPrinttaggedWithtoStringtreePrinttreePrintverifyClassExist

Field Detail

AGGREGATE_PRIVILEGESback to summary
public static final int AGGREGATE_PRIVILEGES
dependencyProviderback to summary
private Provider dependencyProvider
objectNameback to summary
private TableName objectName
objectTypeback to summary
private int objectType
privilegeback to summary
private String privilege
restrictback to summary
private boolean restrict
ROUTINE_PRIVILEGESback to summary
public static final int ROUTINE_PRIVILEGES
routineDesignatorback to summary
private RoutineDesignator routineDesignator
SEQUENCE_PRIVILEGESback to summary
public static final int SEQUENCE_PRIVILEGES
specificPrivilegesback to summary
private TablePrivilegesNode specificPrivileges
TABLE_PRIVILEGESback to summary
public static final int TABLE_PRIVILEGES
UDT_PRIVILEGESback to summary
public static final int UDT_PRIVILEGES

Constructor Detail

PrivilegeNodeback to summary
pack-priv PrivilegeNode(int objectType, Object objectOfPrivilege, TablePrivilegesNode specificPrivileges, ContextManager cm) throws StandardException

Initialize a PrivilegeNode for use against SYS.SYSTABLEPERMS and SYS.SYSROUTINEPERMS.

Parameters
objectOfPrivilege:Object

(a TableName or RoutineDesignator)

specificPrivileges:TablePrivilegesNode

null for routines and usage

cm:ContextManager

the context manager

PrivilegeNodeback to summary
pack-priv PrivilegeNode(int objectType, TableName objectName, String privilege, boolean restrict, ContextManager cm)

Constructor a PrivilegeNode for use against SYS.SYSPERMS.

Parameters
objectType:int

E.g., SEQUENCE

objectName:TableName

A possibles schema-qualified name

privilege:String

A PermDescriptor privilege, e.g. PermDescriptor.USAGE_PRIV

restrict:boolean

True if this is a REVOKE...RESTRICT action

cm:ContextManager

The context manager

Method Detail

acceptChildrenback to summary
pack-priv void acceptChildren(Visitor v) throws StandardException

Overrides org.apache.derby.impl.sql.compile.QueryTreeNode.acceptChildren.

Doc from org.apache.derby.impl.sql.compile.QueryTreeNode.acceptChildren.

Accept a visitor on all child nodes. All sub-classes that add fields that should be visited, should override this method and call accept(v) on all visitable fields, as well as super.acceptChildren(v) to make sure all visitable fields defined by the super-class are accepted too.

Parameters
v:Visitor

the visitor

Annotations
@Override
Exceptions
StandardException:
on errors raised by the visitor
bindback to summary
public QueryTreeNode bind(HashMap<Provider, Provider> dependencies, List<String> 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:HashMap<Provider, Provider>

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:List<String>

The list of grantees

isGrant:boolean

grant if true; revoke if false

Returns:QueryTreeNode

the bound node

Exceptions
StandardException:
Standard error policy.
makePrivilegeInfoback to summary
pack-priv PrivilegeInfo makePrivilegeInfo() throws StandardException
Returns:PrivilegeInfo

PrivilegeInfo for this node

unimplementedFeatureback to summary
private StandardException unimplementedFeature()

Report an unimplemented feature