Interface JdbcClient.MappedQuerySpec<T>
- Type Parameters:
T
- the RowMapper-declared result type
- Enclosing interface:
- JdbcClient
public static interface JdbcClient.MappedQuerySpec<T>
A specification for RowMapper-mapped queries.
-
Method Summary
Modifier and TypeMethodDescriptionlist()
Retrieve the result as a pre-resolved list of mapped objects, retaining the order from the original database result.optional()
Retrieve a single result, if available, as anOptional
handle.set()
Retrieve the result as an order-preserving set of mapped objects.default T
single()
Retrieve a single result as a required object instance.stream()
Retrieve the result as a lazily resolved stream of mapped objects, retaining the order from the original database result.
-
Method Details
-
stream
Retrieve the result as a lazily resolved stream of mapped objects, retaining the order from the original database result.- Returns:
- the result Stream, containing mapped objects, needing to be closed once fully processed (e.g. through a try-with-resources clause)
-
list
Retrieve the result as a pre-resolved list of mapped objects, retaining the order from the original database result.- Returns:
- the result as a detached List, containing mapped objects
-
set
Retrieve the result as an order-preserving set of mapped objects.- Returns:
- the result as a detached Set, containing mapped objects
- See Also:
-
optional
Retrieve a single result, if available, as anOptional
handle.- Returns:
- an Optional handle with a single result object or none
- See Also:
-
single
Retrieve a single result as a required object instance.- Returns:
- the single result object (never
null
) - See Also:
-