Q
- public abstract class AbstractJPAQuery<Q extends AbstractJPAQuery<Q>> extends JPAQueryBase<Q>
Modifier and Type | Field and Description |
---|---|
protected javax.persistence.FlushModeType |
flushMode |
protected com.google.common.collect.Multimap<String,Object> |
hints |
protected javax.persistence.LockModeType |
lockMode |
protected FactoryExpression<?> |
projection |
protected QueryHandler |
queryHandler |
entityManager, queryMixin
Constructor and Description |
---|
AbstractJPAQuery(javax.persistence.EntityManager em) |
AbstractJPAQuery(javax.persistence.EntityManager em,
JPQLTemplates templates,
QueryMetadata metadata) |
Modifier and Type | Method and Description |
---|---|
long |
count()
return the amount of matched rows
|
javax.persistence.Query |
createQuery(Expression<?> expr)
Expose the original JPA query for the given projection
|
javax.persistence.Query |
createQuery(Expression<?>[] args)
Expose the original JPA query for the given projection
|
javax.persistence.Query |
createQuery(Expression<?> expr1,
Expression<?> expr2,
Expression<?>... rest)
Expose the original JPA query for the given projection
|
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> expr)
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) |
Q |
setFlushMode(javax.persistence.FlushModeType flushMode) |
Q |
setHint(String name,
Object value) |
Q |
setLockMode(javax.persistence.LockModeType lockMode) |
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
|
buildQueryString, exists, fetch, fetchAll, from, from, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, getConstants, getMetadata, getTemplates, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, join, join, join, join, join, join, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, on, on, reset, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, setConstants, toCountRowsString, toQueryString, toString
countDistinct, iterateDistinct, iterateDistinct, listDistinct, listDistinct, listDistinctResults, map, notExists, singleResult, singleResult, transform, uniqueResult
protected final QueryHandler queryHandler
@Nullable protected javax.persistence.LockModeType lockMode
@Nullable protected javax.persistence.FlushModeType flushMode
@Nullable protected FactoryExpression<?> projection
public AbstractJPAQuery(javax.persistence.EntityManager em)
public AbstractJPAQuery(javax.persistence.EntityManager em, JPQLTemplates templates, QueryMetadata metadata)
public long count()
Projectable
public javax.persistence.Query createQuery(Expression<?> expr)
expr
- public javax.persistence.Query createQuery(Expression<?> expr1, Expression<?> expr2, Expression<?>... rest)
expr
- public javax.persistence.Query createQuery(Expression<?>[] args)
args
- public com.mysema.commons.lang.CloseableIterator<Tuple> iterate(Expression<?>... args)
Projectable
public <RT> com.mysema.commons.lang.CloseableIterator<RT> iterate(Expression<RT> expr)
Projectable
RT
- generic type of the Iteratorpublic List<Tuple> list(Expression<?>... args)
Projectable
list
in interface Projectable
list
in class ProjectableQuery<Q extends AbstractJPAQuery<Q>>
public <RT> List<RT> list(Expression<RT> expr)
Projectable
list
in interface Projectable
list
in class ProjectableQuery<Q extends AbstractJPAQuery<Q>>
RT
- generic type of the Listpublic SearchResults<Tuple> listResults(Expression<?>... args)
Projectable
public <RT> SearchResults<RT> listResults(Expression<RT> expr)
Projectable
protected void logQuery(String queryString)
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.
RT
- return typepublic 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.
public Q setLockMode(javax.persistence.LockModeType lockMode)
public Q setFlushMode(javax.persistence.FlushModeType flushMode)
Copyright © 2007-2013 Mysema Ltd. All Rights Reserved.