Oracle Application Server TopLink API Reference
10g (9.0.4.3)

B10491-02

oracle.toplink.queryframework
Class CursorPolicy

java.lang.Object
  extended byoracle.toplink.internal.queryframework.ContainerPolicy
      extended byoracle.toplink.queryframework.CursorPolicy

All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
CursoredStreamPolicy, ScrollableCursorPolicy

public abstract class CursorPolicy
extends oracle.toplink.internal.queryframework.ContainerPolicy

Purpose: Abstract class for all Cursor-related policy objects

See Also:
Serialized Form

Constructor Summary
CursorPolicy()
          INTERNAL: default constructor
CursorPolicy(ReadQuery query, int pageSize)
          INTERNAL:

 

Method Summary
 oracle.toplink.internal.queryframework.ContainerPolicy clone(ReadQuery query)
          INTERNAL:
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 isCursoredStreamPolicy()
           
 boolean isCursorPolicy()
           
 boolean isScrollableCursorPolicy()
           
 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, oracle.toplink.publicinterface.Session session)
          INTERNAL: Prepare and validate.
 java.lang.Object registerObjectInUnitOfWork(java.lang.Object resultCollection, oracle.toplink.publicinterface.UnitOfWork unitOfWork)
          INTERNAL: The cusored stream executes on the parent but the objects need to be registered.
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.

 

Methods inherited from class oracle.toplink.internal.queryframework.ContainerPolicy
addInto, addInto, addIntoWithOrder, addIntoWithOrder, addIntoWithOrder, buildContainerFromVector, buildPolicyFor, clear, clone, cloneFor, compareKeys, concatenateContainers, containerInstance, containerInstance, contains, getContainerClass, getElementDescriptor, hasElementDescriptor, hasOrder, initializeConstructor, isCollectionPolicy, isCursorStreamPolicy, isEmpty, isListPolicy, isMapPolicy, isValidContainer, isValidContainerType, keyFrom, next, prepareForExecution, removeAllElements, removeFrom, removeFrom, removeFromWithOrder, setContainerClass, setElementDescriptor, setKeyMethod, toString, validateElementAndRehashIfRequired, vectorFor

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

CursorPolicy

public CursorPolicy()
INTERNAL: default constructor

CursorPolicy

public CursorPolicy(ReadQuery query,
                    int pageSize)
INTERNAL:
Method Detail

clone

public oracle.toplink.internal.queryframework.ContainerPolicy clone(ReadQuery query)
INTERNAL:

execute

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

getPageSize

public int getPageSize()
Return the number of elements to be read into a cursored stream when more elements are needed from the database.

getQuery

public ReadQuery getQuery()
INTERNAL: Return the query.

hasNext

public boolean hasNext(java.lang.Object iterator)
INTERNAL: Return whether the iterator has more objects.
Parameters:
iterator - java.lang.Object
Returns:
boolean true if iterator has more objects

isCursoredStreamPolicy

public boolean isCursoredStreamPolicy()

isCursorPolicy

public boolean isCursorPolicy()

isScrollableCursorPolicy

public boolean isScrollableCursorPolicy()

iteratorFor

public java.lang.Object iteratorFor(java.lang.Object container)
INTERNAL: Return an iterator for the given container. This iterator can then be used as a parameter to #hasNext() and #next().
See Also:
ContainerPolicy.hasNext(java.lang.Object), ContainerPolicy#next(java.lang.Object)

overridesRead

public boolean overridesRead()
INTERNAL: This can be used by collection such as cursored stream to gain control over execution.

prepare

public void prepare(DatabaseQuery query,
                    oracle.toplink.publicinterface.Session session)
             throws QueryException
INTERNAL: Prepare and validate.
Throws:
QueryException

registerObjectInUnitOfWork

public java.lang.Object registerObjectInUnitOfWork(java.lang.Object resultCollection,
                                                   oracle.toplink.publicinterface.UnitOfWork unitOfWork)
INTERNAL: The cusored stream executes on the parent but the objects need to be registered. I'm not sure the implications on nested units of work...

remoteExecute

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

setPageSize

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.

setQuery

public void setQuery(ReadQuery query)
INTERNAL: Set the query.

sizeFor

public int sizeFor(java.lang.Object container)
INTERNAL: Return the size of container.

Copyright © 1998, 2004 Oracle Corporation. All Rights Reserved.