T
- type of the record being returned@NotThreadSafe public interface DBCursor<T> extends Closeable
The cursor provides a java.sql.ResultSet like API : it is positioned before the first requested record and needs to
be moved forward by calling next()
.
Usage:
try (DBCursor cursor = ...) { while (cursor.next()) { Record record = cursor.getRecord(); // ... can call cursor.getRecord() again: it will return the same result } }
Modifier and Type | Interface and Description |
---|---|
static class |
DBCursor.CursorOptions
Options to create a cursor.
|
static class |
DBCursor.PositionStrategy
Represents a cursor key positioning strategy.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Release the resources and locks used by this Iterator.
|
T |
getRecord()
Getter for the current record.
|
boolean |
next()
Skip to the next record of the database.
|
T getRecord()
This method will always return null
when
null
.boolean next() throws ChangelogException
ChangelogException
- When database exception raised.void close()
close
in interface AutoCloseable
close
in interface Closeable
Copyright 2010-2018 ForgeRock AS.