-
Method Summary
| Modifier and Type |
Method |
Description |
T[] |
toArray() |
Executes a new query and returns the result as an array.
|
java.util.List<T> |
toList() |
Executes the query and returns the result as a List.
|
<K> java.util.Map<K,T> |
toMap(java.util.function.Function<T,K> keyMapping) |
Executes a new query and returns the result as a Map.
|
<K,
V> java.util.Map<K,V> |
toMap(java.util.function.Function<T,K> keyMapping,
java.util.function.Function<T,V> valueMapping) |
Executes a new query and returns the result as a Map.
|
java.util.stream.Stream<T> |
toStream() |
Executes the query and returns the result as a Stream.
|
-
Method Details
-
java.util.List<T> toList()
Executes the query and returns the result as a List.
- Returns:
- A list of entities representing the result rows.
-
java.util.stream.Stream<T> toStream()
Executes the query and returns the result as a Stream.
- Returns:
- A list of entities representing the result rows.
-
Executes a new query and returns the result as an array.
- Returns:
- An array of entities representing the result rows.
-
<K> java.util.Map<K,T> toMap(
java.util.function.Function<T,K> keyMapping)
Executes a new query and returns the result as a Map. This method is equivalent to the call Queryable#toMap(keyMapping, x -> x).
- Type Parameters:
K - The type of the field representing the keys.
- Parameters:
keyMapping - The field representing the keys of the map.
- Returns:
- A map containing the result of the query.
-
<K,
V> java.util.Map<K,V> toMap(
java.util.function.Function<T,K> keyMapping,
java.util.function.Function<T,V> valueMapping)
Executes a new query and returns the result as a Map.
- Type Parameters:
K - The type of the field representing the keys.
V - The type of the field representing the values.
- Parameters:
keyMapping - The field representing the keys of the map.
valueMapping - The field representing the values of the map.
- Returns:
- A map containing the result of the query.