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

public abstract Class CursorPolicy

extends ContainerPolicy
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.queries.ScrollableCursorPolicy, org.eclipse.persistence.queries.CursoredStreamPolicy
Imports
java.util.*, org.eclipse.persistence.internal.queries.*, org.eclipse.persistence.internal.sessions.AbstractSession, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.descriptors.changetracking.CollectionChangeEvent, org.eclipse.persistence.exceptions.*

Purpose: Abstract class for all Cursor-related policy objects

Field Summary

Modifier and TypeField and Description
protected int
protected ReadQuery
Inherited from org.eclipse.persistence.internal.queries.ContainerPolicy:
constructordefaultContainerClasselementDescriptor

Constructor Summary

AccessConstructor and Description
protected
CursorPolicy()

INTERNAL: default constructor

protected
CursorPolicy(ReadQuery query, int pageSize)

INTERNAL:

Method Summary

Modifier and TypeMethod and Description
public ContainerPolicy
public CollectionChangeEvent
createChangeEvent(Object collectionOwner, String propertyName, Object collectionChanged, Object elementChanged, int changeType, Integer index, boolean isChangeApplied)

Implements abstract org.eclipse.persistence.internal.queries.ContainerPolicy.createChangeEvent.

INTERNAL: Creates a CollectionChangeEvent for the container
public abstract Object
execute()

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

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

Return the number of elements to be read into a cursored stream when more elements are needed from the database.

public ReadQuery
getQuery()

INTERNAL: Return the query.

public boolean

Returns:

boolean true if iterator has more objects
hasNext
(Object
java.lang.Object
iterator
)

Implements abstract org.eclipse.persistence.internal.queries.ContainerPolicy.hasNext.

Implements org.eclipse.persistence.internal.core.queries.CoreContainerPolicy.hasNext.

INTERNAL: Return whether the iterator has more objects.
public boolean
public Object
protected Object
next(Object iterator)

Implements abstract org.eclipse.persistence.internal.queries.ContainerPolicy.next.

INTERNAL: Return the next object on the queue.
public boolean
overridesRead()

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

INTERNAL: This can be used by collection such as cursored stream to gain control over execution.
public void
public abstract Object
remoteExecute()

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

INTERNAL: Execute the cursored select and build the stream.
public void
setPageSize(int pageSize)

Set the number of elements to be read into a cursored stream when more elements are needed from the database.

public void
setQuery(ReadQuery query)

INTERNAL: Set the query.

public int
protected Object
Inherited from org.eclipse.persistence.internal.queries.ContainerPolicy:
addAdditionalFieldsToQueryaddAlladdAlladdFieldsForMapKeyaddIntoaddIntoaddIntoaddIntoaddNestedJoinsQueriesForMapKeyaddNextValueFromIteratorIntobuildChangeSetForNewObjectInCollectionbuildCloneForKeybuildCollectionEntrybuildContainerFromVectorbuildDefaultPolicybuildKeybuildKeyFromJoinedRowbuildPolicyForbuildPolicyForbuildReferencesPKListbuildSelectionQueryForDirectCollectionMappingcascadeDiscoverAndPersistUnregisteredNewObjectscascadePerformRemoveIfRequiredcascadeRegisterNewIfRequiredclearclonecloneForcollectObjectForNewCollectioncompareCollectionsForChangecompareKeysconcatenateContainerscontainerInstancecontainerInstancecontainscontainsconvertClassNamesToClassescopyMapDataToRowcreateChangeSetForKeyscreateWrappedObjectFromExistingWrappedObjectdeleteWrappedObjectequalsgetAdditionalFieldsForJoingetAdditionalTablesForJoinQuerygetChangeValuesFromgetCloneDataFromChangeSetgetConstructorgetContainerClassgetContainerClassNamegetDefaultContainerClassgetDescriptorForMapKeygetElementDescriptorgetIdentityFieldsForMapKeygetKeyMappingDataForWriteQuerygetKeySelectionCriteriagetKeyTypehasElementDescriptorhashCodehasOrderinitializeinitializeConstructorisCollectionPolicyisCursoredStreamPolicyisDirectMapPolicyisEmptyisListPolicyisMapKeyObjectisMappedKeyMapPolicyisMapPolicyisOrderedListPolicyisScrollableCursorPolicyisValidContainerisValidContainerTypeiterateOnMapKeykeyFromkeyFromEntrykeyFromIteratormergeCascadePartsmergeChangesmergeChangesnextnextEntrynextEntrypostCalculateChangespostCalculateChangespostInitializeprepareForExecutionprocessAdditionalWritableMapKeyFieldspropagatesEventsToCollectionpropogatePostDeletepropogatePostInsertpropogatePostUpdatepropogatePreDeletepropogatePreInsertpropogatePreUpdaterecordAddToCollectionInChangeRecordrecordPrivateOwnedRemovalsrecordRemoveFromCollectionInChangeRecordrecordUpdateToCollectionInChangeRecordremoveFromremoveFromremoveFromrequiresDataModificationEventssetConstructorsetContainerClasssetContainerClassNamesetDefaultContainerClasssetElementDescriptorsetKeyNamesetKeyNameshouldAddAllshouldIncludeKeyInDeleteEventshouldUpdateForeignKeysPostInserttoStringunwrapElementunwrapIteratorResultupdateChangeRecordForSelfMergeupdateJoinedMappingIndexesForMapKeyvalueFromPKListvectorFor

