|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.queries.Cursor org.eclipse.persistence.queries.ScrollableCursor
public class ScrollableCursor
Field Summary | |
---|---|
protected java.lang.Object |
nextObject
|
protected java.lang.Object |
previousObject
|
protected org.eclipse.persistence.internal.sessions.AbstractRecord |
previousRow
Store the previous row, for 1-m joining. |
Fields inherited from class org.eclipse.persistence.queries.Cursor |
---|
executionSession, fields, initiallyConformingIndex, nextRow, objectCollection, policy, position, query, resultSet, selectionCriteriaClone, session, size, statement, translationRow |
Constructor Summary | |
---|---|
ScrollableCursor()
INTERNAL: Default constructor. |
|
ScrollableCursor(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call,
ScrollableCursorPolicy policy)
INTERNAL: constructor. |
Method Summary | |
---|---|
boolean |
absolute(int rows)
PUBLIC: Moves the cursor to the given row number in the result set |
void |
add(java.lang.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 cache next and previous 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 java.lang.Object |
getNextObject()
|
int |
getPosition()
PUBLIC: Retrieves the current cursor position (current row). |
protected java.lang.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. |
java.lang.Object |
next()
PUBLIC: This method differs slightly from conventional read() operation on a Java stream. |
java.util.List<java.lang.Object> |
next(int number)
PUBLIC: This method differs slightly from conventional read() operation on a Java stream. |
java.lang.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) |
java.lang.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 java.lang.Object |
retrieveNextObject()
INTERNAL: Read the next row from the result set. |
protected java.lang.Object |
retrievePreviousObject()
INTERNAL: CR#4139 Read the previous row from the result set. |
void |
set(java.lang.Object object)
PUBLIC: Set is not supported for scrollable cursors. |
protected void |
setNextObject(java.lang.Object nextObject)
|
protected void |
setPreviousObject(java.lang.Object previousObject)
|
Methods inherited from class org.eclipse.persistence.queries.Cursor |
---|
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, size |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.ListIterator |
---|
remove |
Field Detail |
---|
protected transient java.lang.Object nextObject
protected transient java.lang.Object previousObject
protected org.eclipse.persistence.internal.sessions.AbstractRecord previousRow
Constructor Detail |
---|
public ScrollableCursor()
public ScrollableCursor(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call, ScrollableCursorPolicy policy)
Method Detail |
---|
public boolean absolute(int rows) throws DatabaseException
DatabaseException
public void add(java.lang.Object object) throws QueryException
add
in interface java.util.ListIterator
QueryException
public void afterLast() throws DatabaseException
DatabaseException
public void beforeFirst() throws DatabaseException
DatabaseException
protected void clearNextAndPrevious()
public int currentIndex() throws DatabaseException
DatabaseException
public boolean first() throws DatabaseException
DatabaseException
protected int getCursorSize() throws DatabaseException
getCursorSize
in class Cursor
DatabaseException
protected int getKnownCursorSize()
protected java.lang.Object getNextObject()
public int getPosition() throws DatabaseException
getPosition
in class Cursor
java.sql.SQLException
- if a database access error occurs
DatabaseException
protected java.lang.Object getPreviousObject()
public boolean hasMoreElements() throws DatabaseException
hasMoreElements
in interface java.util.Enumeration
DatabaseException
public boolean hasNext() throws DatabaseException
hasNext
in interface java.util.Iterator
hasNext
in interface java.util.ListIterator
DatabaseException
public boolean hasNextElement() throws DatabaseException
DatabaseException
public boolean hasPrevious() throws DatabaseException
hasPrevious
in interface java.util.ListIterator
DatabaseException
public boolean isAfterLast() throws DatabaseException
DatabaseException
public boolean isBeforeFirst() throws DatabaseException
DatabaseException
public boolean isFirst() throws DatabaseException
DatabaseException
public boolean isLast() throws DatabaseException
DatabaseException
public boolean last() throws DatabaseException
DatabaseException
protected void loadNext()
protected void loadPrevious()
public java.lang.Object next() throws DatabaseException, QueryException
next
in interface java.util.Iterator
next
in interface java.util.ListIterator
-
- throws exception if read pass end of stream
DatabaseException
QueryException
public java.util.List<java.lang.Object> next(int number) throws DatabaseException
number
- - number of objects to be returned
-
- throws exception if read pass end of stream
DatabaseException
public java.lang.Object nextElement() throws DatabaseException, QueryException
nextElement
in interface java.util.Enumeration
DatabaseException
QueryException
public int nextIndex() throws DatabaseException
nextIndex
in interface java.util.ListIterator
DatabaseException
public java.lang.Object previous() throws DatabaseException, QueryException
previous
in interface java.util.ListIterator
-
- throws exception if read pass first of stream
DatabaseException
QueryException
public int previousIndex() throws DatabaseException
previousIndex
in interface java.util.ListIterator
DatabaseException
public boolean relative(int rows) throws DatabaseException
DatabaseException
protected java.lang.Object retrieveNextObject() throws DatabaseException
retrieveNextObject
in class Cursor
DatabaseException
protected java.lang.Object retrievePreviousObject() throws DatabaseException
DatabaseException
public void set(java.lang.Object object) throws QueryException
set
in interface java.util.ListIterator
QueryException
protected void setNextObject(java.lang.Object nextObject)
protected void setPreviousObject(java.lang.Object previousObject)
|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |