org.apache.derby.vti

## Class StringColumnVTI

- java.lang.Object
- - org.apache.derby.vti.VTITemplate
  - - org.apache.derby.vti.StringColumnVTI

- All Implemented Interfaces:
    AutoCloseable, ResultSet, Wrapper, AwareVTI

      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:

  - next( )
  - close()

  and the following protected method introduced by this class:

  - getRawColumn( int columnNumber )

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.derby.vti.VTITemplate

      `VTITemplate.ColumnDescriptor`

  - ### Field Summary

    - ### Fields inherited from interface java.sql.ResultSet

      `CLOSE_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 Summary

    Constructors
    Constructor and Description
    `StringColumnVTI(String[] columnNames)` Build a StringColumnVTI with the given column names

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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()`

    - ### Methods inherited from class org.apache.derby.vti.VTITemplate

      `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, updateTimestamp`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.sql.ResultSet

      `close, next, updateObject, updateObject, updateObject, updateObject`

- - ### Constructor Detail

    - #### StringColumnVTI

          public StringColumnVTI(String[] columnNames)

      Build a StringColumnVTI with the given column names

  - ### Method Detail

    - #### setColumnNames

          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.

      Throws:
        `SQLException`

    - #### getColumnCount

          public int getColumnCount()

      Get the number of columns.

    - #### getColumnName

          public String getColumnName(int columnNumber)

      Get name of a column (1-based indexing).

    - #### wasNull

          public boolean wasNull()
                          throws SQLException

      Specified by:
        `wasNull` in interface `ResultSet`
      Overrides:
        `wasNull` in class `VTITemplate`
      Throws:
        `SQLException`

    - #### findColumn

          public int findColumn(String columnName)
                         throws SQLException

      Specified by:
        `findColumn` in interface `ResultSet`
      Overrides:
        `findColumn` in class `VTITemplate`
      Throws:
        `SQLException`

    - #### getString

          public String getString(int columnIndex)
                           throws SQLException

      Specified by:
        `getString` in interface `ResultSet`
      Overrides:
        `getString` in class `VTITemplate`
      Throws:
        `SQLException`

    - #### getBoolean

          public boolean getBoolean(int columnIndex)
                             throws SQLException

      Specified by:
        `getBoolean` in interface `ResultSet`
      Overrides:
        `getBoolean` in class `VTITemplate`
      Throws:
        `SQLException`

    - #### getByte

          public byte getByte(int columnIndex)
                       throws SQLException

      Specified by:
        `getByte` in interface `ResultSet`
      Overrides:
        `getByte` in class `VTITemplate`
      Throws:
        `SQLException`

    - #### getShort

          public short getShort(int columnIndex)
                         throws SQLException

      Specified by:
        `getShort` in interface `ResultSet`
      Overrides:
        `getShort` in class `VTITemplate`
      Throws:
        `SQLException`

    - #### getInt

          public int getInt(int columnIndex)
                     throws SQLException

      Specified by:
        `getInt` in interface `ResultSet`
      Overrides:
        `getInt` in class `VTITemplate`
      Throws:
        `SQLException`

    - #### getLong

          public long getLong(int columnIndex)
                       throws SQLException

      Specified by:
        `getLong` in interface `ResultSet`
      Overrides:
        `getLong` in class `VTITemplate`
      Throws:
        `SQLException`

    - #### getFloat

          public float getFloat(int columnIndex)
                         throws SQLException

      Specified by:
        `getFloat` in interface `ResultSet`
      Overrides:
        `getFloat` in class `VTITemplate`
      Throws:
        `SQLException`

    - #### getDouble

          public double getDouble(int columnIndex)
                           throws SQLException

      Specified by:
        `getDouble` in interface `ResultSet`
      Overrides:
        `getDouble` in class `VTITemplate`
      Throws:
        `SQLException`

    - #### getBigDecimal

          public BigDecimal getBigDecimal(int columnIndex)
                                   throws SQLException

      Specified by:
        `getBigDecimal` in interface `ResultSet`
      Overrides:
        `getBigDecimal` in class `VTITemplate`
      Throws:
        `SQLException`

    - #### getBytes

          public byte[] getBytes(int columnIndex)
                          throws SQLException

      Specified by:
        `getBytes` in interface `ResultSet`
      Overrides:
        `getBytes` in class `VTITemplate`
      Throws:
        `SQLException`

    - #### getDate

          public Date getDate(int columnIndex)
                       throws SQLException

      Specified by:
        `getDate` in interface `ResultSet`
      Overrides:
        `getDate` in class `VTITemplate`
      Throws:
        `SQLException`

    - #### getTime

          public Time getTime(int columnIndex)
                       throws SQLException

      Specified by:
        `getTime` in interface `ResultSet`
      Overrides:
        `getTime` in class `VTITemplate`
      Throws:
        `SQLException`

    - #### getTimestamp

          public Timestamp getTimestamp(int columnIndex)
                                 throws SQLException

      Specified by:
        `getTimestamp` in interface `ResultSet`
      Overrides:
        `getTimestamp` in class `VTITemplate`
      Throws:
        `SQLException`

    - #### getAsciiStream

          public InputStream getAsciiStream(int columnIndex)
                                     throws SQLException

      Specified by:
        `getAsciiStream` in interface `ResultSet`
      Overrides:
        `getAsciiStream` in class `VTITemplate`
      Throws:
        `SQLException`

    - #### getBinaryStream

          public InputStream getBinaryStream(int columnIndex)
                                      throws SQLException

      Specified by:
        `getBinaryStream` in interface `ResultSet`
      Overrides:
        `getBinaryStream` in class `VTITemplate`
      Throws:
        `SQLException`

    - #### getBlob

          public Blob getBlob(int columnIndex)
                       throws SQLException

      Specified by:
        `getBlob` in interface `ResultSet`
      Overrides:
        `getBlob` in class `VTITemplate`
      Throws:
        `SQLException`

    - #### getClob

          public Clob getClob(int columnIndex)
                       throws SQLException

      Specified by:
        `getClob` in interface `ResultSet`
      Overrides:
        `getClob` in class `VTITemplate`
      Throws:
        `SQLException`

Apache Derby 10.13 API Documentation - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.