|
Oracle Application Server TopLink API Reference 10g Release 2 (10.1.2) B15903-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.toplink.queryframework.DatabaseQuery
oracle.toplink.queryframework.ReadQuery
oracle.toplink.queryframework.DataReadQuery
Purpose: Concrete class to perform read using raw SQL.
Responsibilities: Execute a selecting raw SQL string. This returns a Collection of the DatabaseRows representing the result set.
Field Summary |
Fields inherited from class oracle.toplink.queryframework.DatabaseQuery |
CascadeAggregateDelete, CascadeAllParts, CascadeDependentParts, CascadePrivateParts, NoCascading, QUERY_PREPARE |
Constructor Summary | |
DataReadQuery() PUBLIC: Initialize the state of the query. |
|
DataReadQuery(Call call) PUBLIC: Initialize the query to use the specified call. |
|
DataReadQuery(java.lang.String sqlString) PUBLIC: Initialize the query to use the specified SQL string. |
Method Summary | |
oracle.toplink.internal.queryframework.ContainerPolicy |
getContainerPolicy() PUBLIC: Return the query's ContainerPolicy. |
boolean |
isDataReadQuery() PUBLIC: Return if this is a data read query. |
void |
setContainerPolicy(oracle.toplink.internal.queryframework.ContainerPolicy containerPolicy) PUBLIC: Set the container policy. |
void |
useCollectionClass(java.lang.Class concreteClass) PUBLIC: Configure the query to use an instance of the specified container class to hold the target objects. |
void |
useCursoredStream() PUBLIC: Use a CursoredStream as the result collection. |
void |
useCursoredStream(int initialReadSize, int pageSize) PUBLIC: Use a CursoredStream as the result collection. |
void |
useCursoredStream(int initialReadSize, int pageSize, ValueReadQuery sizeQuery) PUBLIC: Use a CursoredStream as the result collection. |
void |
useScrollableCursor() PUBLIC: Use a ScrollableCursor as the result collection. |
void |
useScrollableCursor(int pageSize) PUBLIC: Use a ScrollableCursor as the result collection. |
void |
useScrollableCursor(ScrollableCursorPolicy policy) PUBLIC: Use a ScrollableCursor as the result collection. |
Methods inherited from class oracle.toplink.queryframework.ReadQuery |
cacheQueryResults, clearQueryResults, doNotCacheQueryResults, getMaxRows, isReadQuery, setMaxRows, setShouldCacheQueryResults, shouldCacheQueryResults |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DataReadQuery()
public DataReadQuery(java.lang.String sqlString)
public DataReadQuery(Call call)
Method Detail |
public oracle.toplink.internal.queryframework.ContainerPolicy getContainerPolicy()
public boolean isDataReadQuery()
isDataReadQuery
in class DatabaseQuery
public void setContainerPolicy(oracle.toplink.internal.queryframework.ContainerPolicy containerPolicy)
public void useCollectionClass(java.lang.Class concreteClass)
jdk1.2.x: The container class must implement (directly or indirectly) the Collection interface.
jdk1.1.x: The container class must be a subclass of Vector.
public void useCursoredStream()
public void useCursoredStream(int initialReadSize, int pageSize)
initialReadSize
- the initial number of objects to readpageSize
- the number of objects to read when more objects are needed from the databasepublic void useCursoredStream(int initialReadSize, int pageSize, ValueReadQuery sizeQuery)
initialReadSize
- the initial number of objects to readpageSize
- the number of objects to read when more objects are needed from the databasesizeQuery
- a query that will return the size of the result set; this must be set if an expression is not used (i.e. custom SQL)public void useScrollableCursor()
public void useScrollableCursor(int pageSize)
pageSize
- the number of elements to be read into a the cursor when more elements are needed from the database.public void useScrollableCursor(ScrollableCursorPolicy policy)
policy
- the scrollable cursor policy allows for additional result set options. Example:
ScrollableCursorPolicy policy = new ScrollableCursorPolicy()
policy.setResultSetType(ScrollableCursorPolicy.TYPE_SCROLL_INSENSITIVE);
query.useScrollableCursor(policy);
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |