org.apache.derby.diag
Class ContainedRoles

java.lang.Object
  extended by org.apache.derby.vti.VTITemplate
      extended by org.apache.derby.diag.ContainedRoles
All Implemented Interfaces:
java.sql.ResultSet, java.sql.Wrapper

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:


Field Summary
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
           
 
Fields inherited from interface java.sql.ResultSet
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE
 
Constructor Summary
ContainedRoles(java.lang.String roleid)
          Constructor.
ContainedRoles(java.lang.String roleid, int inverse)
          Constructor.
 
Method Summary
 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, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getInt, getInt, getLong, getLong, getObject, getObject, getObject, getObject, getRef, getRef, getRow, getShort, getShort, getStatement, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateShort, updateShort, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.sql.ResultSet
getHoldability, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getRowId, getRowId, getSQLXML, getSQLXML, isClosed, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateRowId, updateRowId, updateSQLXML, updateSQLXML
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 

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()
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 - on unexpected JDBC error
See Also:
ResultSet.getString(int)

Built on Thu 2011-03-10 11:54:14+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.