Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle TopLink API Reference 10g Release 3 (10.1.3) B13698-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.toplink.queryframework
Class DataReadQuery

`java.lang.Object
oracle.toplink.queryframework.DatabaseQuery
oracle.toplink.queryframework.ReadQuery
oracle.toplink.queryframework.DataReadQuery`

All Implemented Interfaces:
  java.lang.Cloneable, java.io.Serializable

Direct Known Subclasses:
  DirectReadQuery

public class DataReadQuery
extends ReadQuery

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.

Since:
  TOPLink/Java 1.0
See Also:
  Serialized Form

Field Summary

Fields inherited from class oracle.toplink.queryframework.DatabaseQuery
`CascadeAggregateDelete, CascadeAllParts, CascadeByMapping, CascadeDependentParts, CascadePrivateParts, NoCascading`

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
`ContainerPolicy` | `getContainerPolicy()` PUBLIC: Return the query's ContainerPolicy.
`boolean` | `isDataReadQuery()` PUBLIC: Return if this is a data read query.
`void` | `setContainerPolicy(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, clearQueryResults, doNotCacheQueryResults, getFetchSize, getFirstResult, getMaxRows, getQueryResultsCachePolicy, isReadQuery, setFetchSize, setFirstResult, setMaxRows, setQueryResultsCachePolicy, setShouldCacheQueryResults, shouldCacheQueryResults`

Methods inherited from class oracle.toplink.queryframework.DatabaseQuery
`addArgument, addArgument, addArgument, addArgumentValue, addArgumentValues, addCall, addStatement, bindAllParameters, cacheStatement, cascadeAllParts, cascadeByMapping, cascadePrivateParts, dontBindAllParameters, dontCacheStatement, dontCascadeParts, dontMaintainCache, getCall, getCalls, getDatasourceCall, getDatasourceCalls, getEJBQLString, getHintString, getName, getQueryTimeout, getRedirector, getReferenceClass, getSelectionCriteria, getSessionName, getSQLStatement, getSQLString, getSQLStrings, getTranslatedSQLString, getTranslatedSQLStrings, hasSessionName, ignoreBindAllParameters, ignoreCacheStatement, isCallQuery, isDataModifyQuery, isDeleteObjectQuery, isExpressionQuery, isInsertObjectQuery, isModifyQuery, isObjectLevelModifyQuery, isObjectLevelReadQuery, isReadAllQuery, isReadObjectQuery, isReportQuery, isSQLCallQuery, isUpdateAllQuery, isUpdateObjectQuery, isWriteObjectQuery, maintainCache, prepareCall, setCall, setDatasourceCall, setEJBQLString, setHintString, setName, setQueryTimeout, setRedirector, setSelectionCriteria, setSessionName, setShouldBindAllParameters, setShouldCacheStatement, setShouldMaintainCache, setShouldPrepare, setShouldUseWrapperPolicy, setSQLStatement, setSQLString, shouldBindAllParameters, shouldCacheStatement, shouldCascadeAllParts, shouldCascadeByMapping, shouldCascadeParts, shouldCascadePrivateParts, shouldIgnoreBindAllParameters, shouldIgnoreCacheStatement, shouldMaintainCache, shouldPrepare, shouldUseWrapperPolicy, toString`

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

Constructor Detail

### DataReadQuery

    public DataReadQuery()

  PUBLIC: Initialize the state of the query.

### DataReadQuery

    public DataReadQuery(java.lang.String sqlString)

  PUBLIC: Initialize the query to use the specified SQL string. Warning: Allowing an unverified SQL string to be passed into this method makes your application vulnerable to SQL injection attacks.

### DataReadQuery

    public DataReadQuery(Call call)

  PUBLIC: Initialize the query to use the specified call.

Method Detail

### getContainerPolicy

    public ContainerPolicy getContainerPolicy()

  PUBLIC: Return the query's ContainerPolicy.
  Returns:
    oracle.toplink.internal.queryframework.ContainerPolicy

### isDataReadQuery

    public boolean isDataReadQuery()

  PUBLIC: Return if this is a data read query.
  Overrides:
    `isDataReadQuery` in class `DatabaseQuery`

### setContainerPolicy

    public void setContainerPolicy(ContainerPolicy containerPolicy)

  PUBLIC: Set the container policy.

### useCollectionClass

    public void useCollectionClass(java.lang.Class concreteClass)

  PUBLIC: Configure the query to use an instance of the specified container class to hold the target objects. The container class must implement (directly or indirectly) the Collection interface.

### useCursoredStream

    public void useCursoredStream()

  PUBLIC: Use a CursoredStream as the result collection. The initial read size is 10 and page size is 5.

### useCursoredStream

    public void useCursoredStream(int initialReadSize,
                                  int pageSize)

  PUBLIC: Use a CursoredStream as the result collection.
  Parameters:
    `initialReadSize` - the initial number of objects to read
    `pageSize` - the number of objects to read when more objects are needed from the database

### useCursoredStream

    public void useCursoredStream(int initialReadSize,
                                  int pageSize,
                                  ValueReadQuery sizeQuery)

  PUBLIC: Use a CursoredStream as the result collection.
  Parameters:
    `initialReadSize` - the initial number of objects to read
    `pageSize` - the number of objects to read when more objects are needed from the database
    `sizeQuery` - 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)

### useScrollableCursor

    public void useScrollableCursor()

  PUBLIC: Use a ScrollableCursor as the result collection.

### useScrollableCursor

    public void useScrollableCursor(int pageSize)

  PUBLIC: Use a ScrollableCursor as the result collection.
  Parameters:
    `pageSize` - the number of elements to be read into a the cursor when more elements are needed from the database.

### useScrollableCursor

    public void useScrollableCursor(ScrollableCursorPolicy policy)

  PUBLIC: Use a ScrollableCursor as the result collection.
  Parameters:
    `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);

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 1998, 2006, Oracle. All Rights Reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD