Skip Headers

Oracle9i Lite Developer's Guide for Java
Release 5.0.1
Part No. A95261-01
Go To Table Of Contents
Contents
Go To Index
Index

Previous Next

C
New JDBC 2.0 Features

This appendix discusses the new JDBC 2.0 features.

C.1 Interface Connection

C.1.1 Methods


Statement

createStatement(int resultSetType, int resultSetConcurrency)

Creates a Statement object that will generate ResultSet objects with the given type and concurrency.


Map

getTypeMap()

Gets the type map object associated with this connection.


CallableStatement

prepareCall(String sql, int resultSetType, int resultSetConcurrency)

Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.


PreparedStatement

prepareStatement(String sql, int resultSetType, int resultSetConcurrency)

Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency.


void

setTypeMap(Map map)

Installs the given type map as the type map for this connection.

C.2 Interface Statement


Connection

getConnection()

Returns the Connection object that produced this Statement object.


int

getFetchDirection()

Retrieves the direction for fetching rows from database tables that is the default for result sets generated from this Statement object. Only FETCH_FORWARD is supported for now.


int

getFetchSize()

Retrieves the number of result set rows that is the default fetch size for result sets generated from this Statement object. Only fetch size = 1 is supported for now.


int

getResultSetConcurrency()

Retrieves the result set concurrency. Only CONCUR_READ_ONLY is supported for now.


int

getResultSetType()

Determine the result set type. Only TYPE_FORWARD_ONLY and TYPE_SCROLL_INSENSITIVE are supported for now.


void

setFetchDirection(int direction)

Gives the driver a hint as to the direction in which the rows in a result set will be processed.


void

setFetchSize(int rows)

Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed.

C.3 Interface ResultSet

C.3.1 Fields


static int

CONCUR_READ_ONLY

The concurrency mode for a ResultSet object that may NOT be updated.


static int

CONCUR_UPDATABLE

The concurrency mode for a ResultSet object that may be updated. Not supported for now.


static int

FETCH_FORWARD

The rows in a result set will be processed in a forward direction; first-to-last.


static int

FETCH_REVERSE

The rows in a result set will be processed in a reverse direction; last-to-first. Not supported for now.


static int

FETCH_UNKNOWN

The order in which rows in a result set will be processed is unknown.


static int

TYPE_FORWARD_ONLY

The type for a ResultSet object whose cursor may move only forward.


static int

TYPE_SCROLL_INSENSITIVE

The type for a ResultSet object that is scrollable but generally not sensitive to changes made by others.


static int

TYPE_SCROLL_SENSITIVE

The type for a ResultSet object that is scrollable and generally sensitive to changes made by others. Not supported for now.

C.3.2 Methods


boolean

absolute(int row)

Moves the cursor to the given row number in the result set.


void

afterLast()

Moves the cursor to the end of the result set, just after the last row.


void

beforeFirst()

Moves the cursor to the front of the result set, just before the first row.


boolean

first()

Moves the cursor to the first row in the result set.


Array

getArray(String colName)

Gets an SQL ARRAY value in the current row of this ResultSet object.


BigDecimal

getBigDecimal(int columnIndex)

Gets the value of a column in the current row as a java.math.BigDecimal object with full precision.


BigDecimal

getBigDecimal(String columnName)

Gets the value of a column in the current row as a java.math.BigDecimal object with full precision.


int

getConcurrency()

Returns the concurrency mode of this result set.


Date

getDate(int columnIndex, Calendar cal)

Gets the value of a column in the current row as a java.sql.Date object.


int

getFetchDirection()

Returns the fetch direction for this result set.


int

getFetchSize()

Returns the fetch size for this result set.


int

getRow()

Retrieves the current row number.


Statement

getStatement()

Returns the Statement that produced this ResultSet object.


int

getType()

Returns the type of this result set.


boolean

isAfterLast()


boolean

isBeforeFirst()


boolean

isFirst()


boolean

isLast()


boolean

last()

Moves the cursor to the last row in the result set.


boolean

previous()

Moves the cursor to the previous row in the result set.


void

refreshRow()

Refreshes the current row with its most recent value in the database. Currently does nothing.


boolean

relative(int rows)

Moves the cursor a relative number of rows, either positive or negative.

C.3.2.1 Methods that False

The following three methods always return false because this release does not support deletes, inserts, or updates.


boolean

rowDeleted()

Indicates whether a row has been deleted.


boolean

rowInserted()

Indicates whether the current row has had an insertion.


boolean

rowUpdated()

Indicates whether the current row has been updated.


void

setFetchDirection(int direction)

Gives a hint as to the direction in which the rows in this result set will be processed.


void

setFetchSize(int rows)

Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for this result set.

C.4 Interface DatabaseMetaData

C.4.1 Methods


Connection

getConnection()

Retrieves the connection that produced this metadata object.


boolean

supportsResultSetConcurrency(int type, int concurrency)

Supports the concurrency type in combination with the given result set type.


boolean

supportsResultSetType(int type)

Supports the given result set type.

C.4.1.1 Methods that Return False

The following methods return false, because this release does not support deletes or updates.


boolean

deletesAreDetected(int type)

Indicates whether or not a visible row delete can be detected by calling ResultSet.rowDeleted().


boolean

insertsAreDetected(int type)

Indicates whether or not a visible row insert can be detected by calling ResultSet.rowInserted().


boolean

othersDeletesAreVisible(int type)

Indicates whether deletes made by others are visible.


boolean

othersInsertsAreVisible(int type)

Indicates whether inserts made by others are visible.


boolean

othersUpdatesAreVisible(int type)

Indicates whether updates made by others are visible.


boolean

ownDeletesAreVisible(int type)

Indicates whether a result set's own deletes are visible.


boolean

ownInsertsAreVisible(int type)

Indicates whether a result set's own inserts are visible.


boolean

ownUpdatesAreVisible(int type)

Indicates whether a result set's own updates are visible.


boolean

updatesAreDetected(int type)

Indicates whether or not a visible row update can be detected by calling the method ResultSet.rowUpdated.

C.5 Interface ResultSetMetaData

C.5.1 Methods:


String

getColumnClassName(int column)

Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column.

C.6 Interface PreparedStatement

C.6.1 Methods


Result

SetMetaDatagetMetaData()

Gets the number, types and properties of a ResultSet's columns.


void

setDate(int parameterIndex, Date x, Calendar cal)

Sets the designated parameter to a java.sql.Date value, using the given Calendar object.


void

setTime(int parameterIndex, Time x, Calendar cal)

Sets the designated parameter to a java.sql.Time value, using the given Calendar object.


void

setTimestamp(int parameterIndex, Timestamp x, Calendar cal)

Sets the designated parameter to a java.sql.Timestamp value, using the given Calendar object.


Previous Next
Oracle Logo
Copyright © 2002 Oracle Corporation

All rights reserved
Go To Table Of Contents
Contents
Go To Index
Index