Package org.apache.derby.diag
Class ContainedRoles
- java.lang.Object
-
- org.apache.derby.vti.VTITemplate
-
- org.apache.derby.diag.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.derby.vti.VTITemplate
VTITemplate.ColumnDescriptor
-
-
Field Summary
Fields Modifier and Type Field Description private static ResultColumnDescriptor[]
columnInfo
(package private) boolean
initialized
(package private) boolean
inverse
private static java.sql.ResultSetMetaData
metadata
(package private) java.lang.String
nextRole
(package private) RoleClosureIterator
rci
(package private) java.lang.String
role
-
Constructor Summary
Constructors Constructor Description ContainedRoles(java.lang.String roleid)
Constructor.ContainedRoles(java.lang.String roleid, int inverse)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
java.sql.ResultSetMetaData
getMetaData()
java.lang.String
getString(int columnIndex)
boolean
next()
-
Methods inherited from class org.apache.derby.vti.VTITemplate
absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getContext, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getHoldability, getInt, getInt, getLong, getLong, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getReturnTableSignature, getRow, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getStatement, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, isWrapperFor, last, moveToCurrentRow, moveToInsertRow, notImplemented, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setContext, setFetchDirection, setFetchSize, unwrap, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNull
-
-
-
-
Field Detail
-
rci
RoleClosureIterator rci
-
nextRole
java.lang.String nextRole
-
initialized
boolean initialized
-
role
java.lang.String role
-
inverse
boolean inverse
-
columnInfo
private static final ResultColumnDescriptor[] columnInfo
-
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 interfacejava.sql.ResultSet
- Overrides:
getMetaData
in classVTITemplate
- See Also:
ResultSet.getMetaData()
-
getString
public java.lang.String getString(int columnIndex) throws java.sql.SQLException
- Specified by:
getString
in interfacejava.sql.ResultSet
- Overrides:
getString
in classVTITemplate
- Throws:
java.sql.SQLException
- See Also:
ResultSet.getString(int)
-
-