|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sas.rio.MVAResultSet
A ResultSet provides access to a table of data. A ResultSet object is usually generated by executing a Statement.
A ResultSet maintains a cursor pointing to its current row of data. Initially the cursor is positioned before the first row. The 'next' method moves the cursor to the next row.
The getXXX methods retrieve column values for the current row. You can retrieve values either using the index number of the column, or by using the name of the column. In general using the column index will be more efficient. Columns are numbered from 1.
For maximum portability, ResultSet columns within each row should be read in left-to-right order and each column should be read only once.
For the getXXX methods, the JDBC driver attempts to convert the underlying data to the specified Java type and returns a suitable Java value. See the JDBC specification for allowable mappings from SQL types to Java types with the ResultSet.getXXX methods.
Column names used as input to getXXX methods are case insensitive. When performing a getXXX using a column name, if several columns have the same name, then the value of the first matching column will be returned. The column name option is designed to be used when column names are used in the SQL query. For columns that are NOT explicitly named in the query, it is best to use column numbers. If column names were used there is no way for the programmer to guarantee that they actually refer to the intended columns. /**
A ResultSet is automatically closed by the Statement that generated it when that Statement is closed, re-executed, or is used to retrieve the next result from a sequence of multiple results.
The number, types and properties of a ResultSet's columns are provided by the ResulSetMetaData object returned by the getMetaData method.
Statement.executeQuery(java.lang.String)
,
Statement.getResultSet()
,
ResultSetMetaData
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 |
Method Summary | |
boolean |
absolute(int rowIndex)
JDBC 2.0 Moves to an absolute row number in the result set. |
void |
afterLast()
JDBC 2.0 Moves to the end of the result set, just after the last row. |
void |
beforeFirst()
JDBC 2.0 Moves to the front of the result set, just before the first row. |
void |
cancelRowUpdates()
JDBC 2.0 The cancelRowUpdates() method may be called after calling an updateXXX() method(s) and before calling updateRow() to rollback the updates made to a row. |
void |
clearWarnings()
After this call getWarnings returns null until a new warning is reported for this ResultSet. |
void |
close()
Closes the ResultSet. |
void |
deleteRow()
JDBC 2.0 Delete the current row from the result set and the underlying database. |
int |
findColumn(String columnName)
Maps a Resultset column name to a ResultSet column index. |
boolean |
first()
JDBC 2.0 Moves to the first row in the result set. |
Array |
getArray(int i)
JDBC 2.0 Get an array column. |
Array |
getArray(String colName)
JDBC 2.0 Get an array column. |
InputStream |
getAsciiStream(int columnIndex)
Gets the value of a column in the current row as a Java InputStream. |
InputStream |
getAsciiStream(String columnName)
Gets the value of a column in the current row as a Java InputStream. |
BigDecimal |
getBigDecimal(int columnIndex)
JDBC 2.0 Gets the value of a column in the current row as a java.math.BigDecimal object. |
BigDecimal |
getBigDecimal(int columnIndex,
int scale)
Deprecated. |
BigDecimal |
getBigDecimal(String columnName)
JDBC 2.0 Gets the value of a column in the current row as a java.math.BigDecimal object. |
BigDecimal |
getBigDecimal(String columnName,
int scale)
Deprecated. |
InputStream |
getBinaryStream(int columnIndex)
Gets the value of a column in the current row as a Java InputStream. |
InputStream |
getBinaryStream(String columnName)
Gets the value of a column in the current row as a Java InputStream. |
Blob |
getBlob(int i)
JDBC 2.0 Get a BLOB column. |
Blob |
getBlob(String colName)
JDBC 2.0 Get a BLOB column. |
boolean |
getBoolean(int columnIndex)
Gets the value of a column in the current row as a Java boolean. |
boolean |
getBoolean(String columnName)
Gets the value of a column in the current row as a Java boolean. |
byte |
getByte(int columnIndex)
Gets the value of a column in the current row as a Java byte. |
byte |
getByte(String columnName)
Gets the value of a column in the current row as a Java byte. |
byte[] |
getBytes(int columnIndex)
Gets the value of a column in the current row as a Java byte array. |
byte[] |
getBytes(String columnName)
Gets the value of a column in the current row as a Java byte array. |
Reader |
getCharacterStream(int columnIndex)
JDBC 2.0 Gets the value of a column in the current row as a java.io.Reader. |
Reader |
getCharacterStream(String columnName)
JDBC 2.0 Gets the value of a column in the current row as a java.io.Reader. |
Clob |
getClob(int i)
JDBC 2.0 Get a CLOB column. |
Clob |
getClob(String colName)
JDBC 2.0 Get a CLOB column. |
int |
getConcurrency()
JDBC 2.0 Gets the concurrency of this result set. |
String |
getCursorName()
Gets the name of the SQL cursor used by this ResultSet. |
Date |
getDate(int columnIndex)
Gets the value of a column in the current row as a Java java.sql.Date. |
Date |
getDate(int columnIndex,
Calendar cal)
JDBC 2.0 Gets the value of a column in the current row as a java.sql.Date object. |
Date |
getDate(String columnName)
Gets the value of a column in the current row as a Java java.sql.Date. |
Date |
getDate(String columnName,
Calendar cal)
Gets the value of a column in the current row as a java.sql.Date object. |
double |
getDouble(int columnIndex)
Gets the value of a column in the current row as a Java double. |
double |
getDouble(String columnName)
Gets the value of a column in the current row as a Java double. |
int |
getFetchDirection()
JDBC 2.0 Gets the result set fetch direction. |
int |
getFetchSize()
JDBC 2.0 Gets the fetch size. |
float |
getFloat(int columnIndex)
Gets the value of a column in the current row as a Java float. |
float |
getFloat(String columnName)
Gets the value of a column in the current row as a Java float. |
int |
getInt(int columnIndex)
Gets the value of a column in the current row as a Java int. |
int |
getInt(String columnName)
Gets the value of a column in the current row as a Java int. |
long |
getLong(int columnIndex)
Gets the value of a column in the current row as a Java long. |
long |
getLong(String columnName)
Gets the value of a column in the current row as a Java long. |
ResultSetMetaData |
getMetaData()
Gets a ResultSetMetaData object that is associated with this ResultSet. |
Object |
getObject(int columnIndex)
Gets the value of a column in its default Java representation. |
Object |
getObject(int i,
Map map)
JDBC 2.0 Returns the value of column i as a Java object. |
Object |
getObject(String columnName)
Gets the value of a column in its default Java representation. |
Object |
getObject(String colName,
Map map)
JDBC 2.0 Returns the value of column i as a Java object. |
Ref |
getRef(int i)
JDBC 2.0 Get a REF(<structured-type>) column. |
Ref |
getRef(String colName)
JDBC 2.0 Get a REF(<structured-type>) column. |
int |
getRow()
JDBC 2.0 Gets the current row number. |
short |
getShort(int columnIndex)
Gets the value of a column in the current row as a Java short. |
short |
getShort(String columnName)
Gets the value of a column in the current row as a Java short. |
Statement |
getStatement()
JDBC 2.0 Return the Statement that produced the ResultSet. |
String |
getString(int columnIndex)
Gets the value of a column in the current row as a Java String. |
String |
getString(String columnName)
Gets the value of a column in the current row as a Java String. |
Time |
getTime(int columnIndex)
Gets the value of a column in the current row as a Java java.sql.Time. |
Time |
getTime(int columnIndex,
Calendar cal)
Gets the value of a column in the current row as a java.sql.Time object. |
Time |
getTime(String columnName)
Gets the value of a column in the current row as a Java java.sql.Time. |
Time |
getTime(String columnName,
Calendar cal)
Gets the value of a column in the current row as a java.sql.Time object. |
Timestamp |
getTimestamp(int columnIndex)
Gets the value of a column in the current row as a Java java.sql.Timestamp. |
Timestamp |
getTimestamp(int columnIndex,
Calendar cal)
Gets the value of a column in the current row as a java.sql.Timestamp object. |
Timestamp |
getTimestamp(String columnName)
Gets the value of a column in the current row as a Java java.sql.Timestamp. |
Timestamp |
getTimestamp(String columnName,
Calendar cal)
Gets the value of a column in the current row as a java.sql.Timestamp object. |
int |
getType()
JDBC 2.0 Gets the result set type. |
InputStream |
getUnicodeStream(int columnIndex)
Deprecated. |
InputStream |
getUnicodeStream(String columnName)
Deprecated. |
URL |
getURL(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as a java.net.URL object in the Java programming language. |
URL |
getURL(String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as a java.net.URL object in the Java programming language. |
SQLWarning |
getWarnings()
Gets the SQLWarnings that are associated with this row. |
void |
insertRow()
JDBC 2.0 Insert the contents of the insert row into the result set and the database. |
boolean |
isAfterLast()
JDBC 2.0 Determines if the cursor is after the last row in the result set. |
boolean |
isBeforeFirst()
JDBC 2.0 Determines if the cursor is before the first row in the result set. |
boolean |
isFirst()
JDBC 2.0 Indicates whether the cursor is on the first row of this ResultSet object. |
boolean |
isLast()
JDBC 2.0 Indicates whether the cursor is on the last row of this ResultSet object. |
boolean |
last()
JDBC 2.0 Moves to the last row in the result set. |
void |
moveToCurrentRow()
JDBC 2.0 Move the cursor to the remembered cursor position, usually the current row. |
void |
moveToInsertRow()
JDBC 2.0 Move to the insert row. |
boolean |
next()
Proceeds to the next row in the ResultSet. |
boolean |
previous()
JDBC 2.0 Moves to the previous row in the result set. |
void |
refreshRow()
JDBC 2.0 Refresh the value of the current row with its current value in the database. |
boolean |
relative(int rowOffset)
JDBC 2.0 Moves a relative number of rows, either positive or negative. |
boolean |
rowDeleted()
JDBC 2.0 Determines if this row has been deleted. |
boolean |
rowInserted()
JDBC 2.0 Determines if the current row has been inserted. |
boolean |
rowUpdated()
JDBC 2.0 Determine if the current row has been updated. |
void |
setFetchDirection(int direction)
JDBC 2.0 Give a hint as to the direction in which the rows in a result set will be processed. |
void |
setFetchSize(int rows)
JDBC 2.0 Give the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed. |
void |
updateArray(int columnIndex,
Array x)
Updates the designated column with a java.sql.Array value. |
void |
updateArray(String columnName,
Array x)
Updates the designated column with a java.sql.Array value. |
void |
updateAsciiStream(int columnIndex,
InputStream x,
int length)
JDBC 2.0 Update a column with an ascii stream value. |
void |
updateAsciiStream(String columnName,
InputStream x,
int length)
JDBC 2.0 Update a column with an ascii stream value. |
void |
updateBigDecimal(int columnIndex,
BigDecimal x)
JDBC 2.0 Update a column with a BigDecimal value. |
void |
updateBigDecimal(String columnName,
BigDecimal x)
JDBC 2.0 Update a column with a BigDecimal value. |
void |
updateBinaryStream(int columnIndex,
InputStream x,
int length)
JDBC 2.0 Update a column with a binary stream value. |
void |
updateBinaryStream(String columnName,
InputStream x,
int length)
JDBC 2.0 Update a column with a binary stream value. |
void |
updateBlob(int columnIndex,
Blob x)
Updates the designated column with a java.sql.Blob value. |
void |
updateBlob(String columnName,
Blob x)
Updates the designated column with a java.sql.Blob value. |
void |
updateBoolean(int columnIndex,
boolean x)
JDBC 2.0 Update a column with a boolean value. |
void |
updateBoolean(String columnName,
boolean x)
JDBC 2.0 Update a column with a boolean value. |
void |
updateByte(int columnIndex,
byte x)
JDBC 2.0 Update a column with a byte value. |
void |
updateByte(String columnName,
byte x)
JDBC 2.0 Update a column with a byte value. |
void |
updateBytes(int columnIndex,
byte[] x)
JDBC 2.0 Update a column with a byte array value. |
void |
updateBytes(String columnName,
byte[] x)
JDBC 2.0 Update a column with a byte array value. |
void |
updateCharacterStream(int columnIndex,
Reader x,
int length)
JDBC 2.0 Update a column with a character stream value. |
void |
updateCharacterStream(String columnName,
Reader reader,
int length)
JDBC 2.0 Update a column with a character stream value. |
void |
updateClob(int columnIndex,
Clob x)
Updates the designated column with a java.sql.Clob value. |
void |
updateClob(String columnName,
Clob x)
Updates the designated column with a java.sql.Clob value. |
void |
updateDate(int columnIndex,
Date x)
JDBC 2.0 Update a column with a Date value. |
void |
updateDate(String columnName,
Date x)
JDBC 2.0 Update a column with a Date value. |
void |
updateDouble(int columnIndex,
double x)
JDBC 2.0 Update a column with a Double value. |
void |
updateDouble(String columnName,
double x)
JDBC 2.0 Update a column with a double value. |
void |
updateFloat(int columnIndex,
float x)
JDBC 2.0 Update a column with a float value. |
void |
updateFloat(String columnName,
float x)
JDBC 2.0 Update a column with a float value. |
void |
updateInt(int columnIndex,
int x)
JDBC 2.0 Update a column with an integer value. |
void |
updateInt(String columnName,
int x)
JDBC 2.0 Update a column with an integer value. |
void |
updateLong(int columnIndex,
long x)
JDBC 2.0 Update a column with a long value. |
void |
updateLong(String columnName,
long x)
JDBC 2.0 Update a column with a long value. |
void |
updateNull(int columnIndex)
JDBC 2.0 Give a nullable column a null value. |
void |
updateNull(String columnName)
JDBC 2.0 Update a column with a null value. |
void |
updateObject(int columnIndex,
Object x)
JDBC 2.0 Update a column with an Object value. |
void |
updateObject(int columnIndex,
Object x,
int scale)
JDBC 2.0 Update a column with an Object value. |
void |
updateObject(String columnName,
Object x)
JDBC 2.0 Update a column with an Object value. |
void |
updateObject(String columnName,
Object x,
int scale)
JDBC 2.0 Update a column with an Object value. |
void |
updateRef(int columnIndex,
Ref x)
Updates the designated column with a java.sql.Ref value Empty method implementation for JDK1.4 compliance. |
void |
updateRef(String columnName,
Ref x)
Updates the designated column with a java.sql.Ref value Empty method implementation for JDK1.4 compliance. |
void |
updateRow()
JDBC 2.0 Update the underlying database with the new contents of the current row. |
void |
updateShort(int columnIndex,
short x)
JDBC 2.0 Update a column with a short value. |
void |
updateShort(String columnName,
short x)
JDBC 2.0 Update a column with a short value. |
void |
updateString(int columnIndex,
String x)
JDBC 2.0 Update a column with a String value. |
void |
updateString(String columnName,
String x)
JDBC 2.0 Update a column with a String value. |
void |
updateTime(int columnIndex,
Time x)
JDBC 2.0 Update a column with a Time value. |
void |
updateTime(String columnName,
Time x)
JDBC 2.0 Update a column with a Time value. |
void |
updateTimestamp(int columnIndex,
Timestamp x)
JDBC 2.0 Update a column with a Timestamp value. |
void |
updateTimestamp(String columnName,
Timestamp x)
JDBC 2.0 Update a column with a Timestamp value. |
boolean |
wasNull()
Determines whether the given column in the current row holds an SQL NULL. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
Constructor Detail |
Method Detail |
public boolean absolute(int rowIndex) throws SQLException
If row is positive, moves to an absolute row with respect to the beginning of the result set. The first row is row 1, the second is row 2, and so on.
If row is negative, moves to an absolute row position with respect to the end of result set. For example, calling absolute(-1) positions the cursor on the last row, absolute(-2) indicates the next-to-last row, and so on.
An attempt to position the cursor beyond the first/last row in the result set, leaves the cursor before/after the first/last row, respectively.
Note: Calling absolute(1) is the same as calling first(). Calling absolute(-1) is the same as calling last().
absolute
in interface ResultSet
rowsOffset
- The number of rows to move to.SQLException
- This exception is thrown if a server error is detected or
rowsOffset is 0, or result set type is TYPE_FORWARD_ONLY.public boolean relative(int rowOffset) throws SQLException
Note: Calling relative(1) is different than calling next() since is makes sense to call next() when there is no current row, for example, when the cursor is positioned before the first row or after the last row of the result set.
relative
in interface ResultSet
rowsOffset
- The number of rows to move to.SQLException
- This exception is thrown if a server error is detected or there
is no current row, or result set type is TYPE_FORWARD_ONLY.public void beforeFirst() throws SQLException
beforeFirst
in interface ResultSet
SQLException
- This exception is thrown if the result set type is TYPE_FORWARD_ONLY.public void afterLast() throws SQLException
afterLast
in interface ResultSet
SQLException
- This exception is thrown if the result set type is TYPE_FORWARD_ONLY.public boolean first() throws SQLException
first
in interface ResultSet
SQLException
- This exception is thrown if a server error is detected or if the
result set type is TYPE_FORWARD_ONLY.public boolean last() throws SQLException
last
in interface ResultSet
SQLException
- This exception is thrown if an MvaException is detected or
result set type is TYPE_FORWARD_ONLY.public boolean isBeforeFirst() throws SQLException
isBeforeFirst
in interface ResultSet
SQLException
- This exception is required by the interface but it is never thrown.public boolean isAfterLast() throws SQLException
isAfterLast
in interface ResultSet
SQLException
- This exception is required by the interface but it is never thrown.public boolean isFirst() throws SQLException
ResultSet
object.isFirst
in interface ResultSet
SQLException
- - If a data access error occurs.public boolean isLast() throws SQLException
ResultSet
object.isLast
in interface ResultSet
SQLException
- - If a data access error occurs.public boolean next() throws SQLException
next
in interface ResultSet
SQLException
- This exception is thrown if a server error is detected.public boolean previous() throws SQLException
Note: previous() is not the same as relative(-1) since it makes sense to call previous() when there is no current row.
previous
in interface ResultSet
SQLException
- This exception is thrown if a server error is detected or
result set type is TYPE_FORWARD_ONLY.public void close() throws SQLException
close
in interface ResultSet
SQLException
- This exception is thrown if a server error is detected.public boolean wasNull() throws SQLException
wasNull
in interface ResultSet
SQLException
- This exception is thrown if the current row is not valid.public String getString(int columnIndex) throws SQLException
getString
in interface ResultSet
columnIndex
- The first column is 1, the second is 2, and so on.SQLException
- This exception is thrown if the column value is not valid.public boolean getBoolean(int columnIndex) throws SQLException
getBoolean
in interface ResultSet
columnIndex
- The first column is 1, the second is 2, and so on.SQLException
- This exception is thrown if the column value is not valid or
the SQL type cannot be converted to a boolean value.public byte getByte(int columnIndex) throws SQLException
getByte
in interface ResultSet
columnIndex
- The first column is 1, the second is 2, and so on.SQLException
- This exception is thrown if the column value is not valid or
the SQL type cannot be converted to byte representation.public short getShort(int columnIndex) throws SQLException
getShort
in interface ResultSet
columnIndex
- The first column is 1, the second is 2, and so on.SQLException
- This exception is thrown if the column value is not valid or
the SQL type cannot be converted to byte representation.public int getInt(int columnIndex) throws SQLException
getInt
in interface ResultSet
columnIndex
- The first column is 1, the second column is 2, and so on.SQLException
- This exception is thrown if the column value is not valid or
the SQL type cannot be converted to a valid int value.public long getLong(int columnIndex) throws SQLException
getLong
in interface ResultSet
columnIndex
- The first column is 1, the second column is 2, and so on.SQLException
- This exception is thrown if the column value is not valid or
the SQL type cannot be converted to a valid long value.public float getFloat(int columnIndex) throws SQLException
getFloat
in interface ResultSet
columnIndex
- The first column is 1, the second column is 2, and so on.SQLException
- This exception is thrown if the column value is not valid or
the SQL type cannot be converted to a valid float value.public double getDouble(int columnIndex) throws SQLException
getDouble
in interface ResultSet
columnIndex
- The first column is 1, the second column is 2, and so on.SQLException
- This exception is thrown if the column value is not valid or
the SQL type cannot be converted to a valid double value.public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException
getBigDecimal
in interface ResultSet
columnIndex
- The first column is 1, the second column is 2, and so on.SQLException
- This exception is thrown if the column value is not valid or
the SQL type cannot be converted to a valid BigDecimal value.public byte[] getBytes(int columnIndex) throws SQLException
getBytes
in interface ResultSet
SQLException
- This exception is always thrown because SAS software
does not support conversions to binary representation.public Date getDate(int columnIndex) throws SQLException
getDate
in interface ResultSet
columnIndex
- The first column is 1, the second column is 2, and so on.SQLException
- This exception is thrown if the column value is not valid or
the SQL type cannot be converted to a valid java.sql.Date value.public Time getTime(int columnIndex) throws SQLException
getTime
in interface ResultSet
columnIndex
- The first column is 1, the second column is 2, and so on.SQLException
- This exception is thrown if the column value is not valid or
the SQL type cannot be converted to a valid java.sql.Time value.public Timestamp getTimestamp(int columnIndex) throws SQLException
getTimestamp
in interface ResultSet
columnIndex
- The first column is 1, the second column is 2, and so on.SQLException
- This exception is thrown if the column value is not valid or
the SQL type cannot be converted to a valid java.sql.Timestamp value.public InputStream getAsciiStream(int columnIndex) throws SQLException
getAsciiStream
in interface ResultSet
columnIndex
- The first column is 1, the second column is 2, and so on.SQLException
- This exception is thrown if the column value is not valid or
the SQL type cannot be converted to a valid java.sql.Type.VARCHAR value. SAS software
does not support other conversions.public InputStream getUnicodeStream(int columnIndex) throws SQLException
getUnicodeStream
in interface ResultSet
columnIndex
- The first column is 1, the second column is 2, and so on.SQLException
- This exception is thrown if the column value is not valid or
the SQL type cannot be converted to a valid java.sql.Type.VARCHAR value. SAS software
does not support other conversions.public InputStream getBinaryStream(int columnIndex) throws SQLException
getBinaryStream
in interface ResultSet
columnIndex
- The first column is 1, the second column is 2, and so on.SQLException
- This exception is thrown if the column value is not valid or
the SQL type cannot be converted to a valid java.sql.Type.VARCHAR value. SAS software
does not support other conversions.public String getString(String columnName) throws SQLException
getString
in interface ResultSet
columnName
- The name of the column that is returned by the ResultSetMetaData object.SQLException
- This exception is thrown if the column value is not valid.public boolean getBoolean(String columnName) throws SQLException
getBoolean
in interface ResultSet
columnName
- The name of the column that is returned by the ResultSetMetaData object.SQLException
- This exception is thrown if the column value is not valid or the
SQL type cannot be converted into a boolean value.public byte getByte(String columnName) throws SQLException
getByte
in interface ResultSet
columnName
- The name of the column that is returned by the ResultSetMetaData object.SQLException
- This exception is thrown if the column value is not valid or the
SQL type cannot be converted to byte representation.public short getShort(String columnName) throws SQLException
getShort
in interface ResultSet
columnName
- The name of the column that is returned by the ResultSetMetaData object.SQLException
- This exception is thrown if the column value is not valid or the
SQL type cannot be converted into a valid short value.public int getInt(String columnName) throws SQLException
getInt
in interface ResultSet
columnName
- The name of the column that is returned by the ResultSetMetaData object.SQLException
- This exception is thrown if the column value is not valid or the
SQL type cannot be converted into a valid int value.public long getLong(String columnName) throws SQLException
getLong
in interface ResultSet
columnName
- The name of the column that is returned by the ResultSetMetaData object.SQLException
- This exception is thrown if the column value is not valid or the
SQL type cannot be converted into a valid long value.public float getFloat(String columnName) throws SQLException
getFloat
in interface ResultSet
columnName
- The name of the column that is returned by the ResultSetMetaData object.SQLException
- This exception is thrown if the column value is not valid or the
SQL type cannot be converted into a valid float value.public double getDouble(String columnName) throws SQLException
getDouble
in interface ResultSet
columnName
- The name of the column that is returned by the ResultSetMetaData object.SQLException
- This exception is thrown if the column value is not valid or the
SQL type cannot be converted into a valid double value.public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException
getBigDecimal
in interface ResultSet
columnName
- The name of the column that is returned by the ResultSetMetaData object.SQLException
- This exception is thrown if the column value is not valid or the
SQL type cannot be converted into a valid BigDecimal value.public byte[] getBytes(String columnName) throws SQLException
getBytes
in interface ResultSet
SQLException
- This exception is always thrown becaue SAS software does not
support conversions to binary representation.public Date getDate(String columnName) throws SQLException
getDate
in interface ResultSet
columnName
- The name of the column that is returned by the ResultSetMetaData object.SQLException
- This exception is thrown if the column value is not valid or the
SQL type cannot be converted into a valid java.sql.Date value.public Time getTime(String columnName) throws SQLException
getTime
in interface ResultSet
columnName
- The name of the column that is returned by the ResultSetMetaData object.SQLException
- This exception is thrown if the column value is not valid or the
SQL type cannot be converted into a valid java.sql.Time value.public Timestamp getTimestamp(String columnName) throws SQLException
getTimestamp
in interface ResultSet
columnName
- The name of the column that is returned by the ResultSetMetaData object.SQLException
- This exception is thrown if the column value is not valid or the
SQL type cannot be converted into a valid java.sql.Timestamp value.public InputStream getAsciiStream(String columnName) throws SQLException
getAsciiStream
in interface ResultSet
columnName
- The name of the column that is returned by the ResultSetMetaData object.SQLException
- This exception is thrown if the column value is not valid or the
value is not java.sql.Type.VARCHAR. No other conversions are supported.public InputStream getUnicodeStream(String columnName) throws SQLException
getUnicodeStream
in interface ResultSet
columnName
- The name of the column that is returned by the ResultSetMetaData object.SQLException
- This exception is thrown if the column value is not valid or the
value is not java.sql.Type.VARCHAR. No other conversions are supported.public InputStream getBinaryStream(String columnName) throws SQLException
getBinaryStream
in interface ResultSet
columnName
- The name of the column that is returned by the ResultSetMetaData object.SQLException
- This exception is thrown if the column value is not valid or the
value is not java.sql.Type.VARCHAR. No other conversions are supported.public SQLWarning getWarnings() throws SQLException
getWarnings
in interface ResultSet
SQLException
- This exception is required by the interface, but it is never thrown.public void clearWarnings() throws SQLException
clearWarnings
in interface ResultSet
SQLException
- This exception is required by the interface, but it is never thrown.public String getCursorName() throws SQLException
getCursorName
in interface ResultSet
SQLException
- if a database-access error occurs.public ResultSetMetaData getMetaData() throws SQLException
getMetaData
in interface ResultSet
SQLException
- This exception is thrown if an error condition is detected.public Object getObject(int columnIndex) throws SQLException
getObject
in interface ResultSet
columnIndex
- The first column is 1, the second column is 2, and so on.SQLException
- This exception is thrown if the column index is not valid.public Object getObject(String columnName) throws SQLException
getObject
in interface ResultSet
columnName
- The name of the column.SQLException
- This exception is thrown if the column index is not valid.public int findColumn(String columnName) throws SQLException
findColumn
in interface ResultSet
columnName
- The name of the column.SQLException
- This exception is thrown if the column name is not valid.public Reader getCharacterStream(int columnIndex) throws SQLException
getCharacterStream
in interface ResultSet
columnIndex
- The first column is 1, the second column is 2, and so on.SQLException
- This exception is thrown if the column index is not valid.public Reader getCharacterStream(String columnName) throws SQLException
getCharacterStream
in interface ResultSet
columnName
- The name of the column.SQLException
- This exception is thrown if the column index is not valid.public BigDecimal getBigDecimal(int columnIndex) throws SQLException
getBigDecimal
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...SQLException
- This exception is thrown if the column index is not valid.public BigDecimal getBigDecimal(String columnName) throws SQLException
getBigDecimal
in interface ResultSet
columnName
- The name of the column.SQLException
- This exception is thrown if the column index is not valid.public int getRow() throws SQLException
getRow
in interface ResultSet
SQLException
- This exception is required by the interface but it is never thrown.public void setFetchDirection(int direction) throws SQLException
setFetchDirection
in interface ResultSet
direction
- The initial direction for processing rows.SQLException
- This exception is thrown if the direction
is not one of ResultSet.FETCH_FORWARD, ResultSet.FETCH_REVERSE, or
ResultSet.FETCH_UNKNOWN.public int getFetchDirection() throws SQLException
getFetchDirection
in interface ResultSet
SQLException
- This exception is required by the interface but it is never thrown.public void setFetchSize(int rows) throws SQLException
setFetchSize
in interface ResultSet
rows
- The number of rows to fetch.SQLException
- This exception is thrown if the
condition 0 <= rows <= stmt.getMaxRows() is not satisfied.public int getFetchSize() throws SQLException
getFetchSize
in interface ResultSet
SQLException
- This exception is required by the interface but it is never thrown.public int getType() throws SQLException
getType
in interface ResultSet
SQLException
- This exception is required by the interface but it is never thrown.public int getConcurrency() throws SQLException
getConcurrency
in interface ResultSet
SQLException
- This exception is required by the interface but it is never thrown.public boolean rowUpdated() throws SQLException
rowUpdated
in interface ResultSet
SQLException
- This exception is always thrown because SAS software
does not detect row updated.MVADatabaseMetaData.updatesAreDetected(int)
public boolean rowInserted() throws SQLException
rowInserted
in interface ResultSet
SQLException
- This exception is always thrown because SAS software
does not detect row inserts.MVADatabaseMetaData.insertsAreDetected(int)
public boolean rowDeleted() throws SQLException
rowDeleted
in interface ResultSet
SQLException
- This exception is always thrown because SAS software
does not detect row deletes.MVADatabaseMetaData.deletesAreDetected(int)
public void updateNull(int columnIndex) throws SQLException
updateNull
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...SQLException
- This exception is thrown if the column index is not valid.public void updateBoolean(int columnIndex, boolean x) throws SQLException
updateBoolean
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valueSQLException
- This exception is thrown if the column index is not valid.public void updateByte(int columnIndex, byte x) throws SQLException
updateByte
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valueSQLException
- This exception is thrown if the column index is not valid.public void updateShort(int columnIndex, short x) throws SQLException
updateShort
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valueSQLException
- This exception is thrown if the column index is not valid.public void updateInt(int columnIndex, int x) throws SQLException
updateInt
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valueSQLException
- This exception is thrown if the column index is not valid.public void updateLong(int columnIndex, long x) throws SQLException
updateLong
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valueSQLException
- This exception is always thrown.public void updateFloat(int columnIndex, float x) throws SQLException
updateFloat
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valueSQLException
- This exception is thrown if the column index is not valid.public void updateDouble(int columnIndex, double x) throws SQLException
updateDouble
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valueSQLException
- This exception is thrown if the column index is not valid.public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException
updateBigDecimal
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valueSQLException
- This exception is thrown if the column index is not valid.public void updateString(int columnIndex, String x) throws SQLException
updateString
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valueSQLException
- This exception is thrown if the column index is not valid.public void updateBytes(int columnIndex, byte[] x) throws SQLException
updateBytes
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valueSQLException
- This exception is thrown if the column index is not valid.public void updateDate(int columnIndex, Date x) throws SQLException
updateDate
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valueSQLException
- This exception is thrown if the column index is not valid.public void updateTime(int columnIndex, Time x) throws SQLException
updateTime
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valueSQLException
- This exception is thrown if the column index is not valid.public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException
updateTimestamp
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valueSQLException
- This exception is thrown if the column index is not valid.public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException
updateAsciiStream
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valuelength
- the length of the streamSQLException
- This exception is thrown if the column index is not valid.public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException
updateBinaryStream
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valuelength
- the length of the streamSQLException
- This exception is thrown if the column index is not valid.public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException
updateCharacterStream
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valuelength
- the length of the streamSQLException
- This exception is thrown if the column index is not valid.public void updateObject(int columnIndex, Object x, int scale) throws SQLException
updateObject
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valuescale
- For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types
this is the number of digits after the decimal. For all other
types this value will be ignored.SQLException
- This exception is thrown if the column index is not valid.public void updateObject(int columnIndex, Object x) throws SQLException
updateObject
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valueSQLException
- This exception is thrown if the column index is not valid.public void updateNull(String columnName) throws SQLException
updateNull
in interface ResultSet
columnName
- the name of the columnSQLException
- if a database-access error occurspublic void updateBoolean(String columnName, boolean x) throws SQLException
updateBoolean
in interface ResultSet
columnName
- the name of the columnx
- the new column valueSQLException
- if a database-access error occurspublic void updateByte(String columnName, byte x) throws SQLException
updateByte
in interface ResultSet
columnName
- the name of the columnx
- the new column valueSQLException
- if a database-access error occurspublic void updateShort(String columnName, short x) throws SQLException
updateShort
in interface ResultSet
columnName
- the name of the columnx
- the new column valueSQLException
- if a database-access error occurspublic void updateInt(String columnName, int x) throws SQLException
updateInt
in interface ResultSet
columnName
- the name of the columnx
- the new column valueSQLException
- if a database-access error occurspublic void updateLong(String columnName, long x) throws SQLException
updateLong
in interface ResultSet
columnName
- the name of the columnx
- the new column valueSQLException
- if a database-access error occurspublic void updateFloat(String columnName, float x) throws SQLException
updateFloat
in interface ResultSet
columnName
- the name of the columnx
- the new column valueSQLException
- if a database-access error occurspublic void updateDouble(String columnName, double x) throws SQLException
updateDouble
in interface ResultSet
columnName
- the name of the columnx
- the new column valueSQLException
- if a database-access error occurspublic void updateBigDecimal(String columnName, BigDecimal x) throws SQLException
updateBigDecimal
in interface ResultSet
columnName
- the name of the columnx
- the new column valueSQLException
- if a database-access error occurspublic void updateString(String columnName, String x) throws SQLException
updateString
in interface ResultSet
columnName
- the name of the columnx
- the new column valueSQLException
- if a database-access error occurspublic void updateBytes(String columnName, byte[] x) throws SQLException
updateBytes
in interface ResultSet
columnName
- the name of the columnx
- the new column valueSQLException
- if a database-access error occurspublic void updateDate(String columnName, Date x) throws SQLException
updateDate
in interface ResultSet
columnName
- the name of the columnx
- the new column valueSQLException
- if a database-access error occurspublic void updateTime(String columnName, Time x) throws SQLException
updateTime
in interface ResultSet
columnName
- the name of the columnx
- the new column valueSQLException
- if a database-access error occurspublic void updateTimestamp(String columnName, Timestamp x) throws SQLException
updateTimestamp
in interface ResultSet
columnName
- the name of the columnx
- the new column valueSQLException
- if a database-access error occurspublic void updateAsciiStream(String columnName, InputStream x, int length) throws SQLException
updateAsciiStream
in interface ResultSet
columnName
- the name of the columnx
- the new column valuelength
- of the streamSQLException
- if a database-access error occurspublic void updateBinaryStream(String columnName, InputStream x, int length) throws SQLException
updateBinaryStream
in interface ResultSet
columnName
- the name of the columnx
- the new column valuelength
- of the streamSQLException
- if a database-access error occurspublic void updateCharacterStream(String columnName, Reader reader, int length) throws SQLException
updateCharacterStream
in interface ResultSet
columnName
- the name of the columnx
- the new column valuelength
- of the streamSQLException
- if a database-access error occurspublic void updateObject(String columnName, Object x, int scale) throws SQLException
updateObject
in interface ResultSet
columnName
- the name of the columnx
- the new column valuescale
- For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types
this is the number of digits after the decimal. For all other
types this value will be ignored.SQLException
- if a database-access error occurspublic void updateObject(String columnName, Object x) throws SQLException
updateObject
in interface ResultSet
columnName
- the name of the columnx
- the new column valueSQLException
- if a database-access error occurspublic void insertRow() throws SQLException
insertRow
in interface ResultSet
SQLException
- This exception is always thrown.
This function is available only on ResultSets generated from MVAStatement.getTable()public void updateRow() throws SQLException
updateRow
in interface ResultSet
SQLException
- if a database-access error occurs, or
if called when on the insert row
This function is available only on ResultSets generated from MVAStatement.getTable()public void deleteRow() throws SQLException
deleteRow
in interface ResultSet
SQLException
- if a database-access error occurs, or if
called when on the insert row.public void refreshRow() throws SQLException
refreshRow
in interface ResultSet
SQLException
- This exception is thrown if an MvaException is detected.public void cancelRowUpdates() throws SQLException
cancelRowUpdates
in interface ResultSet
SQLException
- if a database-access error occurs, or if
called when on the insert row.public void moveToInsertRow() throws SQLException
moveToInsertRow
in interface ResultSet
SQLException
- This exception is always thrown.public void moveToCurrentRow() throws SQLException
moveToCurrentRow
in interface ResultSet
SQLException
- if a database-access error occurs,
or the result set is not updatablepublic Statement getStatement() throws SQLException
getStatement
in interface ResultSet
SQLException
- if a database-access error occurspublic Object getObject(int i, Map map) throws SQLException
getObject
in interface ResultSet
i
- the first column is 1, the second is 2, ...map
- the mapping from SQL type names to Java classespublic Ref getRef(int i) throws SQLException
getRef
in interface ResultSet
i
- the first column is 1, the second is 2, ...public Blob getBlob(int i) throws SQLException
getBlob
in interface ResultSet
i
- the first column is 1, the second is 2, ...public Clob getClob(int i) throws SQLException
getClob
in interface ResultSet
i
- the first column is 1, the second is 2, ...public Array getArray(int i) throws SQLException
getArray
in interface ResultSet
i
- the first column is 1, the second is 2, ...public Object getObject(String colName, Map map) throws SQLException
getObject
in interface ResultSet
colName
- the column namemap
- the mapping from SQL type names to Java classespublic Ref getRef(String colName) throws SQLException
getRef
in interface ResultSet
colName
- the column namepublic Blob getBlob(String colName) throws SQLException
getBlob
in interface ResultSet
colName
- the column namepublic Clob getClob(String colName) throws SQLException
getClob
in interface ResultSet
colName
- the column namepublic Array getArray(String colName) throws SQLException
getArray
in interface ResultSet
colName
- the column namepublic Date getDate(int columnIndex, Calendar cal) throws SQLException
getDate
in interface ResultSet
columnIndex
- The first column is 1, the second is 2, and so on.cal
- The calendar to use in constructing the date. Ignored if cal is NULL.SQLException
- This exception is thrown if the column value is not valid or
the SQL type cannot be converted to a valid java.sql.Date value.public Date getDate(String columnName, Calendar cal) throws SQLException
getDate
in interface ResultSet
columnName
- The name of the column that is returned by the ResultSetMetaData object.cal
- The calendar to use in constructing the date. Ignored if cal is NULL.SQLException
- This exception is thrown if the column value is not valid or the
SQL type cannot be converted into a valid java.sql.Date value.public Time getTime(int columnIndex, Calendar cal) throws SQLException
getTime
in interface ResultSet
columnIndex
- The first column is 1, the second is 2, and so on.cal
- The calendar to use in constructing the date. Ignored if cal is NULL.SQLException
- This exception is thrown if the column value is not valid or
the SQL type cannot be converted to a valid java.sql.Time value.public Time getTime(String columnName, Calendar cal) throws SQLException
getTime
in interface ResultSet
columnName
- The name of the column that is returned by the ResultSetMetaData object.cal
- The calendar to use in constructing the date. Ignored if cal is NULL.SQLException
- This exception is thrown if the column value is not valid or the
SQL type cannot be converted into a valid java.sql.Time value.public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException
getTimestamp
in interface ResultSet
columnIndex
- The first column is 1, the second is 2, and so on.cal
- The calendar to use in constructing the date. Ignored if cal is NULL.SQLException
- This exception is thrown if the column value is not valid or
the SQL type cannot be converted to a valid java.sql.Timestamp value.public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException
getTimestamp
in interface ResultSet
columnName
- The name of the column that is returned by the ResultSetMetaData object.cal
- The calendar to use in constructing the date. Ignored if cal is NULL.SQLException
- This exception is thrown if the column value is not valid or the
SQL type cannot be converted into a valid java.sql.Timestamp value.public URL getURL(int columnIndex) throws SQLException
getURL
in interface ResultSet
SQLException
- Always thrown, to indicate that this method is not implemented.public URL getURL(String columnName) throws SQLException
getURL
in interface ResultSet
SQLException
- Always thrown, to indicate that this method is not implemented.public void updateArray(int columnIndex, Array x) throws SQLException
updateArray
in interface ResultSet
SQLException
- Always thrown, to indicate that this method is not implemented.public void updateArray(String columnName, Array x) throws SQLException
updateArray
in interface ResultSet
SQLException
- Always thrown, to indicate that this method is not implemented.public void updateBlob(int columnIndex, Blob x) throws SQLException
updateBlob
in interface ResultSet
SQLException
- Always thrown, to indicate that this method is not implemented.public void updateBlob(String columnName, Blob x) throws SQLException
updateBlob
in interface ResultSet
SQLException
- Always thrown, to indicate that this method is not implemented.public void updateClob(int columnIndex, Clob x) throws SQLException
updateClob
in interface ResultSet
SQLException
- Always thrown, to indicate that this method is not implemented.public void updateClob(String columnName, Clob x) throws SQLException
updateClob
in interface ResultSet
SQLException
- Always thrown, to indicate that this method is not implemented.public void updateRef(int columnIndex, Ref x) throws SQLException
updateRef
in interface ResultSet
SQLException
- Always thrown, to indicate that this method is not implemented.public void updateRef(String columnName, Ref x) throws SQLException
updateRef
in interface ResultSet
SQLException
- Always thrown, to indicate that this method is not implemented.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |