Class PrivilegeNode

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

class PrivilegeNode extends QueryTreeNode
This node represents a set of privileges that are granted or revoked on one object.
  • Field Details

  • 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 usage
      cm - 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., 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
      cm - The context manager
  • Method Details

    • bind

      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 - 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
    • acceptChildren

      void acceptChildren(Visitor v) throws StandardException
      Description copied from class: QueryTreeNode
      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.
      Overrides:
      acceptChildren in class QueryTreeNode
      Parameters:
      v - the visitor
      Throws:
      StandardException - on errors raised by the visitor