|
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.ObjectLevelReadQuery
oracle.toplink.queryframework.ReadAllQuery
Purpose: Concrete class for all read queries involving a collection of objects.
Responsibilities: Return a container of the objects generated by the query. Implements the inheritance feature when dealing with abstract descriptors
Field Summary |
Fields inherited from class oracle.toplink.queryframework.ObjectLevelReadQuery |
CheckCacheByExactPrimaryKey, CheckCacheByPrimaryKey, CheckCacheOnly, CheckCacheThenDatabase, ConformResultsInUnitOfWork, DoNotCheckCache, DONT_USE_DISTINCT, inMemoryQueryIndirectionPolicy, LOCK, LOCK_NOWAIT, NO_LOCK, UNCOMPUTED_DISTINCT, USE_DISTINCT, UseDescriptorSetting |
Fields inherited from class oracle.toplink.queryframework.DatabaseQuery |
CascadeAggregateDelete, CascadeAllParts, CascadeDependentParts, CascadePrivateParts, NoCascading, QUERY_PREPARE |
Constructor Summary | |
ReadAllQuery() PUBLIC: Return a new read all query. |
|
ReadAllQuery(java.lang.Class classToRead) PUBLIC: Return a new read all query. |
|
ReadAllQuery(java.lang.Class classToRead, Call call) PUBLIC: Return a new read all query. |
|
ReadAllQuery(java.lang.Class classToRead, Expression selectionCriteria) PUBLIC: Return a new read all query for the class and the selection criteria. |
|
ReadAllQuery(java.lang.Class classToRead, ExpressionBuilder builder) PUBLIC: Return a new read all query for the class. |
|
ReadAllQuery(ExpressionBuilder builder) PUBLIC: The expression builder should be provide on creation to ensure only one is used. |
|
ReadAllQuery(java.lang.Object exampleObject, QueryByExamplePolicy policy) PUBLIC: Return a query by example query to find all objects matching the attributes of the example object. |
Method Summary | |
void |
addAscendingOrdering(java.lang.String queryKeyName) PUBLIC: Order the query results by the object's attribute or query key name. |
void |
addBatchReadAttribute(Expression attributeExpression) PUBLIC: Specify the foreign-reference mapped attribute to be optimized in this query. |
void |
addBatchReadAttribute(java.lang.String attributeName) PUBLIC: Specify the foreign-reference mapped attribute to be optimized in this query. |
void |
addDescendingOrdering(java.lang.String queryKeyName) PUBLIC: Order the query results by the object's attribute or query key name. |
void |
addOrdering(Expression orderingExpression) PUBLIC: Add the ordering expression. |
void |
dontUseCursoredStream() Deprecated. |
Expression |
getConnectByExpression() PUBLIC: |
int |
getCursorPageAmount() Deprecated. |
int |
getCursorThreshold() Deprecated. |
java.util.Vector |
getOrderSiblingsByExpressions() PUBLIC: |
Expression |
getStartWithExpression() PUBLIC: |
boolean |
isReadAllQuery() PUBLIC: Return if this is a read all query. |
java.lang.Object |
remoteExecute() |
void |
setContainerPolicy(oracle.toplink.internal.queryframework.ContainerPolicy containerPolicy) PUBLIC: Set the container policy. |
void |
setCursorPageAmount(int pageAmount) Deprecated. |
void |
setCursorThreshold(int threshold) Deprecated. |
void |
setHierarchicalQueryClause(Expression startWith, Expression connectBy, java.util.Vector orderSiblingsExpressions) PUBLIC: Set the Hierarchical Query Clause for the query |
void |
setUsesCursoredStream(boolean usesCursoredStream) Deprecated. |
void |
useCollectionClass(java.lang.Class concreteClass) PUBLIC: Configure the mapping 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 |
useMapClass(java.lang.Class concreteClass, java.lang.String methodName) PUBLIC: Configure the query to use an instance of the specified container class to hold the result objects. |
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 ReadAllQuery()
public ReadAllQuery(java.lang.Class classToRead)
public ReadAllQuery(java.lang.Class classToRead, Expression selectionCriteria)
public ReadAllQuery(java.lang.Class classToRead, ExpressionBuilder builder)
public ReadAllQuery(java.lang.Class classToRead, Call call)
public ReadAllQuery(java.lang.Object exampleObject, QueryByExamplePolicy policy)
public ReadAllQuery(ExpressionBuilder builder)
Method Detail |
public void addAscendingOrdering(java.lang.String queryKeyName)
public void addBatchReadAttribute(java.lang.String attributeName)
Example: query.addBatchReadAttribute("phoneNumbers")
addBatchReadAttribute(Expression)
, ObjectLevelReadQuery.addJoinedAttribute(String)
public void addBatchReadAttribute(Expression attributeExpression)
Example: query.addBatchReadAttribute(query.getExpressionBuilder().get("policies").get("claims"))
ObjectLevelReadQuery.addJoinedAttribute(String)
public void addDescendingOrdering(java.lang.String queryKeyName)
public void addOrdering(Expression orderingExpression)
public void dontUseCursoredStream()
useCursoredStream(int, int)
public int getCursorPageAmount()
useCursoredStream(int, int)
public int getCursorThreshold()
useCursoredStream(int, int)
public Expression getStartWithExpression()
public Expression getConnectByExpression()
public java.util.Vector getOrderSiblingsByExpressions()
public boolean isReadAllQuery()
isReadAllQuery
in class DatabaseQuery
public java.lang.Object remoteExecute()
public void setContainerPolicy(oracle.toplink.internal.queryframework.ContainerPolicy containerPolicy)
public void setCursorPageAmount(int pageAmount)
useCursoredStream(int, int)
public void setCursorThreshold(int threshold)
useCursoredStream(int, int)
public void setHierarchicalQueryClause(Expression startWith, Expression connectBy, java.util.Vector orderSiblingsExpressions)
public void setUsesCursoredStream(boolean usesCursoredStream)
useCursoredStream(int, int)
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 useMapClass(java.lang.Class concreteClass, java.lang.String methodName)
jdk1.2.x: The container class must implement (directly or indirectly) the Map interface.
jdk1.1.x: The container class must be a subclass of Hashtable.
The referenceClass must set before calling this method.
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 |