Interface QueryResult<T>
- Type Parameters:
T- Type of queried objects
- All Superinterfaces:
AutoCloseable,Iterable<T>
This interface describes actions which could be done with query results
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the stream of query result and releases resourcesbooleanisEmpty()Checks if query result is emptyiterator()Iterate through the query resulting objectsintsize()Calculate number of objects in query resultstream()Converts query result to a streamConverts query result to collectionMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
stream
Converts query result to a stream- Returns:
- stream of T objects
-
size
int size()Calculate number of objects in query result- Returns:
- integer number
-
isEmpty
boolean isEmpty()Checks if query result is empty- Returns:
- true if query result has no objects
-
iterator
Iterate through the query resulting objects -
close
void close()Closes the stream of query result and releases resources- Specified by:
closein interfaceAutoCloseable
-
toCollection
ResultCollection<T> toCollection()Converts query result to collection- Returns:
- collection of type T objects
-