java.lang.Object
org.apache.derby.vti.VTITemplate
org.apache.derby.vti.StringColumnVTI
- All Implemented Interfaces:
- AutoCloseable,- ResultSet,- Wrapper,- AwareVTI
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:
- next( )
- close()
and the following protected method introduced by this class:
- getRawColumn( int columnNumber )
- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.derby.vti.VTITemplateVTITemplate.ColumnDescriptor
- 
Field SummaryFields inherited from interface java.sql.ResultSetCLOSE_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 SummaryConstructorsConstructorDescriptionStringColumnVTI(String[] columnNames) Build a StringColumnVTI with the given column names
- 
Method SummaryModifier and TypeMethodDescriptionintfindColumn(String columnName) getAsciiStream(int columnIndex) getBigDecimal(int columnIndex) getBinaryStream(int columnIndex) getBlob(int columnIndex) booleangetBoolean(int columnIndex) bytegetByte(int columnIndex) byte[]getBytes(int columnIndex) getClob(int columnIndex) intGet the number of columns.getColumnName(int columnNumber) Get name of a column (1-based indexing).getDate(int columnIndex) doublegetDouble(int columnIndex) floatgetFloat(int columnIndex) intgetInt(int columnIndex) longgetLong(int columnIndex) shortgetShort(int columnIndex) getString(int columnIndex) getTime(int columnIndex) getTimestamp(int columnIndex) voidsetColumnNames(String[] columnNames) Set the column names for this table function.booleanwasNull()Methods inherited from class org.apache.derby.vti.VTITemplateabsolute, 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, updateTimestampMethods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.sql.ResultSetclose, next, updateObject, updateObject, updateObject, updateObject
- 
Constructor Details- 
StringColumnVTIBuild a StringColumnVTI with the given column names - Parameters:
- columnNames- The names of the VTI's columns
 
 
- 
- 
Method Details- 
setColumnNamesSet 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. - Parameters:
- columnNames- The names of the columns to be returned by this VTI
- Throws:
- SQLException- on error
 
- 
getColumnCountpublic int getColumnCount()Get the number of columns. - Returns:
- the number of columns in the VTI
 
- 
getColumnNameGet name of a column (1-based indexing). - Parameters:
- columnNumber- 1-based position of column whose name is needed
- Returns:
- the name of the corresponding column
 
- 
wasNull- Specified by:
- wasNullin interface- ResultSet
- Overrides:
- wasNullin class- VTITemplate
- Throws:
- SQLException
 
- 
findColumn- Specified by:
- findColumnin interface- ResultSet
- Overrides:
- findColumnin class- VTITemplate
- Throws:
- SQLException
 
- 
getString- Specified by:
- getStringin interface- ResultSet
- Overrides:
- getStringin class- VTITemplate
- Throws:
- SQLException
 
- 
getBoolean- Specified by:
- getBooleanin interface- ResultSet
- Overrides:
- getBooleanin class- VTITemplate
- Throws:
- SQLException
 
- 
getByte- Specified by:
- getBytein interface- ResultSet
- Overrides:
- getBytein class- VTITemplate
- Throws:
- SQLException
 
- 
getShort- Specified by:
- getShortin interface- ResultSet
- Overrides:
- getShortin class- VTITemplate
- Throws:
- SQLException
 
- 
getInt- Specified by:
- getIntin interface- ResultSet
- Overrides:
- getIntin class- VTITemplate
- Throws:
- SQLException
 
- 
getLong- Specified by:
- getLongin interface- ResultSet
- Overrides:
- getLongin class- VTITemplate
- Throws:
- SQLException
 
- 
getFloat- Specified by:
- getFloatin interface- ResultSet
- Overrides:
- getFloatin class- VTITemplate
- Throws:
- SQLException
 
- 
getDouble- Specified by:
- getDoublein interface- ResultSet
- Overrides:
- getDoublein class- VTITemplate
- Throws:
- SQLException
 
- 
getBigDecimal- Specified by:
- getBigDecimalin interface- ResultSet
- Overrides:
- getBigDecimalin class- VTITemplate
- Throws:
- SQLException
 
- 
getBytes- Specified by:
- getBytesin interface- ResultSet
- Overrides:
- getBytesin class- VTITemplate
- Throws:
- SQLException
 
- 
getDate- Specified by:
- getDatein interface- ResultSet
- Overrides:
- getDatein class- VTITemplate
- Throws:
- SQLException
 
- 
getTime- Specified by:
- getTimein interface- ResultSet
- Overrides:
- getTimein class- VTITemplate
- Throws:
- SQLException
 
- 
getTimestamp- Specified by:
- getTimestampin interface- ResultSet
- Overrides:
- getTimestampin class- VTITemplate
- Throws:
- SQLException
 
- 
getAsciiStream- Specified by:
- getAsciiStreamin interface- ResultSet
- Overrides:
- getAsciiStreamin class- VTITemplate
- Throws:
- SQLException
 
- 
getBinaryStream- Specified by:
- getBinaryStreamin interface- ResultSet
- Overrides:
- getBinaryStreamin class- VTITemplate
- Throws:
- SQLException
 
- 
getBlob- Specified by:
- getBlobin interface- ResultSet
- Overrides:
- getBlobin class- VTITemplate
- Throws:
- SQLException
 
- 
getClob- Specified by:
- getClobin interface- ResultSet
- Overrides:
- getClobin class- VTITemplate
- Throws:
- SQLException
 
 
-