public abstract class ProjectableQuery<Q extends ProjectableQuery<Q>> extends QueryBase<Q> implements Projectable
QueryBase class to provide default
implementations of the methods of the Projectable interfacequeryMixin| Constructor and Description |
|---|
ProjectableQuery(QueryMixin<Q> queryMixin) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
<K,V> Map<K,V> |
map(Expression<K> key,
Expression<V> value)
return the given projection as a Map instance using key and value for Map population
An empty map is returned for no results.
|
boolean |
notExists() |
Tuple |
singleResult(Expression<?>... args)
return a single result for the given projection or null if no result is found
|
<RT> RT |
singleResult(Expression<RT> expr)
return a single result for the given projection or null if no result is found
|
<T> T |
transform(ResultTransformer<T> transformer)
Apply the given transformer to this Projectable instance and return the results
|
protected <T> T |
uniqueResult(com.mysema.commons.lang.CloseableIterator<T> it) |
distinct, equals, groupBy, groupBy, hashCode, having, having, limit, offset, orderBy, orderBy, restrict, set, toString, where, whereclone, finalize, getClass, notify, notifyAll, wait, wait, waitcount, exists, iterate, iterate, listResults, listResults, uniqueResult, uniqueResultpublic ProjectableQuery(QueryMixin<Q> queryMixin)
public List<Tuple> list(Expression<?>... args)
Projectablelist in interface Projectablepublic <RT> List<RT> list(Expression<RT> projection)
Projectablelist in interface ProjectableRT - generic type of the Listpublic final <K,V> Map<K,V> map(Expression<K> key, Expression<V> value)
Projectablemap in interface Projectablepublic final boolean notExists()
notExists in interface Projectablepublic final Tuple singleResult(Expression<?>... args)
ProjectableThere is some ambiguity for missing results and null valued results, for disambiguation use the list or iterate methods instead.
for multiple results only the first one is returned
singleResult in interface Projectablepublic final <RT> RT singleResult(Expression<RT> expr)
ProjectableThere is some ambiguity for missing results and null valued results, for disambiguation use the list or iterate methods instead.
for multiple results only the first one is returned
singleResult in interface ProjectableRT - return typepublic <T> T transform(ResultTransformer<T> transformer)
Projectabletransform in interface Projectable@Nullable protected <T> T uniqueResult(com.mysema.commons.lang.CloseableIterator<T> it)
Copyright © 2007–2014 Mysema Ltd. All rights reserved.