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<java.lang.String,java.lang.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
|
java.util.List<Tuple> |
list(Expression<?>... args)
list the results for the given projection
An empty list is returned for no results.
|
<RT> java.util.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(java.lang.String queryString) |
Q |
setFlushMode(javax.persistence.FlushModeType flushMode) |
Q |
setHint(java.lang.String name,
java.lang.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, toStringmap, notExists, singleResult, singleResult, transform, uniqueResultdistinct, equals, groupBy, groupBy, hashCode, having, having, limit, offset, orderBy, orderBy, restrict, set, where, whereclone, finalize, getClass, notify, notifyAll, wait, wait, waitdistinct, limit, offset, orderBy, restrict, setwheremap, notExists, singleResult, singleResult, transformprotected final com.google.common.collect.Multimap<java.lang.String,java.lang.Object> hints
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()
Projectablepublic 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)
Projectablepublic <RT> com.mysema.commons.lang.CloseableIterator<RT> iterate(Expression<RT> expr)
ProjectableRT - generic type of the Iteratorpublic java.util.List<Tuple> list(Expression<?>... args)
Projectablelist in interface Projectablelist in class ProjectableQuery<Q extends AbstractJPAQuery<Q>>public <RT> java.util.List<RT> list(Expression<RT> expr)
Projectablelist in interface Projectablelist in class ProjectableQuery<Q extends AbstractJPAQuery<Q>>RT - generic type of the Listpublic SearchResults<Tuple> listResults(Expression<?>... args)
Projectablepublic <RT> SearchResults<RT> listResults(Expression<RT> expr)
Projectableprotected void logQuery(java.lang.String queryString)
public <RT> RT uniqueResult(Expression<RT> expr)
ProjectableThere 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)
ProjectableThere 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)
public Q setHint(java.lang.String name, java.lang.Object value)
Copyright © 2007-2013 Mysema Ltd. All Rights Reserved.