T - result typeQ - concrete subclasspublic abstract class AbstractJDOQuery<T,Q extends AbstractJDOQuery<T,Q>> extends FetchableSubQueryBase<T,Q> implements JDOQLQuery<T>
JDOQLQuery interface.| Modifier and Type | Field and Description |
|---|---|
protected Set<String> |
fetchGroups |
protected Integer |
maxFetchDepth |
MDC_PARAMETERS, MDC_QUERY, queryMixin| Constructor and Description |
|---|
AbstractJDOQuery(javax.jdo.PersistenceManager persistenceManager) |
AbstractJDOQuery(javax.jdo.PersistenceManager persistenceManager,
JDOQLTemplates templates,
QueryMetadata metadata,
boolean detach) |
| Modifier and Type | Method and Description |
|---|---|
Q |
addFetchGroup(String fetchGroupName)
Add the fetch group to the set of active fetch groups.
|
protected void |
cleanupMDC() |
void |
close()
Close the query and related resources
|
List<T> |
fetch()
Get the projection as a typed List
|
long |
fetchCount()
Get the count of matched elements
|
T |
fetchOne()
Get the projection as a unique result or null if no result is found
|
QueryResults<T> |
fetchResults()
Get the projection in
QueryResults form |
<U> Q |
from(CollectionExpression<?,U> path,
Path<U> alias)
Add query sources
|
Q |
from(EntityPath<?>... args)
Add query sources
|
JDOQLTemplates |
getTemplates() |
boolean |
isDetach() |
com.mysema.commons.lang.CloseableIterator<T> |
iterate()
Get the projection as a typed closeable Iterator
|
protected void |
logQuery(String queryString,
Map<Object,String> parameters) |
Q |
setMaxFetchDepth(int depth)
Set the maximum fetch depth when fetching.
|
String |
toString() |
accept, contains, contains, eq, eq, exists, getMetadata, getType, goe, goe, gt, gt, hashCode, loe, loe, lt, lt, ne, ne, notExistsequals, fetchFirst, transform, uniqueResultdistinct, groupBy, groupBy, having, having, limit, offset, orderBy, orderBy, restrict, set, where, whereclone, finalize, getClass, notify, notifyAll, wait, wait, waitcloneselect, select, transformfetchFirstdistinct, limit, offset, orderBy, restrict, setwherecontains, contains, eq, eq, exists, goe, goe, gt, gt, loe, loe, lt, lt, ne, ne, notExistsgetMetadataaccept, getTypepublic AbstractJDOQuery(@Nullable javax.jdo.PersistenceManager persistenceManager)
public AbstractJDOQuery(@Nullable javax.jdo.PersistenceManager persistenceManager, JDOQLTemplates templates, QueryMetadata metadata, boolean detach)
public Q addFetchGroup(String fetchGroupName)
addFetchGroup in interface JDOQLQuery<T>fetchGroupName - fetch group namepublic void close()
close in interface JDOQLQuery<T>close in interface Closeableclose in interface AutoCloseablepublic long fetchCount()
FetchablefetchCount in interface Fetchable<T>protected void cleanupMDC()
public Q from(EntityPath<?>... args)
JDOQLQueryfrom in interface JDOQLQuery<T>args - sourcespublic <U> Q from(CollectionExpression<?,U> path, Path<U> alias)
JDOQLQueryfrom in interface JDOQLQuery<T>path - sourcealias - aliaspublic JDOQLTemplates getTemplates()
public boolean isDetach()
public com.mysema.commons.lang.CloseableIterator<T> iterate()
Fetchablepublic List<T> fetch()
Fetchablefetch in interface Fetchable<T>fetch in class FetchableQueryBase<T,Q extends AbstractJDOQuery<T,Q>>public QueryResults<T> fetchResults()
FetchableQueryResults formfetchResults in interface Fetchable<T>public Q setMaxFetchDepth(int depth)
JDOUserException.
A value of -1 means that no limit is placed on fetching.
A positive integer will result in that number of references from the
initial object to be fetched.setMaxFetchDepth in interface JDOQLQuery<T>depth - fetch depthpublic String toString()
Copyright © 2007–2016. All rights reserved.