Interface ExecutableFindByQueryOperation.TerminatingFindByQuery<T>
- All Superinterfaces:
OneAndAll<T>
- All Known Subinterfaces:
ExecutableFindByQueryOperation.ExecutableFindByQuery<T>,ExecutableFindByQueryOperation.FindByQueryConsistentWith<T>,ExecutableFindByQueryOperation.FindByQueryInCollection<T>,ExecutableFindByQueryOperation.FindByQueryInScope<T>,ExecutableFindByQueryOperation.FindByQueryWithConsistency<T>,ExecutableFindByQueryOperation.FindByQueryWithDistinct<T>,ExecutableFindByQueryOperation.FindByQueryWithOptions<T>,ExecutableFindByQueryOperation.FindByQueryWithProjecting<T>,ExecutableFindByQueryOperation.FindByQueryWithProjection<T>,ExecutableFindByQueryOperation.FindByQueryWithQuery<T>
- Enclosing interface:
- ExecutableFindByQueryOperation
public static interface ExecutableFindByQueryOperation.TerminatingFindByQuery<T>
extends OneAndAll<T>
Terminating operations invoking the actual execution.
-
Method Summary
Modifier and TypeMethodDescriptionall()Get all matching documents.longcount()Get the number of matching elements.booleanexists()Check for the presence of matching elements.first()Get the first or no result.Get the first or no result.one()Get exactly zero or one result.oneValue()Get exactly zero or one result.stream()Stream all matching elements.
-
Method Details
-
one
Get exactly zero or one result.- Specified by:
onein interfaceOneAndAll<T>- Returns:
Optional.empty()if no match found.- Throws:
IncorrectResultSizeDataAccessException- if more than one match found.
-
oneValue
Get exactly zero or one result.- Specified by:
oneValuein interfaceOneAndAll<T>- Returns:
- null if no match found.
- Throws:
IncorrectResultSizeDataAccessException- if more than one match found.
-
first
Get the first or no result.- Specified by:
firstin interfaceOneAndAll<T>- Returns:
Optional.empty()if no match found.
-
firstValue
Get the first or no result.- Specified by:
firstValuein interfaceOneAndAll<T>- Returns:
- null if no match found.
-
all
Get all matching documents. -
stream
Stream all matching elements. -
count
long count()Get the number of matching elements. -
exists
boolean exists()Check for the presence of matching elements.
-