public class ProjectableAdapter<P extends Projectable> extends Object implements Projectable
Constructor and Description |
---|
ProjectableAdapter(P projectable) |
Modifier and Type | Method and Description |
---|---|
long |
count()
return the amount of matched rows
|
boolean |
exists() |
protected P |
getProjectable() |
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> expr)
list the results for the given projection
|
<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
|
String |
toString() |
<T> T |
transform(ResultTransformer<T> transformer)
Apply the given transformer to this Projectable instance and return the results
|
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
|
public ProjectableAdapter(P projectable)
protected P getProjectable()
public long count()
Projectable
count
in interface Projectable
public boolean exists()
exists
in interface Projectable
public boolean notExists()
notExists
in interface Projectable
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
public <RT> List<RT> list(Expression<RT> projection)
Projectable
list
in interface Projectable
RT
- generic type of the Listpublic SearchResults<Tuple> listResults(Expression<?>... args)
Projectable
listResults
in interface Projectable
public <RT> SearchResults<RT> listResults(Expression<RT> expr)
Projectable
listResults
in interface Projectable
public <K,V> Map<K,V> map(Expression<K> key, Expression<V> value)
Projectable
map
in interface Projectable
public Tuple singleResult(Expression<?>... args)
Projectable
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
singleResult
in interface Projectable
public <RT> RT singleResult(Expression<RT> expr)
Projectable
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
singleResult
in interface Projectable
RT
- return typepublic <T> T transform(ResultTransformer<T> transformer)
Projectable
transform
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.