Field Detail

pageSizeback to summary
protected int pageSize
queryback to summary
protected ReadQuery query

Constructor Detail

CursorPolicyback to summary
protected CursorPolicy()

INTERNAL: default constructor

CursorPolicyback to summary
protected CursorPolicy(ReadQuery query, int pageSize)

INTERNAL:

Method Detail

cloneback to summary
public ContainerPolicy clone(ReadQuery query)

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

INTERNAL:

Annotations
@Override
createChangeEventback to summary
public CollectionChangeEvent createChangeEvent(Object collectionOwner, String propertyName, Object collectionChanged, Object elementChanged, int changeType, Integer index, boolean isChangeApplied)

Implements abstract org.eclipse.persistence.internal.queries.ContainerPolicy.createChangeEvent.

INTERNAL: Creates a CollectionChangeEvent for the container

Annotations
@Override
executeback to summary
public abstract Object execute()

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

INTERNAL: Execute the cursored select and build the stream.

Annotations
@Override
getPageSizeback to summary
public int getPageSize()

Return the number of elements to be read into a cursored stream when more elements are needed from the database.

getQueryback to summary
public ReadQuery getQuery()

INTERNAL: Return the query.

hasNextback to summary
public boolean hasNext(Object iterator)

Implements abstract org.eclipse.persistence.internal.queries.ContainerPolicy.hasNext.

Implements org.eclipse.persistence.internal.core.queries.CoreContainerPolicy.hasNext.

INTERNAL: Return whether the iterator has more objects.

Parameters
iterator:Object

java.lang.Object

Returns:boolean

boolean true if iterator has more objects

Annotations
@Override
isCursorPolicyback to summary
public boolean isCursorPolicy()

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

Annotations
@Override
iteratorForback to summary
public Object iteratorFor(Object container)

Implements abstract org.eclipse.persistence.internal.queries.ContainerPolicy.iteratorFor.

Implements org.eclipse.persistence.internal.core.queries.CoreContainerPolicy.iteratorFor.

INTERNAL: Return an iterator for the given container. This iterator can then be used as a parameter to #hasNext() and #next().

Annotations
@Override
See Also
ContainerPolicy#hasNext(java.lang.Object), ContainerPolicy#next(java.lang.Object)
nextback to summary
protected Object next(Object iterator)

Implements abstract org.eclipse.persistence.internal.queries.ContainerPolicy.next.

INTERNAL: Return the next object on the queue. The iterator is the one returned from #iteratorFor().

Annotations
@Override
See Also
ContainerPolicy#iteratorFor(java.lang.Object)
overridesReadback to summary
public boolean overridesRead()

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

INTERNAL: This can be used by collection such as cursored stream to gain control over execution.

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

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

INTERNAL: Prepare and validate.

Annotations
@Override
remoteExecuteback to summary
public abstract Object remoteExecute()

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

INTERNAL: Execute the cursored select and build the stream.

Annotations
@Override
setPageSizeback to summary
public void setPageSize(int pageSize)

Set the number of elements to be read into a cursored stream when more elements are needed from the database.

setQueryback to summary
public void setQuery(ReadQuery query)

INTERNAL: Set the query.

sizeForback to summary
public int sizeFor(Object container)

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

Implements org.eclipse.persistence.internal.core.queries.CoreContainerPolicy.sizeFor.

INTERNAL: Return the size of container.

Annotations
@Override
toStringInfoback to summary
protected Object toStringInfo()

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

Annotations
@Override