Module spring.data.mongodb
Interface ReactiveFindOperation
- All Known Subinterfaces:
ReactiveFluentMongoOperations,ReactiveMongoOperations
- All Known Implementing Classes:
ReactiveMongoTemplate
public interface ReactiveFindOperation
ReactiveFindOperation allows creation and execution of reactive MongoDB find operations in a fluent API
style. The starting domainType is used for mapping the
Query provided via matching into the
MongoDB specific representation. By default, the originating domainType is also used for mapping back the
result from the Document. However, it is possible to define an different returnType via
as to mapping the result.The collection to operate on is by default derived from the initial domainType and can be defined there via
Document. Using inCollection allows to override the
collection name for the execution.
query(Human.class)
.inCollection("star-wars")
.as(Jedi.class)
.matching(where("firstname").is("luke"))
.all();
- Since:
- 2.0
- Author:
- Mark Paluch, Christoph Strobl, Juergen Zimmermann
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceResult type override.static interfaceResult restrictions.static interfaceDistinct Find support.static interfaceCollection override (optional).static interfaceResult type override (optional).static interfaceProvide aQueryoverride (optional).static interfaceReactiveFindOperation.ReactiveFindprovides methods for constructing lookup operations in a fluent way.static interfaceTerminating distinct find operations.static interfaceCompose find execution by calling one of the terminating methods.static interfaceCompose geonear execution by calling one of the terminating methods. -
Method Summary
Modifier and TypeMethodDescriptionStart creating a find operation for the given domainType.
-
Method Details
-
query
Start creating a find operation for the given domainType.- Parameters:
domainType- must not be null.- Returns:
- new instance of
ReactiveFindOperation.ReactiveFind. Never null. - Throws:
IllegalArgumentException- if domainType is null.
-