| 
 | EclipseLink 2.3.2, build 'v20111125-r10461' API Reference | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.persistence.queries.Cursor
public abstract class Cursor
Purpose: Abstract class for CursoredStream and ScrolableCursor
| Field Summary | |
|---|---|
| protected  org.eclipse.persistence.internal.sessions.AbstractSession | executionSessionThe root session that executed the call for the query. | 
| protected  java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> | fieldsThe fields expected in the result set. | 
| protected  java.util.Map<java.lang.Object,java.lang.Object> | initiallyConformingIndexConforming instances found in memory when building the result. | 
| protected  org.eclipse.persistence.internal.sessions.AbstractRecord | nextRowStore the next row, for 1-m joining. | 
| protected  java.util.List<java.lang.Object> | objectCollectionInternal collection of objects. | 
|  CursorPolicy | policyQuery policy that initialize the stream. | 
| protected  int | positionCurrent position in the objectCollection of the stream. | 
|  ReadQuery | queryRead query that initialize the stream. | 
| protected  java.sql.ResultSet | resultSetThe result set (cursor) that holds the handle to the database that the results are read from. | 
| protected  Expression | selectionCriteriaCloneSelectionCriteria & translation row ready for incremental conforming. | 
| protected  org.eclipse.persistence.internal.sessions.AbstractSession | sessionThe session that executed the query for the stream. | 
| protected  int | sizeCached size of the stream. | 
| protected  java.sql.Statement | statementThe preparedStatement that holds the handle to the database that the results are read from. | 
| protected  org.eclipse.persistence.internal.sessions.AbstractRecord | translationRow | 
| Constructor Summary | |
|---|---|
| Cursor()INTERNAL: Default constructor. | |
| Cursor(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call,
       CursorPolicy policy)INTERNAL: | |
| Method Summary | |
|---|---|
| protected  java.lang.Object | buildAndRegisterObject(org.eclipse.persistence.internal.sessions.AbstractRecord row)INTERNAL: builds and registers an object from a row for cursors. | 
|  void | clear()PUBLIC: Release all objects read in so far. | 
|  void | close()PUBLIC: Closes the stream. | 
| protected  void | finalize()Close in case not closed. | 
|  org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor | getAccessor()INTERNAL: Return the accessor associated with the cursor. | 
| protected abstract  int | getCursorSize()INTERNAL: Retrieve the size of the open cursor by executing a count on the same query as the cursor. | 
|  org.eclipse.persistence.internal.sessions.AbstractSession | getExecutionSession()INTERNAL: Returns the session the underlying call was executed on. | 
|  java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> | getFields()INTERNAL: Return the fields for the stream. | 
|  java.util.Map<java.lang.Object,java.lang.Object> | getInitiallyConformingIndex()INTERNAL: Conforming instances found in memory when building the result. | 
|  java.util.List<java.lang.Object> | getObjectCollection()INTERNAL: Return the internal object collection that stores the objects. | 
|  int | getPageSize()INTERNAL: Return the number of items to be faulted in for the stream. | 
|  CursorPolicy | getPolicy()INTERNAL: Return the cursor policy. | 
| abstract  int | getPosition()INTERNAL: Return the position of the stream inside the object collection. | 
|  ReadQuery | getQuery()INTERNAL: Return the query associated with the stream. | 
|  java.sql.ResultSet | getResultSet()INTERNAL: Return the result set (cursor). | 
|  Expression | getSelectionCriteriaClone()INTERNAL: The clone of the selection criteria is needed for in-memory conforming each object read from the Cursor. | 
|  org.eclipse.persistence.internal.sessions.AbstractSession | getSession()INTERNAL: Return the handle to the session | 
| protected  java.sql.Statement | getStatement()INTERNAL: Return the Statement. | 
| protected  org.eclipse.persistence.internal.sessions.AbstractRecord | getTranslationRow()INTERNAL: Gets the translation row the query was executed with, used for incremental conforming. | 
|  boolean | isClosed()PUBLIC: Return if the stream is closed. | 
|  void | remove()PUBLIC: Remove is not support with cursors. | 
| protected abstract  java.lang.Object | retrieveNextObject()INTERNAL: Read the next row from the result set. | 
| protected  void | setExecutionSession(org.eclipse.persistence.internal.sessions.AbstractSession executionSession)INTERNAL: Sets the session the underlying call was executed on. | 
| protected  void | setFields(java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> fields)INTERNAL: Set the fields for the stream. | 
|  void | setInitiallyConformingIndex(java.util.Map<java.lang.Object,java.lang.Object> index)INTERNAL: Conforming instances found in memory when building the result. | 
|  void | setObjectCollection(java.util.List<java.lang.Object> collection)INTERNAL: Set the internal object collection | 
|  void | setPolicy(CursorPolicy policy)INTERNAL: Set the cursor policy. | 
| protected  void | setPosition(int value)INTERNAL: Set the current position of the stream | 
| protected  void | setResultSet(java.sql.ResultSet result)INTERNAL: Set the result set (cursor) | 
|  void | setSelectionCriteriaClone(Expression expression)INTERNAL: The clone of the selection criteria is needed for in-memory conforming each object read from the Cursor. | 
|  void | setSession(org.eclipse.persistence.internal.sessions.AbstractSession databaseSession)INTERNAL: Set the session handle | 
|  void | setSize(int size)INTERNAL: Set the cache size | 
|  void | setTranslationRow(org.eclipse.persistence.internal.sessions.AbstractRecord row)INTERNAL: Sets the translation row this query was executed with. | 
|  int | size()PUBLIC: Retrieve the size of the open cursor by executing a count on the same query as the cursor. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface java.util.Enumeration | 
|---|
| hasMoreElements, nextElement | 
| Methods inherited from interface java.util.Iterator | 
|---|
| hasNext, next | 
| Field Detail | 
|---|
protected transient java.sql.Statement statement
protected transient java.sql.ResultSet resultSet
protected transient org.eclipse.persistence.internal.sessions.AbstractSession session
protected transient org.eclipse.persistence.internal.sessions.AbstractSession executionSession
protected transient java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> fields
protected int size
public transient ReadQuery query
public transient CursorPolicy policy
protected java.util.List<java.lang.Object> objectCollection
protected java.util.Map<java.lang.Object,java.lang.Object> initiallyConformingIndex
protected Expression selectionCriteriaClone
protected org.eclipse.persistence.internal.sessions.AbstractRecord translationRow
protected org.eclipse.persistence.internal.sessions.AbstractRecord nextRow
protected int position
| Constructor Detail | 
|---|
public Cursor()
public Cursor(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call,
              CursorPolicy policy)
| Method Detail | 
|---|
public void close()
           throws DatabaseException
DatabaseException
protected void finalize()
                 throws DatabaseException
finalize in class java.lang.ObjectDatabaseExceptionpublic org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor getAccessor()
protected abstract int getCursorSize()
                              throws DatabaseException,
                                     QueryException
DatabaseException
QueryExceptionpublic java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> getFields()
public java.util.Map<java.lang.Object,java.lang.Object> getInitiallyConformingIndex()
public java.util.List<java.lang.Object> getObjectCollection()
public int getPageSize()
public CursorPolicy getPolicy()
public abstract int getPosition()
public ReadQuery getQuery()
public java.sql.ResultSet getResultSet()
public Expression getSelectionCriteriaClone()
public org.eclipse.persistence.internal.sessions.AbstractSession getSession()
public org.eclipse.persistence.internal.sessions.AbstractSession getExecutionSession()
protected java.sql.Statement getStatement()
protected org.eclipse.persistence.internal.sessions.AbstractRecord getTranslationRow()
public boolean isClosed()
protected java.lang.Object buildAndRegisterObject(org.eclipse.persistence.internal.sessions.AbstractRecord row)
protected abstract java.lang.Object retrieveNextObject()
                                                throws DatabaseException
DatabaseExceptionprotected void setFields(java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> fields)
public void setInitiallyConformingIndex(java.util.Map<java.lang.Object,java.lang.Object> index)
public void setObjectCollection(java.util.List<java.lang.Object> collection)
public void setPolicy(CursorPolicy policy)
protected void setPosition(int value)
protected void setResultSet(java.sql.ResultSet result)
public void setSelectionCriteriaClone(Expression expression)
public void setSession(org.eclipse.persistence.internal.sessions.AbstractSession databaseSession)
protected void setExecutionSession(org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
public void setSize(int size)
public void setTranslationRow(org.eclipse.persistence.internal.sessions.AbstractRecord row)
public int size()
         throws DatabaseException
DatabaseException
public void remove()
            throws QueryException
remove in interface java.util.IteratorQueryExceptionpublic void clear()
| 
 | EclipseLink 2.3.2, build 'v20111125-r10461' API Reference | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||