public abstract class StringColumnVTI extends VTITemplate
This is an abstract table function which assumes that all columns are strings and which coerces the strings to reasonable values for various getXXX() methods. Subclasses must implement the following ResultSet methods:
and the following protected method introduced by this class:
VTITemplate.ColumnDescriptorCLOSE_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 and Description |
|---|
StringColumnVTI(String[] columnNames)
Build a StringColumnVTI with the given column names
|
| Modifier and Type | Method and Description |
|---|---|
int |
findColumn(String columnName) |
InputStream |
getAsciiStream(int columnIndex) |
BigDecimal |
getBigDecimal(int columnIndex) |
InputStream |
getBinaryStream(int columnIndex) |
Blob |
getBlob(int columnIndex) |
boolean |
getBoolean(int columnIndex) |
byte |
getByte(int columnIndex) |
byte[] |
getBytes(int columnIndex) |
Clob |
getClob(int columnIndex) |
int |
getColumnCount()
Get the number of columns.
|
String |
getColumnName(int columnNumber)
Get name of a column (1-based indexing).
|
Date |
getDate(int columnIndex) |
double |
getDouble(int columnIndex) |
float |
getFloat(int columnIndex) |
int |
getInt(int columnIndex) |
long |
getLong(int columnIndex) |
short |
getShort(int columnIndex) |
String |
getString(int columnIndex) |
Time |
getTime(int columnIndex) |
Timestamp |
getTimestamp(int columnIndex) |
void |
setColumnNames(String[] columnNames)
Set the column names for this table function.
|
boolean |
wasNull() |
absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, deleteRow, first, getArray, getArray, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBlob, getBoolean, getByte, getBytes, getCharacterStream, getCharacterStream, getClob, getConcurrency, getContext, getCursorName, getDate, getDate, getDate, getDouble, getFetchDirection, getFetchSize, getFloat, getHoldability, getInt, getLong, getMetaData, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getReturnTableSignature, getRow, getRowId, getRowId, getShort, getSQLXML, getSQLXML, getStatement, getString, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, isWrapperFor, last, moveToCurrentRow, moveToInsertRow, 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, updateTimestampequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, next, updateObject, updateObject, updateObject, updateObjectpublic StringColumnVTI(String[] columnNames)
Build a StringColumnVTI with the given column names
public void setColumnNames(String[] columnNames) throws SQLException
Set the column names for this table function. This is useful for AwareVTIs, which need to figure out their column names after analyzing their execution context. Throws an exception if the column names have already been set.
SQLExceptionpublic int getColumnCount()
Get the number of columns.
public String getColumnName(int columnNumber)
Get name of a column (1-based indexing).
public boolean wasNull()
throws SQLException
wasNull in interface ResultSetwasNull in class VTITemplateSQLExceptionpublic int findColumn(String columnName) throws SQLException
findColumn in interface ResultSetfindColumn in class VTITemplateSQLExceptionpublic String getString(int columnIndex) throws SQLException
getString in interface ResultSetgetString in class VTITemplateSQLExceptionpublic boolean getBoolean(int columnIndex)
throws SQLException
getBoolean in interface ResultSetgetBoolean in class VTITemplateSQLExceptionpublic byte getByte(int columnIndex)
throws SQLException
getByte in interface ResultSetgetByte in class VTITemplateSQLExceptionpublic short getShort(int columnIndex)
throws SQLException
getShort in interface ResultSetgetShort in class VTITemplateSQLExceptionpublic int getInt(int columnIndex)
throws SQLException
getInt in interface ResultSetgetInt in class VTITemplateSQLExceptionpublic long getLong(int columnIndex)
throws SQLException
getLong in interface ResultSetgetLong in class VTITemplateSQLExceptionpublic float getFloat(int columnIndex)
throws SQLException
getFloat in interface ResultSetgetFloat in class VTITemplateSQLExceptionpublic double getDouble(int columnIndex)
throws SQLException
getDouble in interface ResultSetgetDouble in class VTITemplateSQLExceptionpublic BigDecimal getBigDecimal(int columnIndex) throws SQLException
getBigDecimal in interface ResultSetgetBigDecimal in class VTITemplateSQLExceptionpublic byte[] getBytes(int columnIndex)
throws SQLException
getBytes in interface ResultSetgetBytes in class VTITemplateSQLExceptionpublic Date getDate(int columnIndex) throws SQLException
getDate in interface ResultSetgetDate in class VTITemplateSQLExceptionpublic Time getTime(int columnIndex) throws SQLException
getTime in interface ResultSetgetTime in class VTITemplateSQLExceptionpublic Timestamp getTimestamp(int columnIndex) throws SQLException
getTimestamp in interface ResultSetgetTimestamp in class VTITemplateSQLExceptionpublic InputStream getAsciiStream(int columnIndex) throws SQLException
getAsciiStream in interface ResultSetgetAsciiStream in class VTITemplateSQLExceptionpublic InputStream getBinaryStream(int columnIndex) throws SQLException
getBinaryStream in interface ResultSetgetBinaryStream in class VTITemplateSQLExceptionpublic Blob getBlob(int columnIndex) throws SQLException
getBlob in interface ResultSetgetBlob in class VTITemplateSQLExceptionpublic Clob getClob(int columnIndex) throws SQLException
getClob in interface ResultSetgetClob in class VTITemplateSQLExceptionApache Derby 10.14 API Documentation - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.