Q
- public abstract class AbstractJDOQuery<Q extends AbstractJDOQuery<Q>> extends ProjectableQuery<Q> implements JDOQLQuery
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
|
long |
count()
return the amount of matched rows
|
boolean |
exists() |
Q |
from(EntityPath<?>... args)
Add query sources
|
QueryMetadata |
getMetadata() |
JDOQLTemplates |
getTemplates() |
boolean |
isDetach() |
com.mysema.commons.lang.CloseableIterator<Tuple> |
iterate(Expression<?>... args)
iterate over the results for the given projection
|
<RT> com.mysema.commons.lang.CloseableIterator<RT> |
iterate(Expression<RT> projection)
iterate over the results for the given projection
|
List<Tuple> |
list(Expression<?>... args)
list the results for the given projection
An empty list is returned for no results.
|
<RT> List<RT> |
list(Expression<RT> expr)
list the results for the given projection
An empty list is returned for no results.
|
SearchResults<Tuple> |
listResults(Expression<?>... args)
list the results for the given projection
|
<RT> SearchResults<RT> |
listResults(Expression<RT> expr)
list the results for the given projection
|
protected void |
logQuery(String queryString,
Map<Object,String> parameters) |
Q |
setMaxFetchDepth(int depth)
Set the maximum fetch depth when fetching.
|
String |
toString() |
Tuple |
uniqueResult(Expression<?>... args)
return a unique result for the given projection or null if no result is found
|
<RT> RT |
uniqueResult(Expression<RT> expr)
return a unique result for the given projection or null if no result is found
|
map, notExists, singleResult, singleResult, transform, uniqueResult
distinct, equals, groupBy, groupBy, hashCode, having, having, limit, offset, orderBy, orderBy, restrict, set, where, where
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
clone
distinct, limit, offset, orderBy, restrict, set
where
map, notExists, singleResult, singleResult, transform
public 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
fetchGroupName
- public void close()
close
in interface JDOQLQuery
close
in interface Closeable
close
in interface AutoCloseable
public long count()
Projectable
count
in interface Projectable
public boolean exists()
exists
in interface Projectable
protected void cleanupMDC()
public Q from(EntityPath<?>... args)
JDOCommonQuery
from
in interface JDOCommonQuery<JDOQLQuery>
public QueryMetadata getMetadata()
public JDOQLTemplates getTemplates()
public boolean isDetach()
public com.mysema.commons.lang.CloseableIterator<Tuple> iterate(Expression<?>... args)
Projectable
iterate
in interface Projectable
public <RT> com.mysema.commons.lang.CloseableIterator<RT> iterate(Expression<RT> projection)
Projectable
iterate
in interface Projectable
RT
- generic type of the Iteratorpublic List<Tuple> list(Expression<?>... args)
Projectable
list
in interface Projectable
list
in class ProjectableQuery<Q extends AbstractJDOQuery<Q>>
public <RT> List<RT> list(Expression<RT> expr)
Projectable
list
in interface Projectable
list
in class ProjectableQuery<Q extends AbstractJDOQuery<Q>>
RT
- generic type of the Listpublic SearchResults<Tuple> listResults(Expression<?>... args)
Projectable
listResults
in interface Projectable
public <RT> SearchResults<RT> listResults(Expression<RT> expr)
Projectable
listResults
in interface Projectable
public Q setMaxFetchDepth(int depth)
setMaxFetchDepth
in interface JDOQLQuery
depth
- public String toString()
toString
in class QueryBase<Q extends AbstractJDOQuery<Q>>
@Nullable public Tuple uniqueResult(Expression<?>... args)
Projectable
There is some ambiguity for missing results and null valued results, for disambiguation use the list or iterate methods instead.
uniqueResult
in interface Projectable
@Nullable public <RT> RT uniqueResult(Expression<RT> expr)
Projectable
There is some ambiguity for missing results and null valued results, for disambiguation use the list or iterate methods instead.
uniqueResult
in interface Projectable
RT
- return typeCopyright © 2007–2015 Mysema Ltd. All rights reserved.