Oracle Application Server TopLink API Reference
10g (9.0.4)

B10491-01

oracle.toplink.queryframework
Class ReadQuery

java.lang.Object
  |
  +--oracle.toplink.queryframework.DatabaseQuery
        |
        +--oracle.toplink.queryframework.ReadQuery
All Implemented Interfaces:
java.lang.Cloneable, oracle.toplink.internal.helper.FalseUndefinedTrue, java.io.Serializable
Direct Known Subclasses:
DataReadQuery, ObjectLevelReadQuery

public abstract class ReadQuery
extends DatabaseQuery

Purpose: Abstract class for all read queries.

Responsibilities:

Since:
TOPLink/Java 1.0
See Also:
Serialized Form

Field Summary

 

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

 

Constructor Summary
ReadQuery()
          PUBLIC: Initialize the state of the query

 

Method Summary
 void cacheQueryResults()
          PUBLIC: Indicate to the query to cache all query results
 void clearQueryResults()
          PUBLIC: Clears the current cached results, the next execution with read from the database.
 void doNotCacheQueryResults()
          PUBLIC: Indicate to the query to not cache any query results
 int getMaxRows()
          PUBLIC: Return the limit for the maximum number of rows that any ResultSet can contain to the given number.
 boolean isReadQuery()
          PUBLIC: Return if this is a read query.
 void setMaxRows(int maxRows)
          PUBLIC: Used to set the limit for the maximum number of rows that any ResultSet can contain to the given number.
 void setShouldCacheQueryResults(boolean shouldCacheQueryResults)
          PUBLIC: Set if the query should cache the results of the next execution or not.
 boolean shouldCacheQueryResults()
          PUBLIC: Return if the query should cache the results of the next execution or not.

 

Methods inherited from class oracle.toplink.queryframework.DatabaseQuery
addArgument, addArgument, addArgument, addArgumentValue, addArgumentValues, addCall, addStatement, bindAllParameters, buildSelectionCriteria, cacheStatement, cascadeAllParts, cascadePrivateParts, dontBindAllParameters, dontCacheStatement, dontCascadeParts, dontMaintainCache, getCall, getEJBQLString, getHintString, getName, getQueryTimeout, getRedirector, getReferenceClass, getSelectionCriteria, getSessionName, getSQLStatement, getSQLString, getTranslatedSQLString, hasSessionName, ignoreBindAllParameters, ignoreCacheStatement, isCallQuery, isDataModifyQuery, isDataReadQuery, isDeleteObjectQuery, isExpressionQuery, isModifyQuery, isObjectLevelModifyQuery, isObjectLevelReadQuery, isReadAllQuery, isReadObjectQuery, isReportQuery, isSQLCallQuery, isWriteObjectQuery, maintainCache, prepareCall, setCall, setEJBQLString, setHintString, setName, setQueryTimeout, setRedirector, setSelectionCriteria, setSessionName, setShouldBindAllParameters, setShouldCacheStatement, setShouldMaintainCache, setShouldPrepare, setShouldUseWrapperPolicy, setSQLStatement, setSQLString, shouldBindAllParameters, shouldCacheStatement, shouldCascadeAllParts, 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

ReadQuery

public ReadQuery()
PUBLIC: Initialize the state of the query
Method Detail

cacheQueryResults

public void cacheQueryResults()
PUBLIC: Indicate to the query to cache all query results

clearQueryResults

public void clearQueryResults()
PUBLIC: Clears the current cached results, the next execution with read from the database.

doNotCacheQueryResults

public void doNotCacheQueryResults()
PUBLIC: Indicate to the query to not cache any query results

getMaxRows

public int getMaxRows()
PUBLIC: Return the limit for the maximum number of rows that any ResultSet can contain to the given number.

isReadQuery

public boolean isReadQuery()
PUBLIC: Return if this is a read query.
Overrides:
isReadQuery in class DatabaseQuery

setMaxRows

public void setMaxRows(int maxRows)
PUBLIC: Used to set the limit for the maximum number of rows that any ResultSet can contain to the given number. This method should only be set once per query. To change the max rows use another query.

setShouldCacheQueryResults

public void setShouldCacheQueryResults(boolean shouldCacheQueryResults)
PUBLIC: Set if the query should cache the results of the next execution or not.

shouldCacheQueryResults

public boolean shouldCacheQueryResults()
PUBLIC: Return if the query should cache the results of the next execution or not.

Copyright © 2003 Oracle Corporation. All Rights Reserved.