|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Projectable
Projectable defines default projection methods for Query
implementations.
All Querydsl query implementations should implement either this interface or
SimpleProjectable
.
SimpleProjectable
Method Summary | ||
---|---|---|
long |
count()
return the amount of matched rows |
|
long |
countDistinct()
return the amount of distinct matched rows |
|
boolean |
exists()
|
|
com.mysema.commons.lang.CloseableIterator<Object[]> |
iterate(Expression<?>[] args)
iterate over the results for the given projection |
|
com.mysema.commons.lang.CloseableIterator<Object[]> |
iterate(Expression<?> first,
Expression<?> second,
Expression<?>... rest)
iterate over the results for the given projection |
|
|
iterate(Expression<RT> projection)
iterate over the results for the given projection |
|
com.mysema.commons.lang.CloseableIterator<Object[]> |
iterateDistinct(Expression<?>[] args)
iterate over the distinct results for the given projection |
|
com.mysema.commons.lang.CloseableIterator<Object[]> |
iterateDistinct(Expression<?> first,
Expression<?> second,
Expression<?>... rest)
iterate over the distinct results for the given projection |
|
|
iterateDistinct(Expression<RT> projection)
iterate over the distinct results for the given projection |
|
List<Object[]> |
list(Expression<?>[] args)
list the results for the given projection An empty list is returned for no results. |
|
List<Object[]> |
list(Expression<?> first,
Expression<?> second,
Expression<?>... rest)
list the results for the given projection An empty list is returned for no results. |
|
|
list(Expression<RT> projection)
list the results for the given projection An empty list is returned for no results. |
|
List<Object[]> |
listDistinct(Expression<?>[] args)
list the distinct results for the given projection An empty list is returned for no results. |
|
List<Object[]> |
listDistinct(Expression<?> first,
Expression<?> second,
Expression<?>... rest)
list the distinct results for the given projection An empty list is returned for no results. |
|
|
listDistinct(Expression<RT> projection)
list the distinct results for the given projection An empty list is returned for no results. |
|
|
listDistinctResults(Expression<RT> projection)
list the distinct results for the given projection |
|
|
listResults(Expression<RT> projection)
list the results for the given projection |
|
|
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()
|
|
Object[] |
singleResult(Expression<?>[] args)
return a single result for the given projection or null if no result is found |
|
Object[] |
singleResult(Expression<?> first,
Expression<?> second,
Expression<?>... rest)
return a single result for the given projection or null if no result is found |
|
|
singleResult(Expression<RT> projection)
return a single result for the given projection or null if no result is found |
|
|
transform(ResultTransformer<T> transformer)
Apply the given transformer to this Projectable instance and return the results |
|
Object[] |
uniqueResult(Expression<?>[] args)
return a unique result for the given projection or null if no result is found |
|
Object[] |
uniqueResult(Expression<?> first,
Expression<?> second,
Expression<?>... rest)
return a unique result for the given projection or null if no result is found |
|
|
uniqueResult(Expression<RT> projection)
return a unique result for the given projection or null if no result is found |
Method Detail |
---|
@Nonnegative long count()
@Nonnegative long countDistinct()
boolean exists()
boolean notExists()
com.mysema.commons.lang.CloseableIterator<Object[]> iterate(Expression<?> first, Expression<?> second, Expression<?>... rest)
first
- second
- rest
-
com.mysema.commons.lang.CloseableIterator<Object[]> iterate(Expression<?>[] args)
args
-
<RT> com.mysema.commons.lang.CloseableIterator<RT> iterate(Expression<RT> projection)
RT
- generic type of the Iteratorprojection
-
com.mysema.commons.lang.CloseableIterator<Object[]> iterateDistinct(Expression<?> first, Expression<?> second, Expression<?>... rest)
first
- second
- rest
-
com.mysema.commons.lang.CloseableIterator<Object[]> iterateDistinct(Expression<?>[] args)
args
-
<RT> com.mysema.commons.lang.CloseableIterator<RT> iterateDistinct(Expression<RT> projection)
RT
- generic type of the Iteratprprojection
-
List<Object[]> list(Expression<?> first, Expression<?> second, Expression<?>... rest)
first
- second
- rest
- rest
List<Object[]> list(Expression<?>[] args)
args
-
<RT> List<RT> list(Expression<RT> projection)
RT
- generic type of the Listprojection
-
List<Object[]> listDistinct(Expression<?> first, Expression<?> second, Expression<?>... rest)
first
- second
- rest
- rest
List<Object[]> listDistinct(Expression<?>[] args)
args
-
<RT> List<RT> listDistinct(Expression<RT> projection)
RT
- generic type of the Listprojection
-
<RT> SearchResults<RT> listResults(Expression<RT> projection)
RT
- projection
-
<RT> SearchResults<RT> listDistinctResults(Expression<RT> projection)
RT
- projection
-
<K,V> Map<K,V> map(Expression<K> key, Expression<V> value)
K
- V
- key
- value
-
@Nullable Object[] singleResult(Expression<?> first, Expression<?> second, Expression<?>... rest)
for multiple results only the first one is returned
first
- second
- rest
-
@Nullable Object[] singleResult(Expression<?>[] args)
There 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
args
-
@Nullable <RT> RT singleResult(Expression<RT> projection)
There 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
RT
- return typeprojection
-
<T> T transform(ResultTransformer<T> transformer)
T
- transformer
-
@Nullable Object[] uniqueResult(Expression<?> first, Expression<?> second, Expression<?>... rest)
There is some ambiguity for missing results and null valued results, for disambiguation use the list or iterate methods instead.
first
- second
- rest
-
NonUniqueResultException
- if there is more than one matching result@Nullable Object[] uniqueResult(Expression<?>[] args)
There is some ambiguity for missing results and null valued results, for disambiguation use the list or iterate methods instead.
args
-
NonUniqueResultException
- if there is more than one matching result@Nullable <RT> RT uniqueResult(Expression<RT> projection)
There is some ambiguity for missing results and null valued results, for disambiguation use the list or iterate methods instead.
RT
- return typeprojection
-
NonUniqueResultException
- if there is more than one matching result
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |