public abstract class AbstractCollQuery<Q extends AbstractCollQuery<Q>> extends ProjectableQuery<Q>
public class MyType extends AbstractColQuery<MyType>{ ... }
CollQuery
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() |
<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
|
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
|
countDistinct, iterateDistinct, iterateDistinct, listDistinct, listDistinct, listDistinctResults, map, notExists, singleResult, singleResult, transform, uniqueResult
public AbstractCollQuery(QueryMetadata metadata, QueryEngine queryEngine)
public long count()
Projectable
public boolean exists()
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 abstract QueryMetadata getMetadata()
protected QueryEngine getQueryEngine()
public <P> Q innerJoin(Path<? extends Collection<P>> target, Path<P> alias)
P
- collectionPath
- alias
- public <P> Q innerJoin(MapExpression<?,P> target, Path<P> alias)
P
- mapPath
- alias
- public com.mysema.commons.lang.CloseableIterator<Tuple> iterate(Expression<?>... args)
Projectable
public <RT> com.mysema.commons.lang.CloseableIterator<RT> iterate(Expression<RT> projection)
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
public <RT> SearchResults<RT> listResults(Expression<RT> projection)
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.
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 typeCopyright © 2007-2013 Mysema Ltd. All Rights Reserved.