Package org.apache.cayenne.query
Class PrefetchSelectQuery<T>
java.lang.Object
org.apache.cayenne.query.CacheableQuery
org.apache.cayenne.query.AbstractQuery
org.apache.cayenne.query.SelectQuery<T>
org.apache.cayenne.query.PrefetchSelectQuery<T>
- All Implemented Interfaces:
- Serializable,- ParameterizedQuery,- Query,- Select<T>
public class PrefetchSelectQuery<T> extends SelectQuery<T>
A SelectQuery to perform a prefetch based on another query. Used internally by Cayenne
 and is normally never used directly.
- See Also:
- Serialized Form
- 
Field SummaryFields Modifier and Type Field Description protected ObjRelationshiplastPrefetchHintStores the last ObjRelationship in the prefetch path.protected StringprefetchPathThe relationship path from root objects to the objects being prefetched.protected Collection<String>resultPathsFields inherited from class org.apache.cayenne.query.SelectQuerycanReturnScalarValue, columns, distinct, DISTINCT_DEFAULT, DISTINCT_PROPERTY, havingQualifier, orderings, qualifierFields inherited from class org.apache.cayenne.query.AbstractQueryrootFields inherited from class org.apache.cayenne.query.CacheableQuerylogger
- 
Constructor SummaryConstructors Constructor Description PrefetchSelectQuery(String prefetchPath, ObjRelationship lastPrefetchHint)Creates a new disjoint prefetch select query.
- 
Method SummaryModifier and Type Method Description voidaddResultPath(String path)Configures an "extra" path that will resolve to an extra column (or columns) in the result set.ObjRelationshipgetLastPrefetchHint()Returns last incoming ObjRelationship in the prefetch relationship chain.StringgetPrefetchPath()Returns the prefetchPath.Collection<String>getResultPaths()Returns extra result paths.voidremoveResultPath(String path)Removes an extra result path.voidsetLastPrefetchHint(ObjRelationship relationship)voidsetPrefetchPath(String prefetchPath)Sets the prefetchPath.Methods inherited from class org.apache.cayenne.query.SelectQueryaddOrdering, addOrdering, addOrderings, addPrefetch, addPrefetch, aliasPathSplits, andHavingQualifier, andQualifier, batchIterator, canReturnScalarValue, clearOrderings, clearPrefetches, createQuery, createSQLAction, dataRowQuery, dataRowQuery, dataRowQuery, getBaseMetaData, getColumns, getFetchLimit, getFetchOffset, getHavingQualifier, getMetaData, getOrderings, getPageSize, getPrefetchTree, getQualifier, getStatementFetchSize, initWithProperties, isDistinct, isFetchingDataRows, iterate, iterator, orHavingQualifier, orQualifier, query, query, query, queryWithParameters, queryWithParameters, removeOrdering, removePrefetch, route, select, selectFirst, selectOne, setCanReturnScalarValue, setColumns, setColumns, setDistinct, setFetchingDataRows, setFetchLimit, setFetchOffset, setHavingQualifier, setPageSize, setPrefetchTree, setQualifier, setStatementFetchSize, setSuppressDistinctMethods inherited from class org.apache.cayenne.query.AbstractQuerygetRoot, setRoot, toStringMethods inherited from class org.apache.cayenne.query.CacheableQuerygetCacheGroup, getCacheStrategy, setCacheGroup, setCacheStrategy, useLocalCache, useLocalCache, useSharedCache, useSharedCache
- 
Field Details- 
prefetchPathThe relationship path from root objects to the objects being prefetched.
- 
lastPrefetchHintStores the last ObjRelationship in the prefetch path.
- 
resultPaths
 
- 
- 
Constructor Details- 
PrefetchSelectQueryCreates a new disjoint prefetch select query.- Since:
- 3.1
 
 
- 
- 
Method Details- 
getPrefetchPathReturns the prefetchPath.
- 
setPrefetchPathSets the prefetchPath.- Parameters:
- prefetchPath- The prefetchPath to set
 
- 
getLastPrefetchHintReturns last incoming ObjRelationship in the prefetch relationship chain.- Since:
- 1.1
 
- 
setLastPrefetchHint- Since:
- 1.1
 
- 
addResultPathConfigures an "extra" path that will resolve to an extra column (or columns) in the result set.- Parameters:
- path- A valid path expression. E.g. "abc" or "db:ABC" or "abc.xyz".
- Since:
- 1.2
 
- 
removeResultPathRemoves an extra result path. Note that this method doesn't check for expression invariants, as it doesn't have a proper context to do so. E.g. for the purpose of this method "db:ARTIST_NAME" and "obj:artistName" are not the same, though both will resolve to the same column name.
- 
getResultPathsReturns extra result paths.- Since:
- 1.2
 
 
-