Class PrivilegeNode

  • All Implemented Interfaces:
    Visitable

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

      • PrivilegeNode

        PrivilegeNode​(int objectType,
                      java.lang.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,
                      java.lang.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 Detail

      • bind

        public QueryTreeNode bind​(java.util.HashMap<Provider,​Provider> dependencies,
                                  java.util.List<java.lang.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.
      • 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