Top Description Fields Constructors Methods
org.eclipse.persistence.queries

public Class CursoredStreamPolicy

extends CursorPolicy
Class Inheritance
Imports
org.eclipse.persistence.internal.databaseaccess.*, org.eclipse.persistence.internal.sessions.AbstractSession, org.eclipse.persistence.exceptions.*, org.eclipse.persistence.sessions.remote.*

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

Responsibilities: Execute the cursored read and build the stream.

Author
James Sutherland
Since
TOPLink/Java 1.2

Field Summary

Modifier and TypeField and Description
protected int
protected ValueReadQuery
Inherited from org.eclipse.persistence.queries.CursorPolicy:
pageSizequery

Constructor Summary

AccessConstructor and Description
public
CursoredStreamPolicy()

default constructor

public
CursoredStreamPolicy(ReadQuery query, int pageSize)

set the initial read size to match the page size

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

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

Method Summary

Modifier and TypeMethod and Description
public Object
execute()

Implements abstract org.eclipse.persistence.queries.CursorPolicy.execute.

INTERNAL: Execute the cursored select and build the stream.
public int
getInitialReadSize()

Specifies the number of elements to be read initially into a cursored stream.

public ValueReadQuery
getSizeQuery()

Return the query used to read the size.

public boolean
hasSizeQuery()

INTERNAL: Return if a custom size query is defined.

public boolean
public void
prepare(DatabaseQuery query, AbstractSession session)

Overrides org.eclipse.persistence.queries.CursorPolicy.prepare.

INTERNAL: Prepare and validate.
public Object
remoteExecute()

Implements abstract org.eclipse.persistence.queries.CursorPolicy.remoteExecute.

INTERNAL: Execute the cursored select and build the stream.
public void
setInitialReadSize(int initialReadSize)

Specifies the number of elements to be read initially into a cursored stream

public void
setSizeQuery(ValueReadQuery sizeQuery)

Set the query used to read the size.

Inherited from org.eclipse.persistence.queries.CursorPolicy:
clonecreateChangeEventgetPageSizegetQueryhasNextisCursorPolicyiteratorFornextoverridesReadsetPageSizesetQuerysizeFortoStringInfo

Field Detail

initialReadSizeback to summary
protected int initialReadSize
sizeQueryback to summary
protected ValueReadQuery sizeQuery

Constructor Detail

CursoredStreamPolicyback to summary
public CursoredStreamPolicy()

default constructor

CursoredStreamPolicyback to summary
public CursoredStreamPolicy(ReadQuery query, int pageSize)

set the initial read size to match the page size

CursoredStreamPolicyback to summary
public CursoredStreamPolicy(ReadQuery query, int initialReadSize, int pageSize)
CursoredStreamPolicyback to summary
public CursoredStreamPolicy(ReadQuery query, int initialReadSize, int pageSize, ValueReadQuery sizeQuery)

Method Detail

executeback to summary
public Object execute()

Implements abstract org.eclipse.persistence.queries.CursorPolicy.execute.

INTERNAL: Execute the cursored select and build the stream.

Annotations
@Override
getInitialReadSizeback to summary
public int getInitialReadSize()

Specifies the number of elements to be read initially into a cursored stream.

getSizeQueryback to summary
public ValueReadQuery getSizeQuery()

Return the query used to read the size. This is required for SQL read queries.

hasSizeQueryback to summary
public boolean hasSizeQuery()

INTERNAL: Return if a custom size query is defined.

isCursoredStreamPolicyback to summary
public boolean isCursoredStreamPolicy()

Overrides org.eclipse.persistence.internal.queries.ContainerPolicy.isCursoredStreamPolicy.

Annotations
@Override
prepareback to summary
public void prepare(DatabaseQuery query, AbstractSession session) throws QueryException

Overrides org.eclipse.persistence.queries.CursorPolicy.prepare.

INTERNAL: Prepare and validate.

Annotations
@Override
remoteExecuteback to summary
public Object remoteExecute()

Implements abstract org.eclipse.persistence.queries.CursorPolicy.remoteExecute.

INTERNAL: Execute the cursored select and build the stream.

Annotations
@Override
setInitialReadSizeback to summary
public void setInitialReadSize(int initialReadSize)

Specifies the number of elements to be read initially into a cursored stream

setSizeQueryback to summary
public void setSizeQuery(ValueReadQuery sizeQuery)

Set the query used to read the size. This is required for SQL read queries.