|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.query.AbstractQuery
org.apache.cayenne.query.QualifiedQuery
org.apache.cayenne.query.SelectQuery
org.apache.cayenne.query.PrefetchSelectQuery
public class PrefetchSelectQuery
A SelectQuery to perform a prefetch based on another query. Used internally by Cayenne and is normally never used directly.
Field Summary | |
---|---|
protected ObjRelationship |
lastPrefetchHint
Stores the last ObjRelationship in the prefetch path. |
protected SelectQuery |
parentQuery
|
protected java.lang.String |
prefetchPath
The relationship path from root objects to the objects being prefetched. |
protected java.util.Collection |
resultPaths
|
Fields inherited from class org.apache.cayenne.query.SelectQuery |
---|
customDbAttributes, distinct, DISTINCT_DEFAULT, DISTINCT_PROPERTY, orderings, parentObjEntityName, parentQualifier |
Fields inherited from class org.apache.cayenne.query.QualifiedQuery |
---|
qualifier |
Fields inherited from class org.apache.cayenne.query.AbstractQuery |
---|
name, root |
Fields inherited from interface org.apache.cayenne.query.GenericSelectQuery |
---|
CACHE_POLICY_DEFAULT, CACHE_POLICY_PROPERTY, FETCH_LIMIT_DEFAULT, FETCH_LIMIT_PROPERTY, FETCHING_DATA_ROWS_DEFAULT, FETCHING_DATA_ROWS_PROPERTY, LOCAL_CACHE, NO_CACHE, PAGE_SIZE_DEFAULT, PAGE_SIZE_PROPERTY, REFRESHING_OBJECTS_DEFAULT, REFRESHING_OBJECTS_PROPERTY, RESOLVING_INHERITED_DEFAULT, RESOLVING_INHERITED_PROPERTY, SHARED_CACHE |
Constructor Summary | |
---|---|
PrefetchSelectQuery(EntityResolver resolver,
SelectQuery parentQuery,
java.lang.String prefetch)
Deprecated. since 1.2 - passing EntityResolver in constructor is no longer needed, as prefetch query configuration alogrithm is moved out of this class. In fact this constructor will not correctly configure query to handle flattened prefetches. |
|
PrefetchSelectQuery(SelectQuery parentQuery,
java.lang.String prefetchPath,
ObjRelationship lastPrefetchHint)
Creates a new disjoint prefetch select query. |
Method Summary | |
---|---|
void |
addResultPath(java.lang.String path)
Configures an "extra" path that will resolve to an extra column (or columns) in the result set. |
ObjRelationship |
getLastPrefetchHint()
Retunrs last incoming ObjRelationship in the prefetch relationship chain. |
SelectQuery |
getParentQuery()
|
java.lang.String |
getPrefetchPath()
Returns the prefetchPath. |
java.util.Collection |
getResultPaths()
Returns extra result paths. |
void |
removeResultPath(java.lang.String path)
Removes an extra result path. |
void |
setLastPrefetchHint(ObjRelationship relationship)
|
void |
setParentQuery(SelectQuery parentQuery)
|
void |
setPrefetchPath(java.lang.String prefetchPath)
Sets the prefetchPath. |
Methods inherited from class org.apache.cayenne.query.QualifiedQuery |
---|
andQualifier, getQualifier, orQualifier, setQualifier |
Methods inherited from class org.apache.cayenne.query.AbstractQuery |
---|
getName, getRoot, setName, setRoot, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.cayenne.query.Query |
---|
getName, getRoot, setName, setRoot |
Methods inherited from interface org.apache.cayenne.query.Query |
---|
getName, getRoot, setName, setRoot |
Field Detail |
---|
protected SelectQuery parentQuery
protected java.lang.String prefetchPath
protected ObjRelationship lastPrefetchHint
protected java.util.Collection resultPaths
Constructor Detail |
---|
public PrefetchSelectQuery(EntityResolver resolver, SelectQuery parentQuery, java.lang.String prefetch)
public PrefetchSelectQuery(SelectQuery parentQuery, java.lang.String prefetchPath, ObjRelationship lastPrefetchHint)
Method Detail |
---|
public java.lang.String getPrefetchPath()
public void setPrefetchPath(java.lang.String prefetchPath)
prefetchPath
- The prefetchPath to setpublic SelectQuery getParentQuery()
public void setParentQuery(SelectQuery parentQuery)
public ObjRelationship getLastPrefetchHint()
public void setLastPrefetchHint(ObjRelationship relationship)
public void addResultPath(java.lang.String path)
path
- A valid path expression. E.g. "abc" or "db:ABC" or "abc.xyz".public void removeResultPath(java.lang.String path)
public java.util.Collection getResultPaths()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |