|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client 11g Release 1 (11.1.1) E17503-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResultSet
An interface to an Object which represents a Table of Data, typically returned as the result of a Query to a Database.
ResultSets
have a Cursor which points to a current row of data. When a ResultSet is created, the Cursor
is positioned before the first row. To move the Cursor to the next row in the table, use the next
method. The next method returns true until there are no more rows in the ResultSet, when it returns false.
The default type of ResultSet cannot be updated and its cursor can only move forward through the rows of data. This
means that it is only possible to read through it once. However, it is possible to create types of ResultSet that can
be updated and also types where the cursor can be scrolled forward and backward through the rows of data. This is
shown in the following code example:
Connection con;
Statement aStatement = con.createStatement( ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE );
ResultSet theResultSet = theStatement.executeQuery("SELECT price, quantity FROM STOCKTABLE");
// theResultSet will be both scrollable and updateable
The ResultSet interface provides a series of methods for retrieving data from columns in the current row, such as getDate, getFloat. The columns are identified either by their index number (starting at 1) or by their name - there are separate methods for both techniques of column addressing. The column names are case insensitive. If several columns have the same name, then the getter methods use the first matching column. This means that if column names are used, it is not possible to guarantee that the name will retrieve data from the intended column - for certainty it is better to use column indexes. Ideally the columns should be read left-to-right and read once only, since not all * databases are optimized to handle other techniques of reading the data.
When reading data, the JDBC driver maps the SQL data retrieved from the database to the Java type implied by the method invoked by the application. The JDBC specification has a table of allowable mappings from SQL types to Java types.
There are also methods for writing data into the ResultSet, such as updateInt, updateString. The update methods can be used either to modify the data of an existing row or to insert new data rows into the ResultSet. Modification of existing data involves moving the Cursor to the row which needs modification and then using the update methods to modify the data, followed by calling the ResultSet.updateRow method. For insertion of new rows, the cursor is first moved to a special row called the Insert Row, data is added using the update methods, followed by calling the ResultSet.insertRow method.
A ResultSet is closed if the Statement object which generated it closed, executed again or is used to retrieve the next result from a sequence of results.
Field Summary | |
---|---|
static java.lang.Class |
CLASS_INSTANCE
|
static int |
CLOSE_CURSORS_AT_COMMIT
A constant used to indicate that a ResultSet object must be closed when the method Connection.commit is invoked. |
static int |
CONCUR_READ_ONLY
A constant used to indicate the Concurrency Mode for a ResultSet object that cannot be updated. |
static int |
CONCUR_UPDATABLE
A constant used to indicate the Concurrency Mode for a ResultSet object that can be updated. |
static int |
FETCH_FORWARD
A constant used to indicate processing of the rows of a ResultSet in the forward direction, first to last |
static int |
FETCH_REVERSE
A constant used to indicate processing of the rows of a ResultSet in the reverse direction, last to first |
static int |
FETCH_UNKNOWN
A constant used to indicate that the order of processing of the rows of a ResultSet is unknown. |
static int |
HOLD_CURSORS_OVER_COMMIT
A constant used to indicate that a ResultSet object must not be closed when the method Connection.commit is invoked. |
static int |
TYPE_FORWARD_ONLY
A constant used to indicate a ResultSet object whose Cursor can only move forward |
static int |
TYPE_SCROLL_INSENSITIVE
A constant used to indicate a ResultSet object which is Scrollable but which is not sensitive to changes made by others |
static int |
TYPE_SCROLL_SENSITIVE
A constant used to indicate a ResultSet object which is Scrollable but which is sensitive to changes made by others |
Method Summary | |
---|---|
boolean |
absolute(int row)
Moves the Cursor to a specified row number in the ResultSet. |
void |
afterLast()
Moves the Cursor to the end of the ResultSet, after the last row. |
void |
beforeFirst()
Moves the Cursor to the start of the ResultSet, before the first row. |
void |
cancelRowUpdates()
Cancels any updates made to the current row in the ResultSet. |
void |
clearWarnings()
Clears all the warnings related to this ResultSet. |
void |
close()
Releases this ResultSet's database and JDBC resources. |
void |
deleteRow()
Deletes the current row from the ResultSet and from the underlying database. |
int |
findColumn(java.lang.String columnName)
Gets the index number for a column in the ResultSet from the provided Column Name. |
boolean |
first()
Shifts the cursor position to the first row in the ResultSet. |
Array |
getArray(int columnIndex)
Gets the content of a column specified as a column index in the current row of this ResultSet as a java.sql.Array. |
Array |
getArray(java.lang.String colName)
Gets the value of a column specified as a column name as a java.sql.Array. |
java.io.InputStream |
getAsciiStream(int columnIndex)
Gets the value of a column specified as a column index as an ASCII character stream. |
java.io.InputStream |
getAsciiStream(java.lang.String columnName)
Gets the value of a column specified as a column name as an ASCII character stream. |
java.io.InputStream |
getBinaryStream(int columnIndex)
Gets the value of a column specified as a column index as a binary stream. |
java.io.InputStream |
getBinaryStream(java.lang.String columnName)
Gets the value of a column specified as a column name as a binary stream. |
Blob |
getBlob(int columnIndex)
Gets the value of a column specified as a column index as a java.sql.Blob object. |
Blob |
getBlob(java.lang.String columnName)
Gets the value of a column specified as a column name, as a java.sql.Blob object. |
boolean |
getBoolean(int columnIndex)
Gets the value of a column specified as a column index as a boolean. |
boolean |
getBoolean(java.lang.String columnName)
Gets the value of a column specified as a column name, as a boolean. |
byte |
getByte(int columnIndex)
Gets the value of a column specified as a column index as a byte. |
byte |
getByte(java.lang.String columnName)
Gets the value of a column specified as a column name as a byte. |
byte[] |
getBytes(int columnIndex)
Gets the value of a column specified as a column index as a byte array. |
byte[] |
getBytes(java.lang.String columnName)
Gets the value of a column specified as a column name as a byte array. |
java.io.Reader |
getCharacterStream(int columnIndex)
Gets the value of a column specified as a column index as a java.io.Reader object. |
java.io.Reader |
getCharacterStream(java.lang.String columnName)
Gets the value of a column specified as a column name as a java.io.Reader object. |
Clob |
getClob(int columnIndex)
Gets the value of a column specified as a column index as a java.sql.Clob. |
Clob |
getClob(java.lang.String colName)
Gets the value of a column specified as a column name as a java.sql.Clob. |
int |
getConcurrency()
Gets the concurrency mode of this ResultSet. |
java.lang.String |
getCursorName()
Gets the name of the SQL cursor of this ResultSet. |
Date |
getDate(int columnIndex)
Gets the value of a column specified as a column index as a java.sql.Date. |
Date |
getDate(int columnIndex,
java.util.Calendar cal)
Gets the value of a column specified as a column index as a java.sql.Date. |
Date |
getDate(java.lang.String columnName)
Gets the value of a column specified as a column name as a java.sql.Date. |
Date |
getDate(java.lang.String columnName,
java.util.Calendar cal)
Gets the value of a column specified as a column name, as a java.sql.Date object. |
double |
getDouble(int columnIndex)
Gets the value of a column specified as a column index as a double value. |
double |
getDouble(java.lang.String columnName)
Gets the value of a column specified as a column name as a double value. |
int |
getFetchDirection()
Gets the direction in which rows are fetched for this ResultSet object. |
int |
getFetchSize()
Gets the fetch size (in number of rows) for this ResultSet |
float |
getFloat(int columnIndex)
Gets the value of a column specified as a column index as a float value. |
float |
getFloat(java.lang.String columnName)
Gets the value of a column specified as a column name as a float value. |
int |
getInt(int columnIndex)
Gets the value of a column specified as a column index as an int value. |
int |
getInt(java.lang.String columnName)
Gets the value of a column specified as a column name, as an int value. |
long |
getLong(int columnIndex)
Gets the value of a column specified as a column index as a long value. |
long |
getLong(java.lang.String columnName)
Gets the value of a column specified as a column name, as a long value. |
ResultSetMetaData |
getMetaData()
Gets the Metadata for this ResultSet. |
java.lang.Object |
getObject(int columnIndex)
Gets the value of a specified column as a Java Object. |
java.lang.Object |
getObject(java.lang.String columnName)
Gets the value of a specified column as a Java Object. |
Ref |
getRef(int columnIndex)
Gets the value of a column specified as a column index as a Java java.sql.Ref. |
Ref |
getRef(java.lang.String colName)
Gets the value of a column specified as a column name as a Java java.sql.Ref. |
int |
getRow()
Gets the number of the current row in the ResultSet. |
short |
getShort(int columnIndex)
Gets the value of a column specified as a column index as a short value. |
short |
getShort(java.lang.String columnName)
Gets the value of a column specified as a column name, as a short value. |
Statement |
getStatement()
Gets the Statement that produced this ResultSet. |
java.lang.String |
getString(int columnIndex)
Gets the value of a column specified as a column index as a String. |
java.lang.String |
getString(java.lang.String columnName)
Gets the value of a column specified as a column name, as a String. |
Time |
getTime(int columnIndex)
Gets the value of a column specified as a column index as a java.sql.Time value. |
Time |
getTime(int columnIndex,
java.util.Calendar cal)
Gets the value of a column specified as a column index as a java.sql.Time value. |
Time |
getTime(java.lang.String columnName)
Gets the value of a column specified as a column name, as a java.sql.Time value. |
Time |
getTime(java.lang.String columnName,
java.util.Calendar cal)
Gets the value of a column specified as a column index, as a java.sql.Time value. |
Timestamp |
getTimestamp(int columnIndex)
Gets the value of a column specified as a column index as a java.sql.Timestamp value. |
Timestamp |
getTimestamp(int columnIndex,
java.util.Calendar cal)
Gets the value of a column specified as a column index, as a java.sql.Timestamp value. |
Timestamp |
getTimestamp(java.lang.String columnName)
Gets the value of a column specified as a column name, as a java.sql.Timestamp value. |
Timestamp |
getTimestamp(java.lang.String columnName,
java.util.Calendar cal)
Gets the value of a column specified as a column name, as a java.sql.Timestamp value. |
int |
getType()
Gets the type of the ResultSet. |
java.io.InputStream |
getUnicodeStream(int columnIndex)
Deprecated. Use getCharacterStream. Gets the value of the column as an InputStream of Unicode characters. |
java.io.InputStream |
getUnicodeStream(java.lang.String columnName)
Deprecated. Use getCharacterStream Gets the value of the column as an InputStream of Unicode characters. |
SQLWarning |
getWarnings()
Gets the first warning generated by calls on this ResultSet. |
void |
insertRow()
Insert the insert row into the ResultSet and into the underlying database. |
boolean |
isAfterLast()
Gets if the cursor is after the last row of the ResultSet. |
boolean |
isBeforeFirst()
Gets if the cursor is before the first row of the ResultSet. |
boolean |
isFirst()
Gets if the cursor is on the first row of the ResultSet. |
boolean |
isLast()
Gets if the cursor is on the last row of the ResultSet |
boolean |
last()
Shifts the cursor position to the last row of the ResultSet. |
void |
moveToCurrentRow()
Moves the cursor to the remembered position, usually the current row. |
void |
moveToInsertRow()
Moves the cursor position to the Insert row. |
boolean |
next()
Shifts the cursor position down one row in this ResultSet object. |
boolean |
previous()
Relocates the cursor position to the preceding row in this ResultSet. |
void |
refreshRow()
Refreshes the current row with its most up to date value in the database. |
boolean |
relative(int rows)
Moves the cursor position up or down by a specified number of rows. |
boolean |
rowDeleted()
Indicates whether a row has been deleted. |
boolean |
rowInserted()
Indicates whether the current row has had an insertion operation. |
boolean |
rowUpdated()
Indicates whether the current row has been updated. |
void |
setFetchDirection(int direction)
Indicates which direction (forward/reverse) will be used to process the rows of this ResultSet object. |
void |
setFetchSize(int rows)
Indicates the amount of rows to fetch from the database when extra rows are required for this ResultSet. |
void |
updateArray(int columnIndex,
Array x)
Updates a column specified by a column index with a java.sql.Array value. |
void |
updateArray(java.lang.String columnName,
Array x)
Updates a column specified by a column name with a java.sql.Array value. |
void |
updateAsciiStream(int columnIndex,
java.io.InputStream x,
int length)
Updates a column specified by a column index with an ASCII stream value. |
void |
updateAsciiStream(java.lang.String columnName,
java.io.InputStream x,
int length)
Updates a column specified by a column name with an Ascii stream value. |
void |
updateBinaryStream(int columnIndex,
java.io.InputStream x,
int length)
Updates a column specified by a column index with a binary stream value. |
void |
updateBinaryStream(java.lang.String columnName,
java.io.InputStream x,
int length)
Updates a column specified by a column name with a binary stream value. |
void |
updateBlob(int columnIndex,
Blob x)
Updates a column specified by a column index with a java.sql.Blob value. |
void |
updateBlob(java.lang.String columnName,
Blob x)
Updates a column specified by a column name with a java.sql.Blob value. |
void |
updateBoolean(int columnIndex,
boolean x)
Updates a column specified by a column index with a boolean value. |
void |
updateBoolean(java.lang.String columnName,
boolean x)
Updates a column specified by a column name with a boolean value. |
void |
updateByte(int columnIndex,
byte x)
Updates a column specified by a column index with a byte value. |
void |
updateByte(java.lang.String columnName,
byte x)
Updates a column specified by a column name with a byte value. |
void |
updateBytes(int columnIndex,
byte[] x)
Updates a column specified by a column index with a byte array value. |
void |
updateBytes(java.lang.String columnName,
byte[] x)
Updates a column specified by a column name with a byte array value. |
void |
updateCharacterStream(int columnIndex,
java.io.Reader x,
int length)
Updates a column specified by a column index with a character stream value. |
void |
updateCharacterStream(java.lang.String columnName,
java.io.Reader reader,
int length)
Updates a column specified by a column name with a character stream value. |
void |
updateClob(int columnIndex,
Clob x)
Updates a column specified by a column index with a java.sql.Clob value. |
void |
updateClob(java.lang.String columnName,
Clob x)
Updates a column specified by a column name with a java.sql.Clob value. |
void |
updateDate(int columnIndex,
Date x)
Updates a column specified by a column index with a java.sql.Date value. |
void |
updateDate(java.lang.String columnName,
Date x)
Updates a column specified by a column name with a java.sql.Date value. |
void |
updateDouble(int columnIndex,
double x)
Updates a column specified by a column index with a double value. |
void |
updateDouble(java.lang.String columnName,
double x)
Updates a column specified by a column name with a double value. |
void |
updateFloat(int columnIndex,
float x)
Updates a column specified by a column index with a float value. |
void |
updateFloat(java.lang.String columnName,
float x)
Updates a column specified by a column name with a float value. |
void |
updateInt(int columnIndex,
int x)
Updates a column specified by a column index with an int value. |
void |
updateInt(java.lang.String columnName,
int x)
Updates a column specified by a column name with an int value. |
void |
updateLong(int columnIndex,
long x)
Updates a column specified by a column index with a long value. |
void |
updateLong(java.lang.String columnName,
long x)
Updates a column specified by a column name with a long value. |
void |
updateNull(int columnIndex)
Updates a column specified by a column index with a null value. |
void |
updateNull(java.lang.String columnName)
Updates a column specified by a column name with a null value. |
void |
updateObject(int columnIndex,
java.lang.Object x)
Updates a column specified by a column index with an Object value. |
void |
updateObject(int columnIndex,
java.lang.Object x,
int scale)
Updates a column specified by a column index with an Object value. |
void |
updateObject(java.lang.String columnName,
java.lang.Object x)
Updates a column specified by a column name with an Object value. |
void |
updateObject(java.lang.String columnName,
java.lang.Object x,
int scale)
Updates a column specified by a column name with an Object value. |
void |
updateRef(int columnIndex,
Ref x)
Updates a column specified by a column index with a java.sql.Ref value. |
void |
updateRef(java.lang.String columnName,
Ref x)
Updates a column specified by a column name with a java.sql.Ref value. |
void |
updateRow()
Updates the database with the new contents of the current row of this ResultSet object. |
void |
updateShort(int columnIndex,
short x)
Updates a column specified by a column index with a short value. |
void |
updateShort(java.lang.String columnName,
short x)
Updates a column specified by a column name with a short value. |
void |
updateString(int columnIndex,
java.lang.String x)
Updates a column specified by a column index with a String value. |
void |
updateString(java.lang.String columnName,
java.lang.String x)
Updates a column specified by a column name with a String value. |
void |
updateTime(int columnIndex,
Time x)
Updates a column specified by a column index with a Time value. |
void |
updateTime(java.lang.String columnName,
Time x)
Updates a column specified by a column name with a Time value. |
void |
updateTimestamp(int columnIndex,
Timestamp x)
Updates a column specified by a column index with a Timestamp value. |
void |
updateTimestamp(java.lang.String columnName,
Timestamp x)
Updates a column specified by column name with a Timestamp value. |
boolean |
wasNull()
Determines if the last column read from this ResultSet contained SQL NULL. |
Field Detail |
---|
static final java.lang.Class CLASS_INSTANCE
static final int CLOSE_CURSORS_AT_COMMIT
static final int HOLD_CURSORS_OVER_COMMIT
static final int CONCUR_READ_ONLY
static final int CONCUR_UPDATABLE
static final int FETCH_FORWARD
static final int FETCH_REVERSE
static final int FETCH_UNKNOWN
static final int TYPE_FORWARD_ONLY
static final int TYPE_SCROLL_INSENSITIVE
static final int TYPE_SCROLL_SENSITIVE
Method Detail |
---|
boolean absolute(int row) throws SQLException
row
- The new row number for the Cursor
SQLException
- if a database error happensvoid afterLast() throws SQLException
SQLException
- if a database error happensvoid beforeFirst() throws SQLException
SQLException
- if a database error happensvoid cancelRowUpdates() throws SQLException
SQLException
- if a database error happensvoid clearWarnings() throws SQLException
SQLException
- if a database error happensvoid close() throws SQLException
SQLException
- if a database error happensvoid deleteRow() throws SQLException
SQLException
- if a database error happensint findColumn(java.lang.String columnName) throws SQLException
columnName
- the column name
SQLException
- if a database error happensboolean first() throws SQLException
SQLException
- if a database error happensArray getArray(int columnIndex) throws SQLException
columnIndex
- the index of the column to read
SQLException
- if a database error happensArray getArray(java.lang.String colName) throws SQLException
colName
- the name of the column to read
SQLException
- if a database error happensjava.io.InputStream getAsciiStream(int columnIndex) throws SQLException
columnIndex
- the index of the column to read
SQLException
- if a database error happensjava.io.InputStream getAsciiStream(java.lang.String columnName) throws SQLException
columnName
- the name of the column to read
SQLException
- if a database error happensjava.io.InputStream getBinaryStream(int columnIndex) throws SQLException
This method can be used to read LONGVARBINARY values. All of the data in the InputStream should be read before getting data from any other column. A further call to a getter method will implicitly close the InputStream.
columnIndex
- the index of the column to read
SQLException
- if a database error happensjava.io.InputStream getBinaryStream(java.lang.String columnName) throws SQLException
This method can be used to read LONGVARBINARY values. All of the data in the InputStream should be read before getting data from any other column. A further call to a getter method will implicitly close the InputStream.
columnName
- the name of the column to read
SQLException
- if a database error happensBlob getBlob(int columnIndex) throws SQLException
columnIndex
- the index of the column to read
SQLException
- if a database error happensBlob getBlob(java.lang.String columnName) throws SQLException
columnName
- the name of the column to read
SQLException
- if a database error happensboolean getBoolean(int columnIndex) throws SQLException
columnIndex
- the index of the column to read
SQLException
- if a database error happensboolean getBoolean(java.lang.String columnName) throws SQLException
columnName
- the name of the column to read
SQLException
- if a database error happensbyte getByte(int columnIndex) throws SQLException
columnIndex
- the index of the column to read
SQLException
- if a database error happensbyte getByte(java.lang.String columnName) throws SQLException
columnName
- the name of the column to read
SQLException
- if a database error happensbyte[] getBytes(int columnIndex) throws SQLException
columnIndex
- the index of the column to read
SQLException
- if a database error happensbyte[] getBytes(java.lang.String columnName) throws SQLException
columnName
- the name of the column to read
SQLException
- if a database error happensjava.io.Reader getCharacterStream(int columnIndex) throws SQLException
columnIndex
- the index of the column to read
SQLException
- if a database error happensjava.io.Reader getCharacterStream(java.lang.String columnName) throws SQLException
columnName
- the name of the column to read
SQLException
- if a database error happensClob getClob(int columnIndex) throws SQLException
columnIndex
- the index of the column to read
SQLException
- if a database error happensClob getClob(java.lang.String colName) throws SQLException
colName
- the name of the column to read
SQLException
- if a database error happensint getConcurrency() throws SQLException
SQLException
- if a database error happensjava.lang.String getCursorName() throws SQLException
SQLException
- if a database error happensDate getDate(int columnIndex) throws SQLException
columnIndex
- the index of the column to read
SQLException
- if a database error happensDate getDate(int columnIndex, java.util.Calendar cal) throws SQLException
columnIndex
- the index of the column to readcal
- a java.util.Calendar to use in constructing the Date.
SQLException
- if a database error happensDate getDate(java.lang.String columnName) throws SQLException
columnName
- the name of the column to read
SQLException
- if a database error happensDate getDate(java.lang.String columnName, java.util.Calendar cal) throws SQLException
columnName
- the name of the column to readcal
- java.util.Calendar to use in constructing the Date.
SQLException
- if a database error happensdouble getDouble(int columnIndex) throws SQLException
columnIndex
- the index of the column to read
SQLException
- if a database error happensdouble getDouble(java.lang.String columnName) throws SQLException
columnName
- the name of the column to read
SQLException
- if a database error happensint getFetchDirection() throws SQLException
SQLException
- if a database error happensint getFetchSize() throws SQLException
SQLException
- if a database error happensfloat getFloat(int columnIndex) throws SQLException
columnIndex
- the index of the column to read
SQLException
- if a database error happensfloat getFloat(java.lang.String columnName) throws SQLException
columnName
- the name of the column to read
SQLException
- if a database error happensint getInt(int columnIndex) throws SQLException
columnIndex
- the index of the column to read
SQLException
- if a database error happensint getInt(java.lang.String columnName) throws SQLException
columnName
- the name of the column to read
SQLException
- if a database error happenslong getLong(int columnIndex) throws SQLException
columnIndex
- the index of the column to read
SQLException
- if a database error happenslong getLong(java.lang.String columnName) throws SQLException
columnName
- the name of the column to read
SQLException
- if a database error happensResultSetMetaData getMetaData() throws SQLException
SQLException
- if a database error happensjava.lang.Object getObject(int columnIndex) throws SQLException
For SQL User Defined Types, if a column value is Structured or Distinct, this method behaves the same as a call to: getObject(columnIndex, this.getStatement().getConnection().getTypeMap())
columnIndex
- the index of the column to read
SQLException
- if a database error happensjava.lang.Object getObject(java.lang.String columnName) throws SQLException
For SQL User Defined Types, if a column value is Structured or Distinct, this method behaves the same as a call to: getObject(columnIndex, this.getStatement().getConnection().getTypeMap())
columnName
- the name of the column to read
SQLException
- if a database error happensRef getRef(int columnIndex) throws SQLException
columnIndex
- the index of the column to read
SQLException
- if a database error happensRef getRef(java.lang.String colName) throws SQLException
colName
- the name of the column to read
SQLException
- if a database error happensint getRow() throws SQLException
SQLException
- if a database error happensshort getShort(int columnIndex) throws SQLException
columnIndex
- the index of the column to read
SQLException
- if a database error happensshort getShort(java.lang.String columnName) throws SQLException
columnName
- the name of the column to read
SQLException
- if a database error happensStatement getStatement() throws SQLException
SQLException
java.lang.String getString(int columnIndex) throws SQLException
columnIndex
- the index of the column to read
SQLException
- if a database error happensjava.lang.String getString(java.lang.String columnName) throws SQLException
columnName
- the name of the column to read
SQLException
- if a database error happensTime getTime(int columnIndex) throws SQLException
columnIndex
- the index of the column to read
SQLException
- if a database error happensTime getTime(int columnIndex, java.util.Calendar cal) throws SQLException
columnIndex
- the index of the column to readcal
- a Calendar to use in creating the Java Time value.
SQLException
- if a database error happensTime getTime(java.lang.String columnName) throws SQLException
columnName
- the name of the column to read
SQLException
- if a database error happensTime getTime(java.lang.String columnName, java.util.Calendar cal) throws SQLException
columnName
- the name of the column to readcal
- a Calendar to use in creating the Java Time value.
SQLException
- if a database error happensTimestamp getTimestamp(int columnIndex) throws SQLException
columnIndex
- the index of the column to read
SQLException
- if a database error happensTimestamp getTimestamp(int columnIndex, java.util.Calendar cal) throws SQLException
columnIndex
- the index of the column to readcal
- Calendar to use in creating the Java Timestamp value.
SQLException
- if a database error happensTimestamp getTimestamp(java.lang.String columnName) throws SQLException
columnName
- the name of the column to read
SQLException
- if a database error happensTimestamp getTimestamp(java.lang.String columnName, java.util.Calendar cal) throws SQLException
columnName
- the name of the column to readcal
- Calendar to use in creating the Java Timestamp value.
SQLException
- if a database error happensint getType() throws SQLException
SQLException
- if there is a database errorjava.io.InputStream getUnicodeStream(int columnIndex) throws SQLException
Gets the value of the column as an InputStream of Unicode characters.
columnIndex
- the index of the column to read
SQLException
- if a database error happensjava.io.InputStream getUnicodeStream(java.lang.String columnName) throws SQLException
Gets the value of the column as an InputStream of Unicode characters.
columnName
- the name of the column to read
SQLException
- if a database error happensSQLWarning getWarnings() throws SQLException
The warnings are cleared when a new Row is read from the ResultSet. The warnings returned by this method are only the warnings generated by ResultSet method calls - warnings generated by Statement methods are held by the Statement.
An SQLException is generated if this method is called on a closed ResultSet.
SQLException
- if a database error happensvoid insertRow() throws SQLException
SQLException
- if a database error happens. Particular cases include the Cursor not being on the Insert Row or if any
Columns in the Row do not have a value where the column is declared as not-nullable.boolean isAfterLast() throws SQLException
SQLException
- if a database error happensboolean isBeforeFirst() throws SQLException
SQLException
- if a database error happensboolean isFirst() throws SQLException
SQLException
- if a database error happensboolean isLast() throws SQLException
SQLException
boolean last() throws SQLException
SQLException
- if there is a database errorvoid moveToCurrentRow() throws SQLException
SQLException
- if a database error happensvoid moveToInsertRow() throws SQLException
insertRow
to insert the new row into the database.
SQLException
- if a database error happensboolean next() throws SQLException
Any InputStreams associated with the current row are closed and any warnings are cleared.
SQLException
- if a database error happensboolean previous() throws SQLException
SQLException
- if a database error happensvoid refreshRow() throws SQLException
If any columns in the current row have been updated but the updateRow
has not been called, then the
updates are lost when this method is called.
SQLException
- if a database error happens, including if the current row is the Insert row.boolean relative(int rows) throws SQLException
rows
- a number of rows to move the cursor - may be positive or negative
SQLException
- if a database error happensboolean rowDeleted() throws SQLException
SQLException
- if a database error happensboolean rowInserted() throws SQLException
SQLException
- if a database error happensboolean rowUpdated() throws SQLException
SQLException
- if a database error happensvoid setFetchDirection(int direction) throws SQLException
direction
- can be ResultSet.FETCH_FORWARD, ResultSet.FETCH_REVERSE, or ResultSet.FETCH_UNKNOWN
SQLException
- if there is a database errorvoid setFetchSize(int rows) throws SQLException
rows
- the number of rows to fetch. 0 implies that the JDBC driver can make its own decision about the fetch
size. The number should not be greater than the maximum number of rows established by the Statement that
generated the ResultSet.
SQLException
- if a database error happensvoid updateArray(int columnIndex, Array x) throws SQLException
columnIndex
- the index of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateArray(java.lang.String columnName, Array x) throws SQLException
columnName
- the name of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateAsciiStream(int columnIndex, java.io.InputStream x, int length) throws SQLException
columnIndex
- the index of the column to updatex
- the new value for the specified columnlength
- the length of the data to write from the stream
SQLException
- if a database error happensvoid updateAsciiStream(java.lang.String columnName, java.io.InputStream x, int length) throws SQLException
columnName
- the name of the column to updatex
- the new value for the specified columnlength
- the length of the data to write from the stream
SQLException
- if a database error happensvoid updateBinaryStream(int columnIndex, java.io.InputStream x, int length) throws SQLException
columnIndex
- the index of the column to updatex
- the new value for the specified columnlength
-
SQLException
- if a database error happensvoid updateBinaryStream(java.lang.String columnName, java.io.InputStream x, int length) throws SQLException
columnName
- the name of the column to updatex
- the new value for the specified columnlength
-
SQLException
- if a database error happensvoid updateBlob(int columnIndex, Blob x) throws SQLException
columnIndex
- the index of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateBlob(java.lang.String columnName, Blob x) throws SQLException
columnName
- the name of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateBoolean(int columnIndex, boolean x) throws SQLException
columnIndex
- x
- the new value for the specified column
SQLException
- if a database error happensvoid updateBoolean(java.lang.String columnName, boolean x) throws SQLException
columnName
- the name of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateByte(int columnIndex, byte x) throws SQLException
columnIndex
- the index of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateByte(java.lang.String columnName, byte x) throws SQLException
columnName
- the name of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateBytes(int columnIndex, byte[] x) throws SQLException
columnIndex
- the index of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateBytes(java.lang.String columnName, byte[] x) throws SQLException
columnName
- the name of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateCharacterStream(int columnIndex, java.io.Reader x, int length) throws SQLException
columnIndex
- the index of the column to updatex
- the new value for the specified columnlength
- the length of data to write from the stream
SQLException
- if a database error happensvoid updateCharacterStream(java.lang.String columnName, java.io.Reader reader, int length) throws SQLException
columnName
- the name of the column to updatereader
- the new value for the specified columnlength
- the length of data to write from the Reader
SQLException
- if a database error happensvoid updateClob(int columnIndex, Clob x) throws SQLException
columnIndex
- the index of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateClob(java.lang.String columnName, Clob x) throws SQLException
columnName
- the name of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateDate(int columnIndex, Date x) throws SQLException
columnIndex
- the index of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateDate(java.lang.String columnName, Date x) throws SQLException
columnName
- the name of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateDouble(int columnIndex, double x) throws SQLException
columnIndex
- the index of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateDouble(java.lang.String columnName, double x) throws SQLException
columnName
- the name of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateFloat(int columnIndex, float x) throws SQLException
columnIndex
- the index of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateFloat(java.lang.String columnName, float x) throws SQLException
columnName
- the name of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateInt(int columnIndex, int x) throws SQLException
columnIndex
- the index of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateInt(java.lang.String columnName, int x) throws SQLException
columnName
- the name of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateLong(int columnIndex, long x) throws SQLException
columnIndex
- the index of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateLong(java.lang.String columnName, long x) throws SQLException
columnName
- the name of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateNull(int columnIndex) throws SQLException
columnIndex
- the index of the column to update
SQLException
- if a database error happensvoid updateNull(java.lang.String columnName) throws SQLException
columnName
- the name of the column to update
SQLException
- if a database error happensvoid updateObject(int columnIndex, java.lang.Object x) throws SQLException
columnIndex
- the index of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateObject(int columnIndex, java.lang.Object x, int scale) throws SQLException
columnIndex
- the index of the column to updatex
- the new value for the specified columnscale
- for the types java.sql.Types.DECIMAL or java.sql.Types.NUMERIC, this specifies the number of digits after
the decimal point.
SQLException
- if a database error happensvoid updateObject(java.lang.String columnName, java.lang.Object x) throws SQLException
columnName
- the name of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateObject(java.lang.String columnName, java.lang.Object x, int scale) throws SQLException
columnName
- the name of the column to updatex
- the new value for the specified columnscale
- for the types java.sql.Types.DECIMAL or java.sql.Types.NUMERIC, this specifies the number of digits after
the decimal point.
SQLException
- if a database error happensvoid updateRef(int columnIndex, Ref x) throws SQLException
columnIndex
- the index of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateRef(java.lang.String columnName, Ref x) throws SQLException
columnName
- the name of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateRow() throws SQLException
SQLException
void updateShort(int columnIndex, short x) throws SQLException
columnIndex
- the index of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateShort(java.lang.String columnName, short x) throws SQLException
columnName
- the name of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateString(int columnIndex, java.lang.String x) throws SQLException
columnIndex
- the index of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateString(java.lang.String columnName, java.lang.String x) throws SQLException
columnName
- the name of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateTime(int columnIndex, Time x) throws SQLException
columnIndex
- the index of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateTime(java.lang.String columnName, Time x) throws SQLException
columnName
- x
- the new value for the specified column
SQLException
- if a database error happensvoid updateTimestamp(int columnIndex, Timestamp x) throws SQLException
columnIndex
- the index of the column to updatex
- the new value for the specified column
SQLException
- if a database error happensvoid updateTimestamp(java.lang.String columnName, Timestamp x) throws SQLException
columnName
- the name of the column to updatex
-
SQLException
- if a database error happensboolean wasNull() throws SQLException
SQLException
- if a database error happens
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client 11g Release 1 (11.1.1) E17503-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |