public class PrefetchedResult extends Result
Constructor and Description |
---|
PrefetchedResult(Result result)
Constructs a
PrefetchedResult that is initialized with
result . |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this
Result and releases all used resources. |
int |
getColumnCount()
Returns the number of columns.
|
ColumnMetaData |
getMetadata(int col)
Returns the cached
ColumnMetadata for the column with index
col . |
Object |
getObject(int col)
Gets the value of the designated column in the current row of this
Result object as an Object . |
int |
getRowCount() |
boolean |
next() |
void |
rewind() |
int |
skip(int count)
Skips over the specified count of rows.
|
dump, dump, getBoolean, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getByte, getColumnIndex, getDataSource, getDouble, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getFloat, getInt, getInt, getInt, getInt, getLong, getLong, getLong, getLong, getMaxRowCount, getObject, getQueryInfo, getShort, getShort, getShort, getShort, getString, getString, getString, getString, setDataSource, setMaxRowCount, setQueryInfo
public PrefetchedResult(Result result) throws DBException
result
- a Result
that include the data for this
PrefetchedResult
DBException
public int getColumnCount()
getColumnCount
in class Result
int
value.public ColumnMetaData getMetadata(int col)
ColumnMetadata
for the column with index
col
.
Note that col
starts with 0 for the first column.
getMetadata
in class Result
col
- the index of the column whose ColumnMetadata
shall be returned, starting at 0ColumnMetadata
of the column with index
col
public boolean next() throws DBException
next
in class Result
true
if there is another row to be returned,
otherwise false
.DBException
- if any error occurred.public Object getObject(int col) throws DBException
Gets the value of the designated column in the current row of this
Result
object as an Object
.
getObject
in class Result
col
- the index of the columnjava.lang.Object
holding the column valueDBException
- if the columnIndex is not valid; if a database access error
occurs.public int skip(int count) throws DBException
The skip method may, for a variety of reasons, end up skipping over some smaller number of rows, possibly 0. This may be caused by reaching the end of the result.
skip
in class Result
count
- the number of rows to skipDBException
- if any error occuredpublic void rewind()
public int getRowCount()
public void close() throws DBException
Result
and releases all used resources.close
in interface AutoCloseable
close
in class Result
DBException
- if a database access error occurs.Copyright © 2003–2020 XDEV Software. All rights reserved.