EclipseLink 1.1.4, build 'v20100812-r7860' API Reference

org.eclipse.persistence.queries
Class CursoredStreamPolicy

java.lang.Object
  extended by org.eclipse.persistence.internal.queries.ContainerPolicy
      extended by org.eclipse.persistence.queries.CursorPolicy
          extended by org.eclipse.persistence.queries.CursoredStreamPolicy
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class CursoredStreamPolicy
extends CursorPolicy

Purpose: Used to support cursored streams in a read query.

Responsibilities: Execute the cursored read and build the stream.

See Also:
Serialized Form
Author:
James Sutherland
Since:
TOPLink/Java 1.2

Field Summary
protected  int initialReadSize
           
protected  ValueReadQuery sizeQuery
           
 
Fields inherited from class org.eclipse.persistence.queries.CursorPolicy
pageSize, query
 
Fields inherited from class org.eclipse.persistence.internal.queries.ContainerPolicy
constructor, defaultContainerClass, elementDescriptor
 
Constructor Summary
CursoredStreamPolicy()
          default constructor
CursoredStreamPolicy(ReadQuery query, int pageSize)
          set the initial read size to match the page size
CursoredStreamPolicy(ReadQuery query, int initialReadSize, int pageSize)
           
CursoredStreamPolicy(ReadQuery query, int initialReadSize, int pageSize, ValueReadQuery sizeQuery)
           
 
Method Summary
 java.lang.Object execute()
          INTERNAL: Execute the cursored select and build the stream.
 int getInitialReadSize()
          Specifies the number of elements to be read initially into a cursored stream.
 ValueReadQuery getSizeQuery()
          Return the query used to read the size.
 boolean hasSizeQuery()
          INTERNAL: Return if a custom size query is defined.
 boolean isCursoredStreamPolicy()
           
 void prepare(DatabaseQuery query, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Prepare and validate.
 java.lang.Object remoteExecute()
          INTERNAL: Execute the cursored select and build the stream.
 void setInitialReadSize(int initialReadSize)
          Specifies the number of elements to be read initially into a cursored stream
 void setSizeQuery(ValueReadQuery sizeQuery)
          Set the query used to read the size.
 
Methods inherited from class org.eclipse.persistence.queries.CursorPolicy
clone, getPageSize, getQuery, hasNext, isCursorPolicy, iteratorFor, next, overridesRead, setPageSize, setQuery, sizeFor, toStringInfo
 
Methods inherited from class org.eclipse.persistence.internal.queries.ContainerPolicy
addInto, addInto, addInto, addIntoWithOrder, addIntoWithOrder, addIntoWithOrder, buildContainerFromVector, buildDefaultPolicy, buildPolicyFor, buildPolicyFor, clear, clone, cloneFor, compareCollectionsForChange, compareKeys, concatenateContainers, containerInstance, containerInstance, contains, contains, containsKey, convertClassNamesToClasses, equals, getConstructor, getContainerClass, getContainerClassName, getDefaultContainerClass, getElementDescriptor, hasElementDescriptor, hasOrder, initializeConstructor, isCollectionPolicy, isDirectMapPolicy, isEmpty, isListPolicy, isMapPolicy, isScrollableCursorPolicy, isValidContainer, isValidContainerType, keyFrom, mergeCascadeParts, mergeChanges, next, prepareForExecution, recordAddToCollectionInChangeRecord, recordRemoveFromCollectionInChangeRecord, recordUpdateToCollectionInChangeRecord, removeAllElements, removeFrom, removeFrom, removeFrom, removeFromWithOrder, setConstructor, setContainerClass, setContainerClassName, setDefaultContainerClass, setElementDescriptor, setKeyName, setKeyName, toString, validateElementAndRehashIfRequired, vectorFor
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

initialReadSize

protected int initialReadSize

sizeQuery

protected ValueReadQuery sizeQuery
Constructor Detail

CursoredStreamPolicy

public CursoredStreamPolicy()
default constructor


CursoredStreamPolicy

public CursoredStreamPolicy(ReadQuery query,
                            int pageSize)
set the initial read size to match the page size


CursoredStreamPolicy

public CursoredStreamPolicy(ReadQuery query,
                            int initialReadSize,
                            int pageSize)

CursoredStreamPolicy

public CursoredStreamPolicy(ReadQuery query,
                            int initialReadSize,
                            int pageSize,
                            ValueReadQuery sizeQuery)
Method Detail

execute

public java.lang.Object execute()
INTERNAL: Execute the cursored select and build the stream.

Specified by:
execute in class CursorPolicy

getInitialReadSize

public int getInitialReadSize()
Specifies the number of elements to be read initially into a cursored stream.


getSizeQuery

public ValueReadQuery getSizeQuery()
Return the query used to read the size. This is required for SQL read queries.


hasSizeQuery

public boolean hasSizeQuery()
INTERNAL: Return if a custom size query is defined.


isCursoredStreamPolicy

public boolean isCursoredStreamPolicy()
Overrides:
isCursoredStreamPolicy in class org.eclipse.persistence.internal.queries.ContainerPolicy

prepare

public void prepare(DatabaseQuery query,
                    org.eclipse.persistence.internal.sessions.AbstractSession session)
             throws QueryException
INTERNAL: Prepare and validate.

Overrides:
prepare in class CursorPolicy
Throws:
QueryException

remoteExecute

public java.lang.Object remoteExecute()
INTERNAL: Execute the cursored select and build the stream.

Specified by:
remoteExecute in class CursorPolicy

setInitialReadSize

public void setInitialReadSize(int initialReadSize)
Specifies the number of elements to be read initially into a cursored stream


setSizeQuery

public void setSizeQuery(ValueReadQuery sizeQuery)
Set the query used to read the size. This is required for SQL read queries.


EclipseLink 1.1.4, build 'v20100812-r7860' API Reference