Class StatementTablePermission

    • Field Detail

      • tableUUID

        UUID tableUUID
      • privType

        int privType
    • Constructor Detail

      • StatementTablePermission

        public StatementTablePermission​(UUID tableUUID,
                                        int privType)
        Constructor for StatementTablePermission. Creates an instance of table permission requested for the given access.
        Parameters:
        tableUUID - UUID of the table
        privType - Access privilege requested
    • Method Detail

      • getPrivType

        public int getPrivType()
        Return privilege access requested for this access descriptor
        Returns:
        Privilege access
      • getTableUUID

        public UUID getTableUUID()
        Return table UUID for this access descriptor
        Returns:
        Table UUID
      • equals

        public boolean equals​(java.lang.Object obj)
        Routine to check if another instance of access descriptor matches this. Used to ensure only one access descriptor for a table of given privilege is created. Otherwise, every column reference from a table may create a descriptor for that table.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - Another instance of StatementPermission
        Returns:
        true if match
      • hashCode

        public int hashCode()
        Return hash code for this instance
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        Hashcode
      • hasPermissionOnTable

        protected boolean hasPermissionOnTable​(LanguageConnectionContext lcc,
                                               Activation activation,
                                               boolean forGrant,
                                               ExecPreparedStatement ps)
                                        throws StandardException
        Check if current session has permission on the table (current user, PUBLIC or role) and, if applicable, register a dependency of ps on the current role.
        Parameters:
        lcc - the current language connection context
        activation - the activation of ps
        forGrant - true if FOR GRANT is required
        ps - the prepared statement for which we are checking necessary privileges
        Throws:
        StandardException
      • getPrivName

        public java.lang.String getPrivName()
        Return privilege needed for this access as string
        Returns:
        privilege string
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object