|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Cursor<E>
This interface enables sequential access to a result set of a search. After creation,
the cursor is before the first object, i.e. next() should be called before
calling currentObject(). A cursor should be closed after usage, otherwise
resource leak is risked. Opening a cursor locks the connection for reading. Cursors are not
thread-safe objects; for accessing objects from different threads, open seperate cursors.
| Method Summary | |
|---|---|
void |
close()
Closes the cursor and releases all resources used. |
boolean |
hasNext()
Returns true if there are more objects in the cursor, i.e. |
boolean |
isOpen()
Returns true if the cursor is open. |
E |
next()
Returns the current objects and moves the cursor to the next object. |
int |
size()
Returns the number of objects in the cursor. |
| Method Detail |
|---|
boolean isOpen()
throws KAON2Exception
true if the cursor is open.
true if the cursor is open
KAON2Exception - thrown if there is an error
int size()
throws KAON2Exception
KAON2Exception - thrown if there is an error
E next()
throws KAON2Exception
KAON2Exception - thrown if there is an error (e.g. there is no next object)
boolean hasNext()
throws KAON2Exception
true if there are more objects in the cursor, i.e.
if next() can safely be called without returning an error.
true if there are more objects in the cursor
KAON2Exception - thrown if there is an error
void close()
throws KAON2Exception
KAON2Exception - thrown if there is an error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||