Interface ExecutableSelectOperation.TerminatingSelect<T>
- All Known Subinterfaces:
ExecutableSelectOperation.ExecutableSelect<T>,ExecutableSelectOperation.SelectWithProjection<T>,ExecutableSelectOperation.SelectWithQuery<T>,ExecutableSelectOperation.SelectWithTable<T>
- Enclosing interface:
- ExecutableSelectOperation
public static interface ExecutableSelectOperation.TerminatingSelect<T>
Trigger
SELECT query execution by calling one of the terminating methods.-
Method Summary
Modifier and TypeMethodDescriptionall()Get all matching elements.longcount()Get the number of matching elements.default booleanexists()Check for the presence of matching elements.first()Get the first result, or no result.Get the first result, or no result.one()Get exactly zero or one result.oneValue()Get exactly zero or one result.stream()Stream all matching elements.
-
Method Details
-
count
long count()Get the number of matching elements.- Returns:
- total number of matching elements.
-
exists
default boolean exists()Check for the presence of matching elements.- Returns:
- true if at least one matching element exists.
- See Also:
-
first
Get the first result, or no result.- Returns:
- the first result or
Optional.empty()if no match found. - See Also:
-
firstValue
Get the first result, or no result.- Returns:
- the first result or null if no match found.
-
one
Get exactly zero or one result.- Returns:
- a single result or
Optional.empty()if no match found. - Throws:
IncorrectResultSizeDataAccessException- if more than one match found.- See Also:
-
oneValue
Get exactly zero or one result.- Returns:
- the single result or null if no match found.
- Throws:
IncorrectResultSizeDataAccessException- if more than one match found.
-
all
Get all matching elements. -
stream
Stream all matching elements.
-