Class ResultProcessor
java.lang.Object
org.springframework.data.repository.query.ResultProcessor
A
ResultProcessor
to expose metadata about query result element projection and eventually post processing raw
query results into projections and data transfer objects.- Since:
- 1.12
- Author:
- Oliver Gierke, John Blum, Mark Paluch, Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptionReturns theReturnedType
.<T> T
processResult
(Object source) Post-processes the given query result.<T> T
processResult
(Object source, org.springframework.core.convert.converter.Converter<Object, Object> preparingConverter) Post-processes the given query result using the given preparingConverter
to potentially prepare collection elements.withDynamicProjection
(ParameterAccessor accessor) Returns a newResultProcessor
with a new projection type obtained from the givenParameterAccessor
.
-
Method Details
-
withDynamicProjection
Returns a newResultProcessor
with a new projection type obtained from the givenParameterAccessor
.- Parameters:
accessor
- must not be null.- Returns:
-
getReturnedType
Returns theReturnedType
.- Returns:
-
processResult
Post-processes the given query result.- Parameters:
source
- can be null.- Returns:
-
processResult
@Nullable public <T> T processResult(@Nullable Object source, org.springframework.core.convert.converter.Converter<Object, Object> preparingConverter) Post-processes the given query result using the given preparingConverter
to potentially prepare collection elements.- Parameters:
source
- can be null.preparingConverter
- must not be null.- Returns:
-