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> TprocessResult(Object source) Post-processes the given query result.<T> TprocessResult(Object source, Converter<Object, Object> preparingConverter) Post-processes the given query result using the given preparingConverterto potentially prepare collection elements.withDynamicProjection(ParameterAccessor accessor) Returns a newResultProcessorwith a new projection type obtained from the givenParameterAccessor.
-
Method Details
-
withDynamicProjection
Returns a newResultProcessorwith 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, Converter<Object, Object> preparingConverter) Post-processes the given query result using the given preparingConverterto potentially prepare collection elements.- Parameters:
source- can be null.preparingConverter- must not be null.- Returns:
-