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

public Class GetProcedureColumns

extends VTITemplate
Class Inheritance
Imports
java.sql.Types, .ResultSetMetaData, .SQLException, .DatabaseMetaData, org.apache.derby.iapi.types.DataTypeDescriptor, .DataTypeUtilities, org.apache.derby.iapi.sql.ResultColumnDescriptor, org.apache.derby.impl.jdbc.EmbedResultSetMetaData, org.apache.derby.catalog.types.RoutineAliasInfo

Use of VirtualTableInterface to provide support for DatabaseMetaData.getProcedureColumns().

This class is called from a Query constructed in java/org.apache.derby.impl.jdbc/metadata.properties: The VTI will return columns 3-14, an extra column to the specification METHOD_ID is returned to distinguish between overloaded methods.

  1. PROCEDURE_CAT String => procedure catalog (may be null)
  2. PROCEDURE_SCHEM String => procedure schema (may be null)
  3. PROCEDURE_NAME String => procedure name
  4. COLUMN_NAME String => column/parameter name
  5. COLUMN_TYPE Short => kind of column/parameter:
    • procedureColumnUnknown - nobody knows
    • procedureColumnIn - IN parameter
    • procedureColumnInOut - INOUT parameter
    • procedureColumnOut - OUT parameter
    • procedureColumnReturn - procedure return value
    • procedureColumnResult - result column in ResultSet
  6. DATA_TYPE int => SQL type from java.sql.Types
  7. TYPE_NAME String => SQL type name, for a UDT type the type name is fully qualified
  8. PRECISION int => precision
  9. LENGTH int => length in bytes of data
  10. SCALE short => scale
  11. RADIX short => radix
  12. NULLABLE short => can it contain NULL?
    • procedureNoNulls - does not allow NULL values
    • procedureNullable - allows NULL values
    • procedureNullableUnknown - nullability unknown
  13. REMARKS String => comment describing parameter/column
  14. METHOD_ID Short => Derby extra column (overloading)
  15. PARAMETER_ID Short => Derby extra column (output order)

Field Summary

Modifier and TypeField and Description
private static final ResultColumnDescriptor[]
private String
private short
private boolean
private boolean
private static final ResultSetMetaData
private short
private final short
private short
private int
private RoutineAliasInfo
private int
private int
private TypeDescriptor
private TypeDescriptor

Constructor Summary

AccessConstructor and Description
public
GetProcedureColumns(AliasInfo aliasInfo, String aliasType)

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 int
getInt(int
the first column is 1, the second is 2, ...
column
)

Overrides org.apache.derby.vti.VTITemplate.getInt.

Implements java.sql.ResultSet.getInt.

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

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 short
getShort(int
the first column is 1, the second is 2, ...
column
)

Overrides org.apache.derby.vti.VTITemplate.getShort.

Implements java.sql.ResultSet.getShort.

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

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

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.

private int
translate(int val)

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

Field Detail

columnInfoback to summary
private static final ResultColumnDescriptor[] columnInfo
columnNameback to summary
private String columnName
columnTypeback to summary
private short columnType
isFunctionback to summary
private boolean isFunction
isProcedureback to summary
private boolean isProcedure
metadataback to summary
private static final ResultSetMetaData metadata
method_countback to summary
private short method_count
nullableback to summary
private final short nullable
param_numberback to summary
private short param_number
paramCursorback to summary
private int paramCursor
procedureback to summary
private RoutineAliasInfo procedure
returnedTableColumnCountback to summary
private int returnedTableColumnCount
rowCountback to summary
private int rowCount
sqlTypeback to summary
private TypeDescriptor sqlType
tableFunctionReturnTypeback to summary
private TypeDescriptor tableFunctionReturnType

Constructor Detail

GetProcedureColumnsback to summary
public GetProcedureColumns(AliasInfo aliasInfo, String aliasType) throws 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.

getIntback to summary
public int getInt(int column) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getInt.

Implements java.sql.ResultSet.getInt.

Doc from java.sql.ResultSet.getInt.

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

Parameters
column:int

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

Returns:int

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

Exceptions
SQLException:
if the columnIndex is not valid; if a database access error occurs or this method is called on a closed result set
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

getShortback to summary
public short getShort(int column) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getShort.

Implements java.sql.ResultSet.getShort.

Doc from java.sql.ResultSet.getShort.

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

Parameters
column:int

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

Returns:short

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

Exceptions
SQLException:
if the columnIndex is not valid; if a database access error occurs or this method is called on a closed result set
getStringback to summary
public String getString(int column) 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
column: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
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
translateback to summary
private int translate(int val)