Class ContainedRoles

  • All Implemented Interfaces:
    java.lang.AutoCloseable, java.sql.ResultSet, java.sql.Wrapper, AwareVTI

    public class ContainedRoles
    extends VTITemplate
    Contained roles shows all roles contained in the given identifier, or if the second argument, if given, is not 0, the inverse relation; all roles who contain the given role identifier.

    To use it, query it as follows:

     SELECT * FROM TABLE(SUSCS_DIAG.CONTAINED_ROLES('FOO')) t; 
     SELECT * FROM TABLE(CONTAINED_ROLES('FOO', 1)) t; 

    The following columns will be returned:

    • ROLEID -- VARCHAR(128) NOT NULL

    • Field Detail

      • nextRole

        java.lang.String nextRole
      • initialized

        boolean initialized
      • role

        java.lang.String role
      • inverse

        boolean inverse
      • metadata

        private static final java.sql.ResultSetMetaData metadata
    • Constructor Detail

      • ContainedRoles

        public ContainedRoles​(java.lang.String roleid,
                              int inverse)
                       throws java.sql.SQLException
        Constructor.
        Parameters:
        roleid - The role identifier for which we want to find the set of contained roles (inclusive). The identifier is expected to be in SQL form (not case normal form).
        inverse - If != 0, use the inverse relation: find those roles which all contain roleid (inclusive).
        Throws:
        java.sql.SQLException - This is a public API, so the internal exception is wrapped in SQLException.
      • ContainedRoles

        public ContainedRoles​(java.lang.String roleid)
                       throws java.sql.SQLException
        Constructor.
        Parameters:
        roleid - The role identifier for which we want to find the set of contained roles (inclusive). The identifier is expected to be in SQL form (not case normal form).
        Throws:
        java.sql.SQLException - This is a public API, so the internal exception is wrapped in SQLException.
    • Method Detail

      • next

        public boolean next()
                     throws java.sql.SQLException
        Throws:
        java.sql.SQLException
        See Also:
        ResultSet.next()
      • close

        public void close()
        See Also:
        ResultSet.close()
      • getMetaData

        public java.sql.ResultSetMetaData getMetaData()
        Specified by:
        getMetaData in interface java.sql.ResultSet
        Overrides:
        getMetaData in class VTITemplate
        See Also:
        ResultSet.getMetaData()
      • getString

        public java.lang.String getString​(int columnIndex)
                                   throws java.sql.SQLException
        Specified by:
        getString in interface java.sql.ResultSet
        Overrides:
        getString in class VTITemplate
        Throws:
        java.sql.SQLException
        See Also:
        ResultSet.getString(int)