Class AbstractResultSet
java.lang.Object
cz.cvut.kbss.ontodriver.jena.query.AbstractResultSet
- All Implemented Interfaces:
ResultSet
,AutoCloseable
,Iterable<ResultRow>
- Direct Known Subclasses:
AskResultSet
,SelectResultSet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes this result set releasing any sub-resources it holds.void
first()
Move the cursor to the first row.int
Retrieves index of the current row.Retrieves theStatement
that produced thisResultSet
object.boolean
hasNext()
Returns true if the cursor does not point at the last row in this result set.boolean
isFirst()
Returns true if the cursor is at the first row of this result set.boolean
isOpen()
Retrieves status of this result set.void
last()
Move the cursor to the last row in this results set.void
next()
Move the cursor one row forward.void
previous()
Move the cursor one row backwards.void
relative
(int rows) Move the cursor a relative number of rows, either positive or negative.void
setRowIndex
(int newIndex) Move the cursor to the specified row index.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cz.cvut.kbss.ontodriver.ResultSet
findColumn, getBoolean, getBoolean, getByte, getByte, getColumnCount, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getObject, getObject, getObject, getObject, getShort, getShort, getString, getString, isBound, isBound, iterator, spliterator, stream
-
Constructor Details
-
AbstractResultSet
public AbstractResultSet()
-
-
Method Details
-
getStatement
Description copied from interface:ResultSet
Retrieves theStatement
that produced thisResultSet
object. If this result set was generated some other way, this method will returnnull
.- Specified by:
getStatement
in interfaceResultSet
- Returns:
- The
Statement
that produced thisResultSet
or null
-
isFirst
public boolean isFirst()Description copied from interface:ResultSet
Returns true if the cursor is at the first row of this result set. -
last
public void last()Description copied from interface:ResultSet
Move the cursor to the last row in this results set.Note that since the result set may be asynchronously updated, the last row does not have to always be the same.
-
first
public void first()Description copied from interface:ResultSet
Move the cursor to the first row. -
hasNext
public boolean hasNext()Description copied from interface:ResultSet
Returns true if the cursor does not point at the last row in this result set. -
next
public void next()Description copied from interface:ResultSet
Move the cursor one row forward. -
previous
public void previous()Description copied from interface:ResultSet
Move the cursor one row backwards. -
relative
public void relative(int rows) Description copied from interface:ResultSet
Move the cursor a relative number of rows, either positive or negative. -
getRowIndex
public int getRowIndex()Description copied from interface:ResultSet
Retrieves index of the current row.The first row has index 0.
- Specified by:
getRowIndex
in interfaceResultSet
- Returns:
- the current row index, -1 if there is no current row
-
setRowIndex
public void setRowIndex(int newIndex) Description copied from interface:ResultSet
Move the cursor to the specified row index.The first row has index 0.
- Specified by:
setRowIndex
in interfaceResultSet
- Parameters:
newIndex
- Index to move the cursor to
-
close
Description copied from interface:ResultSet
Closes this result set releasing any sub-resources it holds.After closing the result set is not usable any more and calling methods on it (except
close
andisOpen
) will result inOntoDriverException
.Calling
close
on already closed resource does nothing.Calling this method also results in immediate disconnection of all registered observers and cancellation of any running reasoning associated with this result set.
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceResultSet
- Throws:
JenaDriverException
-
isOpen
public boolean isOpen()Description copied from interface:ResultSet
Retrieves status of this result set.
-