Purpose: Abstract class for CursoredStream and ScrolableCursor
| Modifier and Type | Field and Description |
|---|---|
| protected transient AbstractSession | executionSession
The root session that executed the call for the query. |
| protected transient Vector | fields
The fields expected in the result set. |
| protected Map | initiallyConformingIndex
Conforming instances found in memory when building the result. |
| protected AbstractRecord | nextRow
Store the next row, for 1-m joining. |
| protected List | objectCollection
Internal collection of objects. |
| public transient CursorPolicy | policy
Query policy that initialize the stream. |
| protected int | position
Current position in the objectCollection of the stream. |
| public transient ReadQuery | query
Read query that initialize the stream. |
| protected transient ResultSet | resultSet
The result set (cursor) that holds the handle to the database that the results are read from. |
| protected Expression | selectionCriteriaClone
SelectionCriteria & translation row ready for incremental conforming. |
| protected transient AbstractSession | session
The session that executed the query for the stream. |
| protected int | size
Cached size of the stream. |
| protected transient Statement | statement
The preparedStatement that holds the handle to the database that the results are read from. |
| protected AbstractRecord |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected Object | buildAndRegisterObject(AbstractRecord row)
INTERNAL: builds and registers an object from a row for cursors. |
| public void | |
| public void | |
| protected void | |
| public DatabaseAccessor | |
| protected abstract int | getCursorSize()
INTERNAL: Retrieve the size of the open cursor by executing a count on the same query as the cursor. |
| public AbstractSession | |
| public Vector | |
| public Map | getInitiallyConformingIndex()
INTERNAL: Conforming instances found in memory when building the result. |
| public List | |
| public int | |
| public CursorPolicy | |
| public abstract int | |
| public ReadQuery | |
| public ResultSet | |
| public Expression | getSelectionCriteriaClone()
INTERNAL: The clone of the selection criteria is needed for in-memory conforming each object read from the Cursor. |
| public AbstractSession | |
| protected Statement | |
| protected AbstractRecord | getTranslationRow()
INTERNAL: Gets the translation row the query was executed with, used for incremental conforming. |
| public boolean | |
| public void | |
| protected abstract Object | |
| protected void | setExecutionSession(AbstractSession executionSession)
INTERNAL: Sets the session the underlying call was executed on. |
| protected void | |
| public void | setInitiallyConformingIndex(Map<Object, Object> index)
INTERNAL: Conforming instances found in memory when building the result. |
| public void | |
| public void | |
| protected void | |
| protected void | |
| public void | setSelectionCriteriaClone(Expression expression)
INTERNAL: The clone of the selection criteria is needed for in-memory conforming each object read from the Cursor. |
| public void | |
| public void | |
| public void | setTranslationRow(AbstractRecord row)
INTERNAL: Sets the translation row this query was executed with. |
| public int | size()
PUBLIC: Retrieve the size of the open cursor by executing a count on the same query as the cursor. |
| executionSession | back to summary |
|---|---|
| protected transient AbstractSession executionSession The root session that executed the call for the query. Knows the database platform. | |
| fields | back to summary |
|---|---|
| protected transient Vector<DatabaseField> fields The fields expected in the result set. | |
| initiallyConformingIndex | back to summary |
|---|---|
| protected Map<Object, Object> initiallyConformingIndex Conforming instances found in memory when building the result. | |
| nextRow | back to summary |
|---|---|
| protected AbstractRecord nextRow Store the next row, for 1-m joining. | |
| objectCollection | back to summary |
|---|---|
| protected List<Object> objectCollection Internal collection of objects. | |
| policy | back to summary |
|---|---|
| public transient CursorPolicy policy Query policy that initialize the stream. | |
| position | back to summary |
|---|---|
| protected int position Current position in the objectCollection of the stream. | |
| query | back to summary |
|---|---|
| public transient ReadQuery query Read query that initialize the stream. | |
| resultSet | back to summary |
|---|---|
| protected transient ResultSet resultSet The result set (cursor) that holds the handle to the database that the results are read from. | |
| selectionCriteriaClone | back to summary |
|---|---|
| protected Expression selectionCriteriaClone SelectionCriteria & translation row ready for incremental conforming. | |
| session | back to summary |
|---|---|
| protected transient AbstractSession session The session that executed the query for the stream. | |
| size | back to summary |
|---|---|
| protected int size Cached size of the stream. | |
| statement | back to summary |
|---|---|
| protected transient Statement statement The preparedStatement that holds the handle to the database that the results are read from. | |
| translationRow | back to summary |
|---|---|
| protected AbstractRecord translationRow | |
| Cursor | back to summary |
|---|---|
| protected Cursor() INTERNAL: Default constructor. | |
| Cursor | back to summary |
|---|---|
| protected Cursor(DatabaseCall call, CursorPolicy policy) INTERNAL: | |
| buildAndRegisterObject | back to summary |
|---|---|
| protected Object buildAndRegisterObject(AbstractRecord row) INTERNAL: builds and registers an object from a row for cursors. Behavior is different from the query version in that refreshing is not supported. | |
| clear | back to summary |
|---|---|
| public void clear() PUBLIC: Release all objects read in so far. This should be performed when reading in a large collection of objects in order to preserve memory. | |
| close | back to summary |
|---|---|
| public void close() throws DatabaseException PUBLIC: Closes the stream. This should be performed whenever the user has finished with the stream. | |
| finalize | back to summary |
|---|---|
| protected void finalize() throws DatabaseException Overrides java. Close in case not closed.
| |
| getAccessor | back to summary |
|---|---|
| public DatabaseAccessor getAccessor() INTERNAL: Return the accessor associated with the cursor. | |
| getCursorSize | back to summary |
|---|---|
| protected abstract int getCursorSize() throws DatabaseException, QueryException INTERNAL: Retrieve the size of the open cursor by executing a count on the same query as the cursor. | |
| getExecutionSession | back to summary |
|---|---|
| public AbstractSession getExecutionSession() INTERNAL: Returns the session the underlying call was executed on. This root session knows the database platform. | |
| getFields | back to summary |
|---|---|
| public Vector INTERNAL: Return the fields for the stream. | |
| getInitiallyConformingIndex | back to summary |
|---|---|
| public Map INTERNAL: Conforming instances found in memory when building the result. These objects are returned first by the cursor, and a fast lookup is needed to make sure the same objects appearing in the cursor are filtered out. | |
| getObjectCollection | back to summary |
|---|---|
| public List INTERNAL: Return the internal object collection that stores the objects. | |
| getPageSize | back to summary |
|---|---|
| public int getPageSize() INTERNAL: Return the number of items to be faulted in for the stream. | |
| getPolicy | back to summary |
|---|---|
| public CursorPolicy getPolicy() INTERNAL: Return the cursor policy. | |
| getPosition | back to summary |
|---|---|
| public abstract int getPosition() INTERNAL: Return the position of the stream inside the object collection. | |
| getQuery | back to summary |
|---|---|
| public ReadQuery getQuery() INTERNAL: Return the query associated with the stream. | |
| getResultSet | back to summary |
|---|---|
| public ResultSet getResultSet() INTERNAL: Return the result set (cursor). | |
| getSelectionCriteriaClone | back to summary |
|---|---|
| public Expression getSelectionCriteriaClone() INTERNAL: The clone of the selection criteria is needed for in-memory conforming each object read from the Cursor. | |
| getSession | back to summary |
|---|---|
| public AbstractSession getSession() INTERNAL: Return the handle to the session | |
| getStatement | back to summary |
|---|---|
| protected Statement getStatement() INTERNAL: Return the Statement. | |
| getTranslationRow | back to summary |
|---|---|
| protected AbstractRecord getTranslationRow() INTERNAL: Gets the translation row the query was executed with, used for incremental conforming. | |
| isClosed | back to summary |
|---|---|
| public boolean isClosed() PUBLIC: Return if the stream is closed. | |
| remove | back to summary |
|---|---|
| public void remove() throws QueryException Overrides default java. PUBLIC: Remove is not support with cursors.
| |
| retrieveNextObject | back to summary |
|---|---|
| protected abstract Object retrieveNextObject() throws DatabaseException INTERNAL: Read the next row from the result set. | |
| setExecutionSession | back to summary |
|---|---|
| protected void setExecutionSession(AbstractSession executionSession) INTERNAL: Sets the session the underlying call was executed on. This root session knows the database platform. | |
| setFields | back to summary |
|---|---|
| protected void setFields(Vector<DatabaseField> fields) INTERNAL: Set the fields for the stream. | |
| setInitiallyConformingIndex | back to summary |
|---|---|
| public void setInitiallyConformingIndex(Map<Object, Object> index) INTERNAL: Conforming instances found in memory when building the result. These objects are returned first by the cursor, and a fast lookup is needed to make sure the same objects appearing in the cursor are filtered out. | |
| setObjectCollection | back to summary |
|---|---|
| public void setObjectCollection(List<Object> collection) INTERNAL: Set the internal object collection | |
| setPolicy | back to summary |
|---|---|
| public void setPolicy(CursorPolicy policy) INTERNAL: Set the cursor policy. | |
| setPosition | back to summary |
|---|---|
| protected void setPosition(int value) INTERNAL: Set the current position of the stream | |
| setResultSet | back to summary |
|---|---|
| protected void setResultSet(ResultSet result) INTERNAL: Set the result set (cursor) | |
| setSelectionCriteriaClone | back to summary |
|---|---|
| public void setSelectionCriteriaClone(Expression expression) INTERNAL: The clone of the selection criteria is needed for in-memory conforming each object read from the Cursor. | |
| setSession | back to summary |
|---|---|
| public void setSession(AbstractSession databaseSession) INTERNAL: Set the session handle | |
| setSize | back to summary |
|---|---|
| public void setSize(int size) INTERNAL: Set the cache size | |
| setTranslationRow | back to summary |
|---|---|
| public void setTranslationRow(AbstractRecord row) INTERNAL: Sets the translation row this query was executed with. Used for incremental conforming. | |
| size | back to summary |
|---|---|
| public int size() throws DatabaseException PUBLIC: Retrieve the size of the open cursor by executing a count on the same query as the cursor. If this cursor is conforming size() can only be an estimate. cursor size plus number of conforming instances found in memory will be returned. The union (actual result) may be smaller than this. | |