Top Description Fields Constructors Methods
org.apache.derby.diag

public Class ContainedRoles

extends VTITemplate
Class Inheritance
Imports
java.sql.ResultSetMetaData, .SQLException, .Types, org.apache.derby.iapi.sql.conn.ConnectionUtil, .LanguageConnectionContext, org.apache.derby.iapi.sql.dictionary.DataDictionary, .RoleClosureIterator, .RoleGrantDescriptor, org.apache.derby.iapi.sql.ResultColumnDescriptor, org.apache.derby.shared.common.error.StandardException, .PublicAPI, org.apache.derby.shared.common.reference.Limits, org.apache.derby.iapi.util.IdUtil, org.apache.derby.vti.VTITemplate, org.apache.derby.impl.jdbc.EmbedResultSetMetaData

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

Modifier and TypeField and Description
private static final ResultColumnDescriptor[]
pack-priv boolean
pack-priv boolean
private static final ResultSetMetaData
pack-priv String
pack-priv RoleClosureIterator
pack-priv String

Constructor Summary

AccessConstructor and Description
public
ContainedRoles(String
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).
roleid
,
int
If != 0, use the inverse relation: find those roles which all contain roleid (inclusive).
inverse
)

Constructor.

public
ContainedRoles(String
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).
roleid
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements java.sql.ResultSet.close.

Releases this ResultSet object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.

public ResultSetMetaData
getMetaData()

Overrides org.apache.derby.vti.VTITemplate.getMetaData.

Implements java.sql.ResultSet.getMetaData.

Retrieves the number, types and properties of this ResultSet object's columns.

public String
getString(int
the first column is 1, the second is 2, ...
columnIndex
)

Overrides org.apache.derby.vti.VTITemplate.getString.

Implements java.sql.ResultSet.getString.

Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.

public boolean
next()

Implements java.sql.ResultSet.next.

Moves the cursor forward one row from its current position.

Inherited from org.apache.derby.vti.VTITemplate:
absoluteafterLastbeforeFirstcancelRowUpdatesclearWarningsdeleteRowfindColumnfirstgetArraygetArraygetAsciiStreamgetAsciiStreamgetBigDecimalgetBigDecimalgetBigDecimalgetBigDecimalgetBinaryStreamgetBinaryStreamgetBlobgetBlobgetBooleangetBooleangetBytegetBytegetBytesgetBytesgetCharacterStreamgetCharacterStreamgetClobgetClobgetConcurrencygetContextgetCursorNamegetDategetDategetDategetDategetDoublegetDoublegetFetchDirectiongetFetchSizegetFloatgetFloatgetHoldabilitygetIntgetIntgetLonggetLonggetNCharacterStreamgetNCharacterStreamgetNClobgetNClobgetNStringgetNStringgetObjectgetObjectgetObjectgetObjectgetObjectgetObjectgetRefgetRefgetReturnTableSignaturegetRowgetRowIdgetRowIdgetShortgetShortgetSQLXMLgetSQLXMLgetStatementgetStringgetTimegetTimegetTimegetTimegetTimestampgetTimestampgetTimestampgetTimestampgetTypegetUnicodeStreamgetUnicodeStreamgetURLgetURLgetWarningsinsertRowisAfterLastisBeforeFirstisClosedisFirstisLastisWrapperForlastmoveToCurrentRowmoveToInsertRownotImplementedpreviousrefreshRowrelativerowDeletedrowInsertedrowUpdatedsetContextsetFetchDirectionsetFetchSizeunwrapupdateArrayupdateArrayupdateAsciiStreamupdateAsciiStreamupdateAsciiStreamupdateAsciiStreamupdateAsciiStreamupdateAsciiStreamupdateBigDecimalupdateBigDecimalupdateBinaryStreamupdateBinaryStreamupdateBinaryStreamupdateBinaryStreamupdateBinaryStreamupdateBinaryStreamupdateBlobupdateBlobupdateBlobupdateBlobupdateBlobupdateBlobupdateBooleanupdateBooleanupdateByteupdateByteupdateBytesupdateBytesupdateCharacterStreamupdateCharacterStreamupdateCharacterStreamupdateCharacterStreamupdateCharacterStreamupdateCharacterStreamupdateClobupdateClobupdateClobupdateClobupdateClobupdateClobupdateDateupdateDateupdateDoubleupdateDoubleupdateFloatupdateFloatupdateIntupdateIntupdateLongupdateLongupdateNCharacterStreamupdateNCharacterStreamupdateNCharacterStreamupdateNCharacterStreamupdateNClobupdateNClobupdateNClobupdateNClobupdateNClobupdateNClobupdateNStringupdateNStringupdateNullupdateNullupdateObjectupdateObjectupdateObjectupdateObjectupdateRefupdateRefupdateRowupdateRowIdupdateRowIdupdateShortupdateShortupdateSQLXMLupdateSQLXMLupdateStringupdateStringupdateTimeupdateTimeupdateTimestampupdateTimestampwasNull

Field Detail

columnInfoback to summary
private static final ResultColumnDescriptor[] columnInfo
initializedback to summary
pack-priv boolean initialized
inverseback to summary
pack-priv boolean inverse
metadataback to summary
private static final ResultSetMetaData metadata
nextRoleback to summary
pack-priv String nextRole
rciback to summary
pack-priv RoleClosureIterator rci
roleback to summary
pack-priv String role

Constructor Detail

ContainedRolesback to summary
public ContainedRoles(String roleid, int inverse) throws SQLException

Constructor.

Parameters
roleid:String

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:int

If != 0, use the inverse relation: find those roles which all contain roleid (inclusive).

Exceptions
SQLException:
This is a public API, so the internal exception is wrapped in SQLException.
ContainedRolesback to summary
public ContainedRoles(String roleid) throws SQLException

Constructor.

Parameters
roleid:String

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).

Exceptions
SQLException:
This is a public API, so the internal exception is wrapped in SQLException.

Method Detail

closeback to summary
public void close()

Implements java.sql.ResultSet.close.

Doc from java.sql.ResultSet.close.

Releases this ResultSet object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.

The closing of a ResultSet object does not close the Blob, Clob or NClob objects created by the ResultSet. Blob, Clob or NClob objects remain valid for at least the duration of the transaction in which they are created, unless their free method is invoked.

When a ResultSet is closed, any ResultSetMetaData instances that were created by calling the getMetaData method remain accessible.

Note

A ResultSet object is automatically closed by the Statement object that generated it when that Statement object is closed, re-executed, or is used to retrieve the next result from a sequence of multiple results.

Calling the method close on a ResultSet object that is already closed is a no-op.

See Also
java.sql.ResultSet#close
getMetaDataback to summary
public ResultSetMetaData getMetaData()

Overrides org.apache.derby.vti.VTITemplate.getMetaData.

Implements java.sql.ResultSet.getMetaData.

Doc from java.sql.ResultSet.getMetaData.

Retrieves the number, types and properties of this ResultSet object's columns.

Returns:ResultSetMetaData

the description of this ResultSet object's columns

See Also
java.sql.ResultSet#getMetaData
getStringback to summary
public String getString(int columnIndex) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getString.

Implements java.sql.ResultSet.getString.

Doc from java.sql.ResultSet.getString.

Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.

Parameters
columnIndex:int

the first column is 1, the second is 2, ...

Returns:String

the column value; if the value is SQL NULL, the value returned is null

Exceptions
SQLException:
if the columnIndex is not valid; if a database access error occurs or this method is called on a closed result set
See Also
java.sql.ResultSet#getString
nextback to summary
public boolean next() throws SQLException

Implements java.sql.ResultSet.next.

Doc from java.sql.ResultSet.next.

Moves the cursor forward one row from its current position. A ResultSet cursor is initially positioned before the first row; the first call to the method next makes the first row the current row; the second call makes the second row the current row, and so on.

When a call to the next method returns false, the cursor is positioned after the last row. Any invocation of a ResultSet method which requires a current row will result in a SQLException being thrown. If the result set type is TYPE_FORWARD_ONLY, it is vendor specified whether their JDBC driver implementation will return false or throw an SQLException on a subsequent call to next.

If an input stream is open for the current row, a call to the method next will implicitly close it. A ResultSet object's warning chain is cleared when a new row is read.

Returns:boolean

true if the new current row is valid; false if there are no more rows

Exceptions
SQLException:
if a database access error occurs or this method is called on a closed result set
See Also
java.sql.ResultSet#next