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

public final Class ErrorMessages

extends VTITemplate
implements VTICosting
Class Inheritance
All Implemented Interfaces
org.apache.derby.vti.VTICosting
Imports
java.sql.ResultSetMetaData, .SQLException, .Types, java.util.Properties, .Enumeration, java.io.IOException, .InputStream, org.apache.derby.shared.common.error.StandardException, .ExceptionSeverity, org.apache.derby.shared.common.i18n.MessageService, org.apache.derby.shared.common.reference.Limits, org.apache.derby.iapi.util.StringUtil, org.apache.derby.vti.VTITemplate, .VTICosting, .VTIEnvironment, org.apache.derby.impl.jdbc.EmbedResultSetMetaData, org.apache.derby.iapi.sql.ResultColumnDescriptor

ErrorMessage shows all the SQLStates, locale-sensitive error messages, and exception severities for a database.

To use it, query it as follows:

 SELECT* FROM NEW org.apache.derby.diag.ErrorMessages() AS EQ; 

The following columns will be returned:

Field Summary

Modifier and TypeField and Description
private static final ResultColumnDescriptor[]
private String
k

private Enumeration<E>
private String
private static final ResultSetMetaData
private int
private Properties
p

private int
private String

Constructor Summary

AccessConstructor and Description
public

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 double
getEstimatedCostPerInstantiation(VTIEnvironment
The state variable for optimizing the Table Function.
vtiEnvironment
)

Implements org.apache.derby.vti.VTICosting.getEstimatedCostPerInstantiation.

Get the estimated cost for a single instantiation of a Table Function.

public double
getEstimatedRowCount(VTIEnvironment
The state variable for optimizing the Table Function.
vtiEnvironment
)

Implements org.apache.derby.vti.VTICosting.getEstimatedRowCount.

Get the estimated row count for a single scan of a Table Function.

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

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

private void
public boolean
next()

Implements java.sql.ResultSet.next.

Moves the cursor forward one row from its current position.

private boolean
public final InputStream
run()

public boolean
supportsMultipleInstantiations(VTIEnvironment
The state variable for optimizing the Table Function.
vtiEnvironment
)

Implements org.apache.derby.vti.VTICosting.supportsMultipleInstantiations.

Find out if the ResultSet of the Table Function can be instantiated multiple times.

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

Field Detail

columnInfoback to summary
private static final ResultColumnDescriptor[] columnInfo
kback to summary
private String k
keysback to summary
private Enumeration<E> keys
messageback to summary
private String message
metadataback to summary
private static final ResultSetMetaData metadata
msgFileback to summary
private int msgFile
pback to summary
private Properties p
severityback to summary
private int severity
SQLStateback to summary
private String SQLState

Constructor Detail

ErrorMessagesback to summary
public ErrorMessages() throws IOException

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
getEstimatedCostPerInstantiationback to summary
public double getEstimatedCostPerInstantiation(VTIEnvironment vtiEnvironment)

Implements org.apache.derby.vti.VTICosting.getEstimatedCostPerInstantiation.

Doc from org.apache.derby.vti.VTICosting.getEstimatedCostPerInstantiation.

Get the estimated cost for a single instantiation of a Table Function.

Parameters
vtiEnvironment:VTIEnvironment

The state variable for optimizing the Table Function.

Returns:double

The estimated cost for a single instantiation of the Table Function.

getEstimatedRowCountback to summary
public double getEstimatedRowCount(VTIEnvironment vtiEnvironment)

Implements org.apache.derby.vti.VTICosting.getEstimatedRowCount.

Doc from org.apache.derby.vti.VTICosting.getEstimatedRowCount.

Get the estimated row count for a single scan of a Table Function.

Parameters
vtiEnvironment:VTIEnvironment

The state variable for optimizing the Table Function.

Returns:double

The estimated row count for a single scan of the Table Function.

getIntback to summary
public int getInt(int columnIndex) 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
columnIndex: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:
column at index is not found
See Also
java.sql.ResultSet#getInt
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:
column at index is not found
See Also
java.sql.ResultSet#getString
loadPropertiesback to summary
private void loadProperties() throws IOException
nextback to summary
public boolean next()

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

See Also
java.sql.ResultSet#next
notAnExceptionback to summary
private boolean notAnException()
runback to summary
public final InputStream run()
supportsMultipleInstantiationsback to summary
public boolean supportsMultipleInstantiations(VTIEnvironment vtiEnvironment)

Implements org.apache.derby.vti.VTICosting.supportsMultipleInstantiations.

Doc from org.apache.derby.vti.VTICosting.supportsMultipleInstantiations.

Find out if the ResultSet of the Table Function can be instantiated multiple times.

Parameters
vtiEnvironment:VTIEnvironment

The state variable for optimizing the Table Function.

Returns:boolean

True if the ResultSet can be instantiated multiple times, false if can only be instantiated once.