T
- result typeQ
- concrete subtypepublic abstract class AbstractCollQuery<T,Q extends AbstractCollQuery<T,Q>> extends FetchableQueryBase<T,Q> implements FetchableQuery<T,Q>
AbstractCollQuery
provides a base class for Collection
query implementations.CollQuery
MDC_PARAMETERS, MDC_QUERY, queryMixin
Constructor and Description |
---|
AbstractCollQuery(QueryMetadata metadata,
QueryEngine queryEngine) |
Modifier and Type | Method and Description |
---|---|
<A> Q |
bind(Path<A> entity,
Iterable<? extends A> col)
Bind the given collection to an already existing query source
|
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 |
<A> Q |
from(Path<A> entity,
Iterable<? extends A> col)
Add a query source
|
protected QueryMetadata |
getMetadata() |
protected QueryEngine |
getQueryEngine() |
Q |
groupBy(Expression<?>... o)
Add grouping/aggregation expressions
|
Q |
groupBy(Expression<?> e)
Add a single grouping expression
|
Q |
having(Predicate... e)
Add filters for aggregation
|
Q |
having(Predicate e)
Add a single filter for aggregation
|
<P> Q |
innerJoin(MapExpression<?,P> target,
Path<P> alias)
Define an inner join from the Map typed path to the alias
|
<P> Q |
innerJoin(Path<? extends Collection<P>> target,
Path<P> alias)
Define an inner join from the Collection typed path to the alias
|
com.mysema.commons.lang.CloseableIterator<T> |
iterate()
Get the projection as a typed closeable Iterator
|
<P> Q |
leftJoin(MapExpression<?,P> target,
Path<P> alias)
Define a left join from the Map typed path to the alias
|
<P> Q |
leftJoin(Path<? extends Collection<P>> target,
Path<P> alias)
Define a left join from the Collection typed path to the alias
|
equals, fetchFirst, transform, uniqueResult
distinct, hashCode, limit, offset, orderBy, orderBy, restrict, set, toString, where, where
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
select, select, transform
distinct, limit, offset, orderBy, restrict, set
where
fetchFirst
public AbstractCollQuery(QueryMetadata metadata, QueryEngine queryEngine)
public long fetchCount()
Fetchable
fetchCount
in interface Fetchable<T>
protected QueryMetadata getMetadata()
public <A> Q from(Path<A> entity, Iterable<? extends A> col)
A
- type of expressionentity
- Path for the sourcecol
- content of the sourcepublic <A> Q bind(Path<A> entity, Iterable<? extends A> col)
A
- type of expressionentity
- Path for the sourcecol
- content of the sourcepublic Q groupBy(Expression<?> e)
QueryBase
public Q groupBy(Expression<?>... o)
QueryBase
public Q having(Predicate e)
QueryBase
public Q having(Predicate... e)
QueryBase
protected QueryEngine getQueryEngine()
public <P> Q innerJoin(Path<? extends Collection<P>> target, Path<P> alias)
P
- type of expressiontarget
- target of the joinalias
- alias for the join targetpublic <P> Q innerJoin(MapExpression<?,P> target, Path<P> alias)
P
- type of expressiontarget
- target of the joinalias
- alias for the join targetpublic <P> Q leftJoin(Path<? extends Collection<P>> target, Path<P> alias)
P
- type of expressiontarget
- target of the joinalias
- alias for the join targetpublic <P> Q leftJoin(MapExpression<?,P> target, Path<P> alias)
P
- type of expressiontarget
- target of the joinalias
- alias for the joint targetpublic com.mysema.commons.lang.CloseableIterator<T> iterate()
Fetchable
public List<T> fetch()
Fetchable
fetch
in interface Fetchable<T>
fetch
in class FetchableQueryBase<T,Q extends AbstractCollQuery<T,Q>>
public QueryResults<T> fetchResults()
Fetchable
QueryResults
formfetchResults
in interface Fetchable<T>
Copyright © 2007–2016 Querydsl. All rights reserved.