Interface FluentQuery.ReactiveFluentQuery<T>
- All Superinterfaces:
FluentQuery<T>
- Enclosing interface:
- FluentQuery<T>
Reactive extension
FluentQuery allowing to materialize results from the underlying query.- Since:
- 2.6
- Author:
- Mark Paluch
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.data.repository.query.FluentQuery
FluentQuery.FetchableFluentQuery<T>, FluentQuery.ReactiveFluentQuery<T> -
Method Summary
Modifier and TypeMethodDescriptionall()Get all matching elements.Define the target type the result should be mapped to.count()Get the number of matching elements.exists()Check for the presence of matching elements.first()Get the first or no result.default FluentQuery.ReactiveFluentQuery<T>limit(int limit) Define the query limit.one()Get exactly zero or one result.Get a page of matching elements forPageable.default FluentQuery.ReactiveFluentQuery<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.scroll(ScrollPosition scrollPosition) Get all matching elements asWindowto start result scrolling or resume scrolling atscrollPosition.Get a slice of matching elements forPageable.Define the sort order.
-
Method Details
-
sortBy
Description copied from interface:FluentQueryDefine the sort order. Multiple calls will addSortspecifications.- Specified by:
sortByin interfaceFluentQuery<T>- Parameters:
sort- theSortspecification to sort the results by, may beSort.unsorted(), must not be null.- Returns:
- a new instance of
FluentQuery.
-
limit
Description copied from interface:FluentQueryDefine the query limit.- Specified by:
limitin interfaceFluentQuery<T>- Parameters:
limit- the limit to apply to the query to limit results. Must not be negative.- Returns:
- a new instance of
FluentQuery.
-
as
Description copied from interface:FluentQueryDefine the target type the result should be mapped to. Skip this step if you are only interested in the original domain type.- Specified by:
asin interfaceFluentQuery<T>- Type Parameters:
R- result type.- Parameters:
resultType- must not benull.- Returns:
- a new instance of
FluentQuery.
-
project
Description copied from interface:FluentQueryDefine which properties or property paths to include in the query.- Specified by:
projectin interfaceFluentQuery<T>- Parameters:
properties- must not benull.- Returns:
- a new instance of
FluentQuery.
-
project
Description copied from interface:FluentQueryDefine which properties or property paths to include in the query.- Specified by:
projectin interfaceFluentQuery<T>- Parameters:
properties- must not benull.- Returns:
- a new instance of
FluentQuery.
-
one
Get exactly zero or one result.- Returns:
nullif no match found.- Throws:
IncorrectResultSizeDataAccessException- if more than one match found.
-
first
Get the first or no result.- Returns:
nullif no match found.
-
all
Get all matching elements.- Returns:
-
scroll
Get all matching elements asWindowto start result scrolling or resume scrolling atscrollPosition.- Parameters:
scrollPosition- must not be null.- Returns:
- Throws:
IllegalArgumentException- ifscrollPositionis null.UnsupportedOperationException- if not supported by the underlying implementation.- Since:
- 3.1
-
page
Get a page of matching elements forPageable.- Parameters:
pageable- the pageable to request a paged result, can bePageable.unpaged(), must not be null. The givenPageablewill override any previously specifiedsort. Any potentially specifiedlimit(int)will be overridden byPageable.getPageSize().- Returns:
-
slice
Get a slice of matching elements forPageable.- Parameters:
pageable- the pageable to request a sliced result, can bePageable.unpaged(), must not be null. The givenPageablewill override any previously specifiedsort. Any potentially specifiedlimit(int)will be overridden byPageable.getPageSize().- Returns:
- Since:
- 3.5
-
count
Get the number of matching elements.- Returns:
- total number of matching elements.
-
exists
Check for the presence of matching elements.- Returns:
- true if at least one matching element exists.
-