public abstract class CursorPolicy extends ContainerPolicy
Purpose: Abstract class for all Cursor-related policy objects
Constructor and Description |
---|
CursorPolicy()
INTERNAL:
default constructor
|
CursorPolicy(ReadQuery query,
int pageSize)
INTERNAL:
|
Modifier and Type | Method and Description |
---|---|
ContainerPolicy |
clone(ReadQuery query)
INTERNAL:
|
CollectionChangeEvent |
createChangeEvent(java.lang.Object collectionOwner,
java.lang.String propertyName,
java.lang.Object collectionChanged,
java.lang.Object elementChanged,
int changeType,
java.lang.Integer index,
boolean isChangeApplied)
INTERNAL:
Creates a CollectionChangeEvent for the container
|
abstract java.lang.Object |
execute()
INTERNAL:
Execute the cursored select and build the stream.
|
int |
getPageSize()
Return the number of elements to be read into a cursored stream
when more elements are needed from the database.
|
ReadQuery |
getQuery()
INTERNAL:
Return the query.
|
boolean |
hasNext(java.lang.Object iterator)
INTERNAL:
Return whether the iterator has more objects.
|
boolean |
isCursorPolicy() |
java.lang.Object |
iteratorFor(java.lang.Object container)
INTERNAL:
Return an iterator for the given container.
|
boolean |
overridesRead()
INTERNAL:
This can be used by collection such as cursored stream to gain control over execution.
|
void |
prepare(DatabaseQuery query,
AbstractSession session)
INTERNAL:
Prepare and validate.
|
abstract java.lang.Object |
remoteExecute()
INTERNAL:
Execute the cursored select and build the stream.
|
void |
setPageSize(int pageSize)
Set the number of elements to be read into a cursored stream
when more elements are needed from the database.
|
void |
setQuery(ReadQuery query)
INTERNAL:
Set the query.
|
int |
sizeFor(java.lang.Object container)
INTERNAL:
Return the size of container.
|
addAdditionalFieldsToQuery, addAll, addAll, addFieldsForMapKey, addInto, addInto, addInto, addInto, addNestedJoinsQueriesForMapKey, addNextValueFromIteratorInto, buildChangeSetForNewObjectInCollection, buildCloneForKey, buildCollectionEntry, buildContainerFromVector, buildDefaultPolicy, buildKey, buildKeyFromJoinedRow, buildPolicyFor, buildPolicyFor, buildReferencesPKList, buildSelectionQueryForDirectCollectionMapping, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadePerformRemoveIfRequired, cascadeRegisterNewIfRequired, clear, clone, cloneFor, compareCollectionsForChange, compareKeys, concatenateContainers, containerInstance, containerInstance, contains, convertClassNamesToClasses, copyMapDataToRow, createWrappedObjectFromExistingWrappedObject, deleteWrappedObject, equals, getAdditionalFieldsForJoin, getAdditionalTablesForJoinQuery, getChangeValuesFrom, getCloneDataFromChangeSet, getContainerClass, getContainerClassName, getDefaultContainerClass, getDescriptorForMapKey, getElementDescriptor, getIdentityFieldsForMapKey, getKeyMappingDataForWriteQuery, getKeySelectionCriteria, getKeyType, hasElementDescriptor, hasOrder, initialize, initializeConstructor, isCollectionPolicy, isCursoredStreamPolicy, isDirectMapPolicy, isEmpty, isListPolicy, isMapKeyObject, isMappedKeyMapPolicy, isMapPolicy, isOrderedListPolicy, isScrollableCursorPolicy, isValidContainer, isValidContainerType, iterateOnMapKey, keyFrom, keyFromEntry, keyFromIterator, mergeCascadeParts, mergeChanges, next, nextEntry, nextEntry, postCalculateChanges, postCalculateChanges, postInitialize, prepareForExecution, processAdditionalWritableMapKeyFields, propagatesEventsToCollection, propogatePostDelete, propogatePostInsert, propogatePostUpdate, propogatePreDelete, propogatePreInsert, propogatePreUpdate, recordAddToCollectionInChangeRecord, recordPrivateOwnedRemovals, recordRemoveFromCollectionInChangeRecord, recordUpdateToCollectionInChangeRecord, removeFrom, removeFrom, requiresDataModificationEvents, setContainerClass, setContainerClassName, setDefaultContainerClass, setElementDescriptor, setKeyName, setKeyName, shouldAddAll, shouldIncludeKeyInDeleteEvent, shouldUpdateForeignKeysPostInsert, toString, unwrapElement, unwrapIteratorResult, updateChangeRecordForSelfMerge, updateJoinedMappingIndexesForMapKey, valueFromPKList, vectorFor
public CursorPolicy()
public CursorPolicy(ReadQuery query, int pageSize)
public ContainerPolicy clone(ReadQuery query)
clone
in class ContainerPolicy
public CollectionChangeEvent createChangeEvent(java.lang.Object collectionOwner, java.lang.String propertyName, java.lang.Object collectionChanged, java.lang.Object elementChanged, int changeType, java.lang.Integer index, boolean isChangeApplied)
createChangeEvent
in class ContainerPolicy
public abstract java.lang.Object execute()
execute
in class ContainerPolicy
public int getPageSize()
public ReadQuery getQuery()
public boolean hasNext(java.lang.Object iterator)
hasNext
in interface CoreContainerPolicy<AbstractSession>
hasNext
in class ContainerPolicy
iterator
- java.lang.ObjectContainerPolicy.iteratorFor(java.lang.Object)
public boolean isCursorPolicy()
isCursorPolicy
in class ContainerPolicy
public java.lang.Object iteratorFor(java.lang.Object container)
iteratorFor
in interface CoreContainerPolicy<AbstractSession>
iteratorFor
in class ContainerPolicy
ContainerPolicy.hasNext(java.lang.Object)
,
ContainerPolicy.next(java.lang.Object)
public boolean overridesRead()
overridesRead
in class ContainerPolicy
public void prepare(DatabaseQuery query, AbstractSession session) throws QueryException
prepare
in class ContainerPolicy
QueryException
public abstract java.lang.Object remoteExecute()
remoteExecute
in class ContainerPolicy
public void setPageSize(int pageSize)
public void setQuery(ReadQuery query)
public int sizeFor(java.lang.Object container)
sizeFor
in interface CoreContainerPolicy<AbstractSession>
sizeFor
in class ContainerPolicy
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference