T - Query result typepublic interface JpaQuery<T> extends com.holonplatform.core.query.QueryBuilder<JpaQuery<T>>, com.querydsl.jpa.JPQLQuery<T>
Combines the features of the standard QueryDSL JPQLQuery with the Holon QueryBuilder, allowing to
seamlessy use the default core query architecture expressions (for example DataTarget, QueryFilter,
QuerySort and QueryAggregation) for query definition.
Provides some convenience methods to obtain query results providing a projection expression, such as
list(Expression), singleResult(Expression), uniqueResult(Expression).
The QueryDsl Datastore commodity can be used to obtain a new JpaQuery instance through the
QueryDsl.query() method. Example:
JpaQuery q = getDatastore().create(QueryDsl.class).query();
| Modifier and Type | Method and Description |
|---|---|
default long |
count()
Shorter for count(*) on selected entity path.
|
JpaQuery<T> |
distinct() |
JpaQuery<T> |
fetchAll() |
JpaQuery<T> |
fetchJoin() |
<P> JpaQuery<T> |
from(com.querydsl.core.types.CollectionExpression<?,P> target,
com.querydsl.core.types.Path<P> alias) |
JpaQuery<T> |
from(com.querydsl.core.types.EntityPath<?>... sources) |
JpaQuery<T> |
groupBy(com.querydsl.core.types.Expression<?>... o) |
JpaQuery<T> |
having(com.querydsl.core.types.Predicate... o) |
<P> JpaQuery<T> |
innerJoin(com.querydsl.core.types.CollectionExpression<?,P> target) |
<P> JpaQuery<T> |
innerJoin(com.querydsl.core.types.CollectionExpression<?,P> target,
com.querydsl.core.types.Path<P> alias) |
<P> JpaQuery<T> |
innerJoin(com.querydsl.core.types.EntityPath<P> target) |
<P> JpaQuery<T> |
innerJoin(com.querydsl.core.types.EntityPath<P> target,
com.querydsl.core.types.Path<P> alias) |
<P> JpaQuery<T> |
innerJoin(com.querydsl.core.types.MapExpression<?,P> target) |
<P> JpaQuery<T> |
innerJoin(com.querydsl.core.types.MapExpression<?,P> target,
com.querydsl.core.types.Path<P> alias) |
<P> JpaQuery<T> |
join(com.querydsl.core.types.CollectionExpression<?,P> target) |
<P> JpaQuery<T> |
join(com.querydsl.core.types.CollectionExpression<?,P> target,
com.querydsl.core.types.Path<P> alias) |
<P> JpaQuery<T> |
join(com.querydsl.core.types.EntityPath<P> target) |
<P> JpaQuery<T> |
join(com.querydsl.core.types.EntityPath<P> target,
com.querydsl.core.types.Path<P> alias) |
<P> JpaQuery<T> |
join(com.querydsl.core.types.MapExpression<?,P> target) |
<P> JpaQuery<T> |
join(com.querydsl.core.types.MapExpression<?,P> target,
com.querydsl.core.types.Path<P> alias) |
<P> JpaQuery<T> |
leftJoin(com.querydsl.core.types.CollectionExpression<?,P> target) |
<P> JpaQuery<T> |
leftJoin(com.querydsl.core.types.CollectionExpression<?,P> target,
com.querydsl.core.types.Path<P> alias) |
<P> JpaQuery<T> |
leftJoin(com.querydsl.core.types.EntityPath<P> target) |
<P> JpaQuery<T> |
leftJoin(com.querydsl.core.types.EntityPath<P> target,
com.querydsl.core.types.Path<P> alias) |
<P> JpaQuery<T> |
leftJoin(com.querydsl.core.types.MapExpression<?,P> target) |
<P> JpaQuery<T> |
leftJoin(com.querydsl.core.types.MapExpression<?,P> target,
com.querydsl.core.types.Path<P> alias) |
JpaQuery<T> |
limit(long limit) |
default <RT> List<RT> |
list(com.querydsl.core.types.Expression<RT> projection)
Convenience method to execute the query and return results as
List. |
JpaQuery<T> |
offset(long offset) |
JpaQuery<T> |
on(com.querydsl.core.types.Predicate... condition) |
JpaQuery<T> |
orderBy(com.querydsl.core.types.OrderSpecifier<?>... o) |
JpaQuery<T> |
restrict(com.querydsl.core.QueryModifiers modifiers) |
<P> JpaQuery<T> |
rightJoin(com.querydsl.core.types.CollectionExpression<?,P> target) |
<P> JpaQuery<T> |
rightJoin(com.querydsl.core.types.CollectionExpression<?,P> target,
com.querydsl.core.types.Path<P> alias) |
<P> JpaQuery<T> |
rightJoin(com.querydsl.core.types.EntityPath<P> target) |
<P> JpaQuery<T> |
rightJoin(com.querydsl.core.types.EntityPath<P> target,
com.querydsl.core.types.Path<P> alias) |
<P> JpaQuery<T> |
rightJoin(com.querydsl.core.types.MapExpression<?,P> target) |
<P> JpaQuery<T> |
rightJoin(com.querydsl.core.types.MapExpression<?,P> target,
com.querydsl.core.types.Path<P> alias) |
JpaQuery<com.querydsl.core.Tuple> |
select(com.querydsl.core.types.Expression<?>... exprs) |
<U> JpaQuery<U> |
select(com.querydsl.core.types.Expression<U> expr) |
<P> JpaQuery<T> |
set(com.querydsl.core.types.ParamExpression<P> param,
P value) |
JpaQuery<T> |
setFlushMode(javax.persistence.FlushModeType flushMode)
Set the query
FlushModeType. |
JpaQuery<T> |
setHint(String name,
Object value)
Add a query hint.
|
JpaQuery<T> |
setLockMode(javax.persistence.LockModeType lockMode)
Set the query
LockModeType. |
default <RT> RT |
singleResult(com.querydsl.core.types.Expression<RT> projection)
Convenience method to execute the query and return a single result.
|
default <RT> RT |
uniqueResult(com.querydsl.core.types.Expression<RT> projection)
Convenience method to execute the query and return the result, which is expected to be unique.
|
JpaQuery<T> |
where(com.querydsl.core.types.Predicate... o) |
getQueryConfiguration, limit, offset, parameter, parameter, restrictfilter, filter, filtersort, sort, sorttarget, targetaggregate, aggregate, aggregatewithExpressionResolverfetch, fetchCount, fetchFirst, fetchOne, fetchResults, iterateJpaQuery<T> groupBy(com.querydsl.core.types.Expression<?>... o)
groupBy in interface com.querydsl.core.Query<com.querydsl.jpa.JPQLQuery<T>>JpaQuery<T> having(com.querydsl.core.types.Predicate... o)
having in interface com.querydsl.core.Query<com.querydsl.jpa.JPQLQuery<T>>JpaQuery<T> limit(long limit)
limit in interface com.querydsl.core.SimpleQuery<com.querydsl.jpa.JPQLQuery<T>>JpaQuery<T> offset(long offset)
offset in interface com.querydsl.core.SimpleQuery<com.querydsl.jpa.JPQLQuery<T>>JpaQuery<T> restrict(com.querydsl.core.QueryModifiers modifiers)
restrict in interface com.querydsl.core.SimpleQuery<com.querydsl.jpa.JPQLQuery<T>>JpaQuery<T> orderBy(com.querydsl.core.types.OrderSpecifier<?>... o)
orderBy in interface com.querydsl.core.SimpleQuery<com.querydsl.jpa.JPQLQuery<T>><P> JpaQuery<T> set(com.querydsl.core.types.ParamExpression<P> param, P value)
set in interface com.querydsl.core.SimpleQuery<com.querydsl.jpa.JPQLQuery<T>>JpaQuery<T> where(com.querydsl.core.types.Predicate... o)
where in interface com.querydsl.core.FilteredClause<com.querydsl.jpa.JPQLQuery<T>>JpaQuery<T> from(com.querydsl.core.types.EntityPath<?>... sources)
from in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> from(com.querydsl.core.types.CollectionExpression<?,P> target, com.querydsl.core.types.Path<P> alias)
from in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> innerJoin(com.querydsl.core.types.EntityPath<P> target)
innerJoin in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> innerJoin(com.querydsl.core.types.EntityPath<P> target, com.querydsl.core.types.Path<P> alias)
innerJoin in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> innerJoin(com.querydsl.core.types.CollectionExpression<?,P> target)
innerJoin in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> innerJoin(com.querydsl.core.types.CollectionExpression<?,P> target, com.querydsl.core.types.Path<P> alias)
innerJoin in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> innerJoin(com.querydsl.core.types.MapExpression<?,P> target)
innerJoin in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> innerJoin(com.querydsl.core.types.MapExpression<?,P> target, com.querydsl.core.types.Path<P> alias)
innerJoin in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> join(com.querydsl.core.types.EntityPath<P> target)
join in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> join(com.querydsl.core.types.EntityPath<P> target, com.querydsl.core.types.Path<P> alias)
join in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> join(com.querydsl.core.types.CollectionExpression<?,P> target)
join in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> join(com.querydsl.core.types.CollectionExpression<?,P> target, com.querydsl.core.types.Path<P> alias)
join in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> join(com.querydsl.core.types.MapExpression<?,P> target)
join in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> join(com.querydsl.core.types.MapExpression<?,P> target, com.querydsl.core.types.Path<P> alias)
join in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> leftJoin(com.querydsl.core.types.EntityPath<P> target)
leftJoin in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> leftJoin(com.querydsl.core.types.EntityPath<P> target, com.querydsl.core.types.Path<P> alias)
leftJoin in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> leftJoin(com.querydsl.core.types.CollectionExpression<?,P> target)
leftJoin in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> leftJoin(com.querydsl.core.types.CollectionExpression<?,P> target, com.querydsl.core.types.Path<P> alias)
leftJoin in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> leftJoin(com.querydsl.core.types.MapExpression<?,P> target)
leftJoin in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> leftJoin(com.querydsl.core.types.MapExpression<?,P> target, com.querydsl.core.types.Path<P> alias)
leftJoin in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> rightJoin(com.querydsl.core.types.EntityPath<P> target)
rightJoin in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> rightJoin(com.querydsl.core.types.EntityPath<P> target, com.querydsl.core.types.Path<P> alias)
rightJoin in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> rightJoin(com.querydsl.core.types.CollectionExpression<?,P> target)
rightJoin in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> rightJoin(com.querydsl.core.types.CollectionExpression<?,P> target, com.querydsl.core.types.Path<P> alias)
rightJoin in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> rightJoin(com.querydsl.core.types.MapExpression<?,P> target)
rightJoin in interface com.querydsl.jpa.JPQLQuery<T><P> JpaQuery<T> rightJoin(com.querydsl.core.types.MapExpression<?,P> target, com.querydsl.core.types.Path<P> alias)
rightJoin in interface com.querydsl.jpa.JPQLQuery<T>JpaQuery<T> on(com.querydsl.core.types.Predicate... condition)
on in interface com.querydsl.jpa.JPQLQuery<T>JpaQuery<T> fetchJoin()
fetchJoin in interface com.querydsl.jpa.JPQLQuery<T><U> JpaQuery<U> select(com.querydsl.core.types.Expression<U> expr)
JpaQuery<com.querydsl.core.Tuple> select(com.querydsl.core.types.Expression<?>... exprs)
JpaQuery<T> setLockMode(javax.persistence.LockModeType lockMode)
LockModeType.lockMode - Lock modeJpaQuery<T> setFlushMode(javax.persistence.FlushModeType flushMode)
FlushModeType.flushMode - Flush modeJpaQuery<T> setHint(String name, Object value)
name - Query hint namevalue - Query hint valuedefault <RT> List<RT> list(com.querydsl.core.types.Expression<RT> projection)
List. An empty list is returned when no
result is found.RT - Result typeprojection - ProjectionListdefault <RT> RT singleResult(com.querydsl.core.types.Expression<RT> projection)
RT - Result typeprojection - Projectionnull if no results availabledefault <RT> RT uniqueResult(com.querydsl.core.types.Expression<RT> projection)
RT - Result typeprojection - Projectionnull if no results availablecom.querydsl.core.NonUniqueResultException - if there is more than one resultdefault long count()
Copyright © 2019 The Holon Platform. All rights reserved.