Interface FluentQuery.FetchableFluentQuery<T>
- All Superinterfaces:
- FluentQuery<T>
- Enclosing interface:
- FluentQuery<T>
Fetchable extension 
FluentQuery allowing to materialize results from the underlying query.- Since:
- 2.6
- Author:
- Mark Paluch
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.springframework.data.repository.query.FluentQueryFluentQuery.FetchableFluentQuery<T>, FluentQuery.ReactiveFluentQuery<T>
- 
Method SummaryModifier and TypeMethodDescriptionall()Get all matching elements.Define the target type the result should be mapped to.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.default FluentQuery.FetchableFluentQuery<T>limit(int limit) Define the query limit.one()Get exactly zero or one result.oneValue()Get exactly zero or one result.Get a page of matching elements forPageable.default FluentQuery.FetchableFluentQuery<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.stream()Stream all matching elements.
- 
Method Details- 
sortByDescription copied from interface:FluentQueryDefine the sort order. Multiple calls will addSortspecifications.- Specified by:
- sortByin interface- FluentQuery<T>
- Parameters:
- sort- the- Sortspecification to sort the results by, may be- Sort.unsorted(), must not be null.
- Returns:
- a new instance of FluentQuery.
 
- 
limitDescription copied from interface:FluentQueryDefine the query limit.- Specified by:
- limitin interface- FluentQuery<T>
- Parameters:
- limit- the limit to apply to the query to limit results. Must not be negative.
- Returns:
- a new instance of FluentQuery.
 
- 
asDescription 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 interface- FluentQuery<T>
- Type Parameters:
- R- result type.
- Parameters:
- resultType- must not be- null.
- Returns:
- a new instance of FluentQuery.
 
- 
projectDescription copied from interface:FluentQueryDefine which properties or property paths to include in the query.- Specified by:
- projectin interface- FluentQuery<T>
- Parameters:
- properties- must not be- null.
- Returns:
- a new instance of FluentQuery.
 
- 
projectDescription copied from interface:FluentQueryDefine which properties or property paths to include in the query.- Specified by:
- projectin interface- FluentQuery<T>
- Parameters:
- properties- must not be- null.
- Returns:
- a new instance of FluentQuery.
 
- 
oneGet exactly zero or one result.- Returns:
- Optional.empty()if no match found.
- Throws:
- IncorrectResultSizeDataAccessException- if more than one match found.
 
- 
oneValueGet exactly zero or one result.- Returns:
- null if no match found.
- Throws:
- IncorrectResultSizeDataAccessException- if more than one match found.
 
- 
firstGet the first or no result.- Returns:
- Optional.empty()if no match found.
 
- 
firstValueGet the first or no result.- Returns:
- null if no match found.
 
- 
allGet all matching elements.- Returns:
 
- 
scrollGet all matching elements asWindowto start result scrolling or resume scrolling atscrollPosition.- Parameters:
- scrollPosition- must not be null.
- Returns:
- Throws:
- IllegalArgumentException- if- scrollPositionis null.
- UnsupportedOperationException- if not supported by the underlying implementation.
- Since:
- 3.1
 
- 
pageGet a page of matching elements forPageable.- Parameters:
- pageable- the pageable to request a paged result, can be- Pageable.unpaged(), must not be null. The given- Pageablewill override any previously specified- sort. Any potentially specified- limit(int)will be overridden by- Pageable.getPageSize().
- Returns:
 
- 
sliceGet a slice of matching elements forPageable.- Parameters:
- pageable- the pageable to request a sliced result, can be- Pageable.unpaged(), must not be null. The given- Pageablewill override any previously specified- sort. Any potentially specified- limit(int)will be overridden by- Pageable.getPageSize().
- Returns:
- Since:
- 3.5
 
- 
streamStream all matching elements.- Returns:
- a Streamwrapping cursors that need to be closed.
 
- 
countlong count()Get the number of matching elements.- Returns:
- total number of matching elements.
 
- 
existsboolean exists()Check for the presence of matching elements.- Returns:
- true if at least one matching element exists.
 
 
-