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

public Class ForwardingVTI

extends VTITemplate
Class Inheritance
Known Direct Subclasses
org.apache.derby.vti.ForeignTableVTI
Imports
java.io.InputStream, .Reader, java.math.BigDecimal, java.sql.Blob, .Clob, .Connection, .Date, .DatabaseMetaData, .DriverManager, .PreparedStatement, .ResultSet, .ResultSetMetaData, .SQLException, .Time, .Timestamp, .Types, java.util.Calendar, .HashMap, .Map, org.apache.derby.shared.common.util.ArrayUtil, org.apache.derby.iapi.util.IdUtil

This class contains a table function which forwards its behavior to another ResultSet wrapped inside it.

Field Summary

Modifier and TypeField and Description
private ResultSet

Constructor Summary

AccessConstructor and Description
public
ForwardingVTI()

Construct from another ResultSet.

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

Overrides org.apache.derby.vti.VTITemplate.getAsciiStream.

Implements java.sql.ResultSet.getAsciiStream.

Retrieves the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters.

public BigDecimal
getBigDecimal(int
the first column is 1, the second is 2, ...
i
)

Overrides org.apache.derby.vti.VTITemplate.getBigDecimal.

Implements java.sql.ResultSet.getBigDecimal.

Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.

public BigDecimal
getBigDecimal(int
the first column is 1, the second is 2, ...
i
,
int
the number of digits to the right of the decimal point
scale
)

Overrides org.apache.derby.vti.VTITemplate.getBigDecimal.

Implements java.sql.ResultSet.getBigDecimal.

Deprecated

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

public InputStream
getBinaryStream(int
the first column is 1, the second is 2, ...
i
)

Overrides org.apache.derby.vti.VTITemplate.getBinaryStream.

Implements java.sql.ResultSet.getBinaryStream.

Retrieves the value of the designated column in the current row of this ResultSet object as a stream of uninterpreted bytes.

public Blob
getBlob(int
the first column is 1, the second is 2, ...
i
)

Overrides org.apache.derby.vti.VTITemplate.getBlob.

Implements java.sql.ResultSet.getBlob.

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

public boolean
getBoolean(int
the first column is 1, the second is 2, ...
i
)

Overrides org.apache.derby.vti.VTITemplate.getBoolean.

Implements java.sql.ResultSet.getBoolean.

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

public byte
getByte(int
the first column is 1, the second is 2, ...
i
)

Overrides org.apache.derby.vti.VTITemplate.getByte.

Implements java.sql.ResultSet.getByte.

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

public byte[]
getBytes(int
the first column is 1, the second is 2, ...
i
)

Overrides org.apache.derby.vti.VTITemplate.getBytes.

Implements java.sql.ResultSet.getBytes.

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

public Reader
getCharacterStream(int
the first column is 1, the second is 2, ...
i
)

Overrides org.apache.derby.vti.VTITemplate.getCharacterStream.

Implements java.sql.ResultSet.getCharacterStream.

Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.

public Clob
getClob(int
the first column is 1, the second is 2, ...
i
)

Overrides org.apache.derby.vti.VTITemplate.getClob.

Implements java.sql.ResultSet.getClob.

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

public Date
getDate(int
the first column is 1, the second is 2, ...
i
)

Overrides org.apache.derby.vti.VTITemplate.getDate.

Implements java.sql.ResultSet.getDate.

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

public Date
getDate(int
the first column is 1, the second is 2, ...
i
,
Calendar
the java.util.Calendar object to use in constructing the date
cal
)

Overrides org.apache.derby.vti.VTITemplate.getDate.

Implements java.sql.ResultSet.getDate.

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

public double
getDouble(int
the first column is 1, the second is 2, ...
i
)

Overrides org.apache.derby.vti.VTITemplate.getDouble.

Implements java.sql.ResultSet.getDouble.

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

public float
getFloat(int
the first column is 1, the second is 2, ...
i
)

Overrides org.apache.derby.vti.VTITemplate.getFloat.

Implements java.sql.ResultSet.getFloat.

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

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

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

Overrides org.apache.derby.vti.VTITemplate.getLong.

Implements java.sql.ResultSet.getLong.

Retrieves the value of the designated column in the current row of this ResultSet object as a long 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 Object
getObject(int
the first column is 1, the second is 2, ...
i
)

Overrides org.apache.derby.vti.VTITemplate.getObject.

Implements java.sql.ResultSet.getObject.

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

public short
getShort(int
the first column is 1, the second is 2, ...
i
)

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, ...
i
)

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

Overrides org.apache.derby.vti.VTITemplate.getTime.

Implements java.sql.ResultSet.getTime.

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

public Time
getTime(int
the first column is 1, the second is 2, ...
i
,
Calendar
the java.util.Calendar object to use in constructing the time
cal
)

Overrides org.apache.derby.vti.VTITemplate.getTime.

Implements java.sql.ResultSet.getTime.

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

public Timestamp
getTimestamp(int
the first column is 1, the second is 2, ...
i
)

Overrides org.apache.derby.vti.VTITemplate.getTimestamp.

Implements java.sql.ResultSet.getTimestamp.

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

public Timestamp
getTimestamp(int
the first column is 1, the second is 2, ...
i
,
Calendar
the java.util.Calendar object to use in constructing the timestamp
cal
)

Overrides org.apache.derby.vti.VTITemplate.getTimestamp.

Implements java.sql.ResultSet.getTimestamp.

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

public final ResultSet

Returns:

the wrapped ResultSet
getWrappedResultSet
()

Get the wrapped ResultSet.

public boolean
isClosed()

Overrides org.apache.derby.vti.VTITemplate.isClosed.

Implements java.sql.ResultSet.isClosed.

Retrieves whether this ResultSet object has been closed.

protected int

Returns:

the corresponding number of the column in the wrapped ResultSet
mapColumnNumber
(int
Number of column in this VTI
ourColumnNumber
)

This overridable method maps the ForwardVTI's column numbers to those of the wrapped ResultSet

public boolean
next()

Implements java.sql.ResultSet.next.

Moves the cursor forward one row from its current position.

public boolean
wasNull()

Overrides org.apache.derby.vti.VTITemplate.wasNull.

Implements java.sql.ResultSet.wasNull.

Reports whether the last column read had a value of SQL NULL.

public final void
wrapResultSet(ResultSet
ResultSet to which to forward method calls
wrappedResultSet
)

Poke in another ResultSet to which we forward method calls.

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

Field Detail

_wrappedResultSetback to summary
private ResultSet _wrappedResultSet

Constructor Detail

ForwardingVTIback to summary
public ForwardingVTI()

Construct from another ResultSet.

Method Detail

closeback to summary
public void close() throws SQLException

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.

Exceptions
SQLException:
if a database access error occurs
getAsciiStreamback to summary
public InputStream getAsciiStream(int i) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getAsciiStream.

Implements java.sql.ResultSet.getAsciiStream.

Doc from java.sql.ResultSet.getAsciiStream.

Retrieves the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into ASCII.

Note

All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getter method implicitly closes the stream. Also, a stream may return 0 when the method InputStream.available is called whether there is data available or not.

Parameters
i:int

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

Returns:InputStream

a Java input stream that delivers the database column value as a stream of one-byte ASCII characters; 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
getBigDecimalback to summary
public BigDecimal getBigDecimal(int i) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getBigDecimal.

Implements java.sql.ResultSet.getBigDecimal.

Doc from java.sql.ResultSet.getBigDecimal.

Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.

Parameters
i:int

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

Returns:BigDecimal

the column value (full precision); if the value is SQL NULL, the value returned is null in the Java programming language.

Exceptions
SQLException:
if the columnIndex is not valid; if a database access error occurs or this method is called on a closed result set
getBigDecimalback to summary
public BigDecimal getBigDecimal(int i, int scale) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getBigDecimal.

Implements java.sql.ResultSet.getBigDecimal.

Doc from java.sql.ResultSet.getBigDecimal.

Deprecated

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

Parameters
i:int

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

scale:int

the number of digits to the right of the decimal point

Returns:BigDecimal

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

Annotations
@Deprecated
Exceptions
SQLException:
if the columnIndex is not valid; if a database access error occurs or this method is called on a closed result set
getBinaryStreamback to summary
public InputStream getBinaryStream(int i) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getBinaryStream.

Implements java.sql.ResultSet.getBinaryStream.

Doc from java.sql.ResultSet.getBinaryStream.

Retrieves the value of the designated column in the current row of this ResultSet object as a stream of uninterpreted bytes. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARBINARY values.

Note

All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getter method implicitly closes the stream. Also, a stream may return 0 when the method InputStream.available is called whether there is data available or not.

Parameters
i:int

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

Returns:InputStream

a Java input stream that delivers the database column value as a stream of uninterpreted bytes; 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
getBlobback to summary
public Blob getBlob(int i) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getBlob.

Implements java.sql.ResultSet.getBlob.

Doc from java.sql.ResultSet.getBlob.

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

Parameters
i:int

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

Returns:Blob

a Blob object representing the SQL BLOB value in the specified column

Exceptions
SQLException:
if the columnIndex is not valid; if a database access error occurs or this method is called on a closed result set
getBooleanback to summary
public boolean getBoolean(int i) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getBoolean.

Implements java.sql.ResultSet.getBoolean.

Doc from java.sql.ResultSet.getBoolean.

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

If the designated column has a datatype of CHAR or VARCHAR and contains a "0" or has a datatype of BIT, TINYINT, SMALLINT, INTEGER or BIGINT and contains a 0, a value of false is returned. If the designated column has a datatype of CHAR or VARCHAR and contains a "1" or has a datatype of BIT, TINYINT, SMALLINT, INTEGER or BIGINT and contains a 1, a value of true is returned.

Parameters
i:int

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

Returns:boolean

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

Exceptions
SQLException:
if the columnIndex is not valid; if a database access error occurs or this method is called on a closed result set
getByteback to summary
public byte getByte(int i) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getByte.

Implements java.sql.ResultSet.getByte.

Doc from java.sql.ResultSet.getByte.

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

Parameters
i:int

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

Returns:byte

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
getBytesback to summary
public byte[] getBytes(int i) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getBytes.

Implements java.sql.ResultSet.getBytes.

Doc from java.sql.ResultSet.getBytes.

Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language. The bytes represent the raw values returned by the driver.

Parameters
i:int

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

Returns:byte[]

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
getCharacterStreamback to summary
public Reader getCharacterStream(int i) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getCharacterStream.

Implements java.sql.ResultSet.getCharacterStream.

Doc from java.sql.ResultSet.getCharacterStream.

Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.

Parameters
i:int

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

Returns:Reader

a java.io.Reader object that contains the column value; if the value is SQL NULL, the value returned is null in the Java programming language.

Exceptions
SQLException:
if the columnIndex is not valid; if a database access error occurs or this method is called on a closed result set
getClobback to summary
public Clob getClob(int i) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getClob.

Implements java.sql.ResultSet.getClob.

Doc from java.sql.ResultSet.getClob.

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

Parameters
i:int

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

Returns:Clob

a Clob object representing the SQL CLOB value in the specified column

Exceptions
SQLException:
if the columnIndex is not valid; if a database access error occurs or this method is called on a closed result set
getDateback to summary
public Date getDate(int i) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getDate.

Implements java.sql.ResultSet.getDate.

Doc from java.sql.ResultSet.getDate.

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

Parameters
i:int

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

Returns:Date

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
getDateback to summary
public Date getDate(int i, Calendar cal) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getDate.

Implements java.sql.ResultSet.getDate.

Doc from java.sql.ResultSet.getDate.

Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the date if the underlying database does not store timezone information.

Parameters
i:int

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

cal:Calendar

the java.util.Calendar object to use in constructing the date

Returns:Date

the column value as a java.sql.Date object; if the value is SQL NULL, the value returned is null in the Java programming language

Exceptions
SQLException:
if the columnIndex is not valid; if a database access error occurs or this method is called on a closed result set
getDoubleback to summary
public double getDouble(int i) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getDouble.

Implements java.sql.ResultSet.getDouble.

Doc from java.sql.ResultSet.getDouble.

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

Parameters
i:int

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

Returns:double

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
getFloatback to summary
public float getFloat(int i) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getFloat.

Implements java.sql.ResultSet.getFloat.

Doc from java.sql.ResultSet.getFloat.

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

Parameters
i:int

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

Returns:float

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
getIntback to summary
public int getInt(int i) 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
i: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
getLongback to summary
public long getLong(int i) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getLong.

Implements java.sql.ResultSet.getLong.

Doc from java.sql.ResultSet.getLong.

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

Parameters
i:int

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

Returns:long

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() throws SQLException

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

Exceptions
SQLException:
if a database access error occurs or this method is called on a closed result set
getObjectback to summary
public Object getObject(int i) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getObject.

Implements java.sql.ResultSet.getObject.

Doc from java.sql.ResultSet.getObject.

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

