R
- the generic type of the result
.T
- the generic type of the internal ListQuery
results.public class SingleQueryImpl<R,T> extends QueryImpl<R,R,T> implements SingleQuery<R>
SingleQuery
adapting a ListQuery
.Modifier and Type | Field and Description |
---|---|
private ListQuery<T> |
listQuery |
private Function<T,R> |
mapper |
Constructor and Description |
---|
SingleQueryImpl(AbstractSelectStatement<R,?,T> statement,
ListQuery<T> listQuery,
QueryMode mode,
Function<T,R> mapper)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
R |
execute()
|
R |
executeRequired() |
protected Function<T,R> |
getMapper() |
executeInternal, getMode, getSql, getStatement, toString
public R executeRequired() throws ObjectNotFoundException
executeRequired
in interface SingleQuery<R>
Query.execute()
but never null
.ObjectNotFoundException
- if the query had no match.Copyright © 2001–2016 mmm-Team. All rights reserved.