public static interface ExecutableFindOperation.TerminatingFind<T>
| Modifier and Type | Method and Description |
|---|---|
List<T> |
all()
Get all matching elements.
|
long |
count()
Get the number of matching elements.
|
boolean |
exists()
Check for the presence of matching elements.
|
default Optional<T> |
first()
Get the first or no result.
|
T |
firstValue()
Get the first or no result.
|
default Optional<T> |
one()
Get exactly zero or one result.
|
T |
oneValue()
Get exactly zero or one result.
|
Stream<T> |
stream()
Stream all matching elements.
|
default Optional<T> one()
Optional.empty() if no match found.IncorrectResultSizeDataAccessException - if more than one match found.@Nullable T oneValue()
IncorrectResultSizeDataAccessException - if more than one match found.default Optional<T> first()
Optional.empty() if no match found.Stream<T> stream()
Stream that wraps the a Mongo DB Cursor that needs to be closed. Never
null.long count()
boolean exists()
Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.