This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the column's SQL type, following the mapping for built-in types specified in the JDBC specification. If the value is an SQL NULL, the driver returns a Java null.

This method may also be used to read database-specific abstract data types. In the JDBC 2.0 API, the behavior of method getObject is extended to materialize data of SQL user-defined types.

If Connection.getTypeMap does not throw a SQLFeatureNotSupportedException, then when a column contains a structured or distinct value, the behavior of this method is as if it were a call to: getObject(columnIndex, this.getStatement().getConnection().getTypeMap()). If Connection.getTypeMap does throw a SQLFeatureNotSupportedException, then structured values are not supported, and distinct values are mapped to the default Java class as determined by the underlying SQL type of the DISTINCT type.

Parameters
i:int

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

Returns:Object

a java.lang.Object holding the column value

Exceptions
SQLException:
if the columnIndex is not valid; if a database access error occurs or this method is called on a closed result set
getShortback to summary
public short getShort(int i) 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
i: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 i) 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
i: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
getTimeback to summary
public Time getTime(int i) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getTime.

Implements java.sql.ResultSet.getTime.

Doc from java.sql.ResultSet.getTime.

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

Parameters
i:int

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

Returns:Time

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
getTimeback to summary
public Time getTime(int i, Calendar cal) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getTime.

Implements java.sql.ResultSet.getTime.

Doc from java.sql.ResultSet.getTime.

Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the time if the underlying database does not store timezone information.

Parameters
i:int

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

cal:Calendar

the java.util.Calendar object to use in constructing the time

Returns:Time

the column value as a java.sql.Time object; if the value is SQL NULL, the value returned is null in the Java programming language

Exceptions
SQLException:
if the columnIndex is not valid; if a database access error occurs or this method is called on a closed result set
getTimestampback to summary
public Timestamp getTimestamp(int i) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getTimestamp.

Implements java.sql.ResultSet.getTimestamp.

Doc from java.sql.ResultSet.getTimestamp.

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

Parameters
i:int

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

Returns:Timestamp

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
getTimestampback to summary
public Timestamp getTimestamp(int i, Calendar cal) throws SQLException

Overrides org.apache.derby.vti.VTITemplate.getTimestamp.

Implements java.sql.ResultSet.getTimestamp.

Doc from java.sql.ResultSet.getTimestamp.

Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the timestamp if the underlying database does not store timezone information.

Parameters
i:int

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

cal:Calendar

the java.util.Calendar object to use in constructing the timestamp

Returns:Timestamp

the column value as a java.sql.Timestamp object; if the value is SQL NULL, the value returned is null in the Java programming language

Exceptions
SQLException:
if the columnIndex is not valid; if a database access error occurs or this method is called on a closed result set
getWrappedResultSetback to summary
public final ResultSet getWrappedResultSet()

Get the wrapped ResultSet.

Returns:ResultSet

the wrapped ResultSet

isClosedback to summary
public boolean isClosed() throws SQLException

Overrides org.apache.derby.vti.VTITemplate.isClosed.

Implements java.sql.ResultSet.isClosed.

Doc from java.sql.ResultSet.isClosed.

Retrieves whether this ResultSet object has been closed. A ResultSet is closed if the method close has been called on it, or if it is automatically closed.

Returns:boolean

true if this ResultSet object is closed; false if it is still open

Exceptions
SQLException:
if a database access error occurs
mapColumnNumberback to summary
protected int mapColumnNumber(int ourColumnNumber)

This overridable method maps the ForwardVTI's column numbers to those of the wrapped ResultSet

Parameters
ourColumnNumber:int

Number of column in this VTI

Returns:int

the corresponding number of the column in the wrapped ResultSet

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
wasNullback to summary
public boolean wasNull() throws SQLException

Overrides org.apache.derby.vti.VTITemplate.wasNull.

Implements java.sql.ResultSet.wasNull.

Doc from java.sql.ResultSet.wasNull.

Reports whether the last column read had a value of SQL NULL. Note that you must first call one of the getter methods on a column to try to read its value and then call the method wasNull to see if the value read was SQL NULL.

Returns:boolean

true if the last column value read was SQL NULL and false otherwise

Exceptions
SQLException:
if a database access error occurs or this method is called on a closed result set
wrapResultSetback to summary
public final void wrapResultSet(ResultSet wrappedResultSet)

Poke in another ResultSet to which we forward method calls.

Parameters
wrappedResultSet:ResultSet

ResultSet to which to forward method calls