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

public Class ScrollableCursorPolicy

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

PUBLIC: ScrollableCursorPolicy allows for additional options to be specified for ReadAllQuery or DataReadQuery. These options are passed through to the JDBC result set, the JDBC driver must support JDBC2 scrolling cursors and the options used. Example:

ScrollableCursorPolicy policy = new ScrollableCursorPolicy()

policy.setResultSetType(ScrollableCursorPolicy.TYPE_SCROLL_INSENSITIVE);

query.useScrollableCursor(policy);

Field Summary

Modifier and TypeField and Description
public static final int
CONCUR_READ_ONLY

JDBC 2.0 The concurrency mode for a ResultSet object that may NOT be updated.

public static final int
CONCUR_UPDATABLE

JDBC 2.0 The concurrency mode for a ResultSet object that may be updated.

public static final int
FETCH_FORWARD

JDBC 2.0 The rows in a result set will be processed in a forward direction; first-to-last.

public static final int
FETCH_REVERSE

JDBC 2.0 The rows in a result set will be processed in a reverse direction; last-to-first.

public static final int
FETCH_UNKNOWN

JDBC 2.0 The order in which rows in a result set will be processed is unknown.

protected int
protected int
public static final int
TYPE_FORWARD_ONLY

JDBC 2.0 The type for a ResultSet object whose cursor may move only forward.

public static final int
TYPE_SCROLL_INSENSITIVE

JDBC 2.0 The type for a ResultSet object that is scrollable but generally not sensitive to changes made by others.

public static final int
TYPE_SCROLL_SENSITIVE

JDBC 2.0 The type for a ResultSet object that is scrollable and generally sensitive to changes made by others.

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

Constructor Summary

AccessConstructor and Description
public
ScrollableCursorPolicy()

PUBLIC: Create a new scrollable cursor policy.

public
ScrollableCursorPolicy(ReadQuery query, int pageSize)

INTERNAL: Create a cursor policy with the pagesize.

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
getResultSetConcurrency()

PUBLIC: The ResultSetConcurrency specifies if the resultset is updatable.

public int
getResultSetType()

PUBLIC: The ResultSetType specifies if the resultset is sensitive to changes made by others.

public boolean
public Object
remoteExecute()

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

INTERNAL: Execute the cursored select and build the stream.
public void
setResultSetConcurrency(int resultSetConcurrency)

PUBLIC: The ResultSetConcurrency specifies if the resultset is updatable.

public void
setResultSetType(int resultSetType)

PUBLIC: The ResultSetType specifies if the resultset is sensitive to changes made by others.

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

Field Detail

CONCUR_READ_ONLYback to summary
public static final int CONCUR_READ_ONLY

JDBC 2.0 The concurrency mode for a ResultSet object that may NOT be updated.

CONCUR_UPDATABLEback to summary
public static final int CONCUR_UPDATABLE

JDBC 2.0 The concurrency mode for a ResultSet object that may be updated.

FETCH_FORWARDback to summary
public static final int FETCH_FORWARD

JDBC 2.0 The rows in a result set will be processed in a forward direction; first-to-last.

FETCH_REVERSEback to summary
public static final int FETCH_REVERSE

JDBC 2.0 The rows in a result set will be processed in a reverse direction; last-to-first.

FETCH_UNKNOWNback to summary
public static final int FETCH_UNKNOWN

JDBC 2.0 The order in which rows in a result set will be processed is unknown.

resultSetConcurrencyback to summary
protected int resultSetConcurrency
resultSetTypeback to summary
protected int resultSetType
TYPE_FORWARD_ONLYback to summary
public static final int TYPE_FORWARD_ONLY

JDBC 2.0 The type for a ResultSet object whose cursor may move only forward.

TYPE_SCROLL_INSENSITIVEback to summary
public static final int TYPE_SCROLL_INSENSITIVE

JDBC 2.0 The type for a ResultSet object that is scrollable but generally not sensitive to changes made by others.

TYPE_SCROLL_SENSITIVEback to summary
public static final int TYPE_SCROLL_SENSITIVE

JDBC 2.0 The type for a ResultSet object that is scrollable and generally sensitive to changes made by others.

Constructor Detail

ScrollableCursorPolicyback to summary
public ScrollableCursorPolicy()

PUBLIC: Create a new scrollable cursor policy.

ScrollableCursorPolicyback to summary
public ScrollableCursorPolicy(ReadQuery query, int pageSize)

INTERNAL: Create a cursor policy with the pagesize.

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
getResultSetConcurrencyback to summary
public int getResultSetConcurrency()

PUBLIC: The ResultSetConcurrency specifies if the resultset is updatable. It is one of, CONCUR_READ_ONLY, CONCUR_UPDATABLE

getResultSetTypeback to summary
public int getResultSetType()

PUBLIC: The ResultSetType specifies if the resultset is sensitive to changes made by others. It is one of, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE

isScrollableCursorPolicyback to summary
public boolean isScrollableCursorPolicy()

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

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
setResultSetConcurrencyback to summary
public void setResultSetConcurrency(int resultSetConcurrency)

PUBLIC: The ResultSetConcurrency specifies if the resultset is updatable. It is one of, CONCUR_READ_ONLY, CONCUR_UPDATABLE

setResultSetTypeback to summary
public void setResultSetType(int resultSetType)

PUBLIC: The ResultSetType specifies if the resultset is sensitive to changes made by others. It is one of, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE