public class ScrollableCursor extends Cursor implements ListIterator
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
atEndOfCursor
Internal flag indicating if the end of the cursor has been reached
|
protected Object |
nextObject |
protected Object |
previousObject |
protected org.eclipse.persistence.internal.sessions.AbstractRecord |
previousRow
Store the previous row, for 1-m joining.
|
executionSession, fields, initiallyConformingIndex, nextRow, objectCollection, policy, position, query, resultSet, selectionCriteriaClone, session, size, statement, translationRow| Constructor and Description |
|---|
ScrollableCursor()
INTERNAL:
Default constructor.
|
ScrollableCursor(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call,
ScrollableCursorPolicy policy)
INTERNAL:
constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
absolute(int rows)
PUBLIC:
Moves the cursor to the given row number in the result set
|
void |
add(Object object)
PUBLIC:
Add is not support for scrollable cursors.
|
void |
afterLast()
PUBLIC:
Moves the cursor to the end of the result set, just after the last row.
|
void |
beforeFirst()
PUBLIC:
Moves the cursor to the front of the result set, just before the first row
|
protected void |
clearNextAndPrevious()
INTERNAL:
Clear the cached next and previous object and row values.
|
protected void |
clearNextAndPreviousObject()
INTERNAL:
Clear only the cached next and previous object values.
|
int |
currentIndex()
PUBLIC:
Retrieves the current row index number
|
boolean |
first()
PUBLIC:
Moves the cursor to the first row in the result set
|
protected int |
getCursorSize()
INTERNAL:
Retrieve the size of the open cursor by executing a count on the same query as the cursor.
|
protected int |
getKnownCursorSize() |
protected Object |
getNextObject() |
int |
getPosition()
PUBLIC:
Retrieves the current cursor position (current row).
|
protected Object |
getPreviousObject() |
boolean |
hasMoreElements()
PUBLIC:
Indicates whether the cursor can move to the the next row
|
boolean |
hasNext()
PUBLIC:
Indicates whether the cursor can move to the the next row
|
boolean |
hasNextElement()
PUBLIC:
Indicates whether the cursor can move to the the next row
|
boolean |
hasPrevious()
PUBLIC:
Indicates whether the cursor can move to the the previous row
|
boolean |
isAfterLast()
PUBLIC:
Indicates whether the cursor is after the last row in the result set.
|
boolean |
isBeforeFirst()
PUBLIC:
Indicates whether the cursor is before the first row in the result set.
|
boolean |
isFirst()
PUBLIC:
Indicates whether the cursor is on the first row of the result set.
|
boolean |
isLast()
PUBLIC:
Indicates whether the cursor is on the last row of the result set.
|
boolean |
last()
PUBLIC:
Moves the cursor to the last row in the result set
|
protected void |
loadNext()
Load the next object
|
protected void |
loadPrevious()
Load the previous object.
|
Object |
next()
PUBLIC:
This method differs slightly from conventional read() operation on a Java stream.
|
List<Object> |
next(int number)
PUBLIC:
This method differs slightly from conventional read() operation on a Java stream.
|
Object |
nextElement()
PUBLIC:
Return the next object from the collection, if beyond the read limit read from the cursor.
|
int |
nextIndex()
PUBLIC:
Retrieves the next row index (against the current row)
|
Object |
previous()
PUBLIC:
Return the previous object from the collection.
|
int |
previousIndex()
PUBLIC:
Retrieves the previous row index (against the current row)
|
boolean |
relative(int rows)
PUBLIC:
Moves the cursor a relative number of rows, either positive or negative.
|
protected Object |
retrieveNextObject()
INTERNAL:
Read the next row from the result set.
|
protected Object |
retrievePreviousObject()
INTERNAL:
CR#4139
Read the previous row from the result set.
|
void |
set(Object object)
PUBLIC:
Set is not supported for scrollable cursors.
|
protected void |
setNextObject(Object nextObject) |
protected void |
setPreviousObject(Object previousObject) |
buildAndRegisterObject, clear, close, finalize, getAccessor, getExecutionSession, getFields, getInitiallyConformingIndex, getObjectCollection, getPageSize, getPolicy, getQuery, getResultSet, getSelectionCriteriaClone, getSession, getStatement, getTranslationRow, isClosed, remove, setExecutionSession, setFields, setInitiallyConformingIndex, setObjectCollection, setPolicy, setPosition, setResultSet, setSelectionCriteriaClone, setSession, setSize, setTranslationRow, sizeclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitremoveforEachRemainingprotected transient Object nextObject
protected transient Object previousObject
protected org.eclipse.persistence.internal.sessions.AbstractRecord previousRow
protected boolean atEndOfCursor
public ScrollableCursor()
public ScrollableCursor(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call,
ScrollableCursorPolicy policy)
public boolean absolute(int rows)
throws DatabaseException
DatabaseExceptionpublic void add(Object object) throws QueryException
add in interface ListIteratorQueryExceptionpublic void afterLast()
throws DatabaseException
DatabaseExceptionpublic void beforeFirst()
throws DatabaseException
DatabaseExceptionprotected void clearNextAndPrevious()
protected void clearNextAndPreviousObject()
public int currentIndex()
throws DatabaseException
DatabaseExceptionpublic boolean first()
throws DatabaseException
DatabaseExceptionprotected int getCursorSize()
throws DatabaseException
getCursorSize in class CursorDatabaseExceptionprotected int getKnownCursorSize()
protected Object getNextObject()
public int getPosition()
throws DatabaseException
getPosition in class CursorDatabaseException - if a database access error occursprotected Object getPreviousObject()
public boolean hasMoreElements()
throws DatabaseException
hasMoreElements in interface EnumerationDatabaseExceptionpublic boolean hasNext()
throws DatabaseException
hasNext in interface IteratorhasNext in interface ListIteratorDatabaseExceptionpublic boolean hasNextElement()
throws DatabaseException
DatabaseExceptionpublic boolean hasPrevious()
throws DatabaseException
hasPrevious in interface ListIteratorDatabaseExceptionpublic boolean isAfterLast()
throws DatabaseException
DatabaseExceptionpublic boolean isBeforeFirst()
throws DatabaseException
DatabaseExceptionpublic boolean isFirst()
throws DatabaseException
DatabaseExceptionpublic boolean isLast()
throws DatabaseException
DatabaseExceptionpublic boolean last()
throws DatabaseException
DatabaseExceptionprotected void loadNext()
protected void loadPrevious()
public Object next() throws DatabaseException, QueryException
next in interface Iteratornext in interface ListIteratorDatabaseException - if read pass end of streamQueryExceptionpublic List<Object> next(int number) throws DatabaseException
number - - number of objects to be returnedDatabaseException - if read pass end of streampublic Object nextElement() throws DatabaseException, QueryException
nextElement in interface EnumerationDatabaseExceptionQueryExceptionpublic int nextIndex()
throws DatabaseException
nextIndex in interface ListIteratorDatabaseExceptionpublic Object previous() throws DatabaseException, QueryException
previous in interface ListIteratorDatabaseException - if read pass first of streamQueryExceptionpublic int previousIndex()
throws DatabaseException
previousIndex in interface ListIteratorDatabaseExceptionpublic boolean relative(int rows)
throws DatabaseException
DatabaseExceptionprotected Object retrieveNextObject() throws DatabaseException
retrieveNextObject in class CursorDatabaseExceptionprotected Object retrievePreviousObject() throws DatabaseException
DatabaseExceptionpublic void set(Object object) throws QueryException
set in interface ListIteratorQueryExceptionprotected void setNextObject(Object nextObject)
protected void setPreviousObject(Object previousObject)
Copyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.