public abstract class AbstractCollQuery<Q extends AbstractCollQuery<Q>> extends ProjectableQuery<Q> implements SimpleQuery<Q>
public class MyType extends AbstractColQuery<MyType> {
...
}
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
|
long |
count()
return the amount of matched rows
|
boolean |
exists() |
<A> Q |
from(Path<A> entity,
Iterable<? extends A> col)
Add a query source
|
abstract 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<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
|
<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
|
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> projection)
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> projection)
list the results for the given projection
|
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, hashCode, limit, offset, orderBy, orderBy, restrict, set, toString, where, where
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
distinct, limit, offset, orderBy, restrict, set
where
public AbstractCollQuery(QueryMetadata metadata, QueryEngine queryEngine)
public long count()
Projectable
count
in interface Projectable
public boolean exists()
exists
in interface Projectable
public <A> Q from(Path<A> entity, Iterable<? extends A> col)
A
- entity
- Path for the sourcecol
- content of the sourcepublic <A> Q bind(Path<A> entity, Iterable<? extends A> col)
A
- entity
- Path for the sourcecol
- content of the sourcepublic Q groupBy(Expression<?> e)
QueryBase
groupBy
in class QueryBase<Q extends AbstractCollQuery<Q>>
public Q groupBy(Expression<?>... o)
QueryBase
groupBy
in class QueryBase<Q extends AbstractCollQuery<Q>>
public Q having(Predicate e)
QueryBase
having
in class QueryBase<Q extends AbstractCollQuery<Q>>
public Q having(Predicate... e)
QueryBase
having
in class QueryBase<Q extends AbstractCollQuery<Q>>
public abstract QueryMetadata getMetadata()
protected QueryEngine getQueryEngine()
public <P> Q innerJoin(Path<? extends Collection<P>> target, Path<P> alias)
P
- target
- alias
- public <P> Q innerJoin(MapExpression<?,P> target, Path<P> alias)
P
- target
- alias
- public <P> Q leftJoin(Path<? extends Collection<P>> target, Path<P> alias)
P
- target
- alias
- public <P> Q leftJoin(MapExpression<?,P> target, Path<P> alias)
P
- target
- alias
- 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 AbstractCollQuery<Q>>
public <RT> List<RT> list(Expression<RT> projection)
Projectable
list
in interface Projectable
list
in class ProjectableQuery<Q extends AbstractCollQuery<Q>>
RT
- generic type of the Listpublic SearchResults<Tuple> listResults(Expression<?>... args)
Projectable
listResults
in interface Projectable
public <RT> SearchResults<RT> listResults(Expression<RT> projection)
Projectable
listResults
in interface Projectable
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
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.