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 TypeMethodDescriptionvoidclose()Closes this result set releasing any sub-resources it holds.voidfirst()Move the cursor to the first row.intRetrieves index of the current row.Retrieves theStatementthat produced thisResultSetobject.booleanhasNext()Returns true if the cursor does not point at the last row in this result set.booleanisFirst()Returns true if the cursor is at the first row of this result set.booleanisOpen()Retrieves status of this result set.voidlast()Move the cursor to the last row in this results set.voidnext()Move the cursor one row forward.voidprevious()Move the cursor one row backwards.voidrelative(int rows) Move the cursor a relative number of rows, either positive or negative.voidsetRowIndex(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, waitMethods inherited from interface cz.cvut.kbss.ontodriver.ResultSet
findColumn, getBoolean, getBoolean, getByte, getByte, getColumnCount, getColumnNames, 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:ResultSetRetrieves theStatementthat produced thisResultSetobject. If this result set was generated some other way, this method will returnnull.- Specified by:
getStatementin interfaceResultSet- Returns:
- The
Statementthat produced thisResultSetor null
-
isFirst
public boolean isFirst()Description copied from interface:ResultSetReturns true if the cursor is at the first row of this result set. -
last
public void last()Description copied from interface:ResultSetMove 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:ResultSetMove the cursor to the first row. -
hasNext
public boolean hasNext()Description copied from interface:ResultSetReturns true if the cursor does not point at the last row in this result set. -
next
public void next()Description copied from interface:ResultSetMove the cursor one row forward. -
previous
public void previous()Description copied from interface:ResultSetMove the cursor one row backwards. -
relative
public void relative(int rows) Description copied from interface:ResultSetMove the cursor a relative number of rows, either positive or negative. -
getRowIndex
public int getRowIndex()Description copied from interface:ResultSetRetrieves index of the current row.The first row has index 0.
- Specified by:
getRowIndexin interfaceResultSet- Returns:
- the current row index, -1 if there is no current row
-
setRowIndex
public void setRowIndex(int newIndex) Description copied from interface:ResultSetMove the cursor to the specified row index.The first row has index 0.
- Specified by:
setRowIndexin interfaceResultSet- Parameters:
newIndex- Index to move the cursor to
-
close
Description copied from interface:ResultSetCloses 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
closeandisOpen) will result inOntoDriverException.Calling
closeon 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceResultSet- Throws:
JenaDriverException
-
isOpen
public boolean isOpen()Description copied from interface:ResultSetRetrieves status of this result set.
-