public abstract class AbstractCollQuery<Q extends AbstractCollQuery<Q>> extends ProjectableQuery<Q> implements SimpleQuery<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,
java.lang.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,
java.lang.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 java.util.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 java.util.Collection<P>> target,
Path<P> alias)
Define a left join from the Collection typed path to the alias
|
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> 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, groupBy, groupBy, hashCode, having, having, 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, java.lang.Iterable<? extends A> col)
A
- entity
- Path for the sourcecol
- content of the sourcepublic <A> Q bind(Path<A> entity, java.lang.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 java.util.Collection<P>> target, Path<P> alias)
P
- collectionPath
- alias
- public <P> Q innerJoin(MapExpression<?,P> target, Path<P> alias)
P
- mapPath
- alias
- public <P> Q leftJoin(Path<? extends java.util.Collection<P>> target, Path<P> alias)
P
- collectionPath
- alias
- public <P> Q leftJoin(MapExpression<?,P> target, Path<P> alias)
P
- mapPath
- 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 java.util.List<Tuple> list(Expression<?>... args)
Projectable
list
in interface Projectable
list
in class ProjectableQuery<Q extends AbstractCollQuery<Q>>
public <RT> java.util.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-2013 Mysema Ltd. All Rights Reserved.