public abstract class Cursor
extends java.lang.Object
implements java.util.Enumeration, java.util.Iterator, java.io.Serializable
Purpose: Abstract class for CursoredStream and ScrolableCursor
Modifier and Type | Field and Description |
---|---|
CursorPolicy |
policy
Query policy that initialize the stream.
|
ReadQuery |
query
Read query that initialize the stream.
|
Constructor and Description |
---|
Cursor()
INTERNAL:
Default constructor.
|
Cursor(DatabaseCall call,
CursorPolicy policy)
INTERNAL:
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
PUBLIC:
Release all objects read in so far.
|
void |
close()
PUBLIC:
Closes the stream.
|
DatabaseAccessor |
getAccessor()
INTERNAL:
Return the accessor associated with the cursor.
|
AbstractSession |
getExecutionSession()
INTERNAL:
Returns the session the underlying call was executed on.
|
java.util.Vector<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.
|
AbstractSession |
getSession()
INTERNAL:
Return the handle to the session
|
boolean |
isClosed()
PUBLIC:
Return if the stream is closed.
|
void |
remove()
PUBLIC:
Remove is not support with cursors.
|
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.
|
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(AbstractSession databaseSession)
INTERNAL:
Set the session handle
|
void |
setSize(int size)
INTERNAL:
Set the cache size
|
void |
setTranslationRow(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.
|
public transient ReadQuery query
public transient CursorPolicy policy
public Cursor()
public Cursor(DatabaseCall call, CursorPolicy policy)
public void close() throws DatabaseException
DatabaseException
public DatabaseAccessor getAccessor()
public java.util.Vector<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 AbstractSession getSession()
public AbstractSession getExecutionSession()
public boolean isClosed()
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)
public void setSelectionCriteriaClone(Expression expression)
public void setSession(AbstractSession databaseSession)
public void setSize(int size)
public void setTranslationRow(AbstractRecord row)
public int size() throws DatabaseException
DatabaseException
public void remove() throws QueryException
remove
in interface java.util.Iterator
QueryException
public void clear()
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference