Interface FluentQuery<T>
- All Known Subinterfaces:
FluentQuery.FetchableFluentQuery<T>
,FluentQuery.ReactiveFluentQuery<T>
public interface FluentQuery<T>
Fluent interface to define and run a query along with projection and sorting and. Instances of
FluentQuery
are immutable.- Since:
- 2.6
- Author:
- Mark Paluch
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Fetchable extensionFluentQuery
allowing to materialize results from the underlying query.static interface
Reactive extensionFluentQuery
allowing to materialize results from the underlying query. -
Method Summary
Modifier and TypeMethodDescription<R> FluentQuery<R>
Define the target type the result should be mapped to.default FluentQuery<T>
Define which properties or property paths to include in the query.project
(Collection<String> properties) Define which properties or property paths to include in the query.Define the sort order.
-
Method Details
-
sortBy
Define the sort order.- Parameters:
sort
- theSort
specification to sort the results by, may beSort.unsorted()
, must not be null.- Returns:
- a new instance of
FluentQuery
. - Throws:
IllegalArgumentException
- if resultType isnull
.
-
as
Define the target type the result should be mapped to. Skip this step if you are only interested in the original domain type.- Type Parameters:
R
- result type.- Parameters:
resultType
- must not benull
.- Returns:
- a new instance of
FluentQuery
. - Throws:
IllegalArgumentException
- if resultType isnull
.
-
project
Define which properties or property paths to include in the query.- Parameters:
properties
- must not benull
.- Returns:
- a new instance of
FluentQuery
. - Throws:
IllegalArgumentException
- if fields isnull
.
-
project
Define which properties or property paths to include in the query.- Parameters:
properties
- must not benull
.- Returns:
- a new instance of
FluentQuery
. - Throws:
IllegalArgumentException
- if fields isnull
.
-