public class ResultProcessor extends Object
ResultProcessor to expose metadata about query result element projection and eventually post processing raw
query results into projections and data transfer objects.| Modifier and Type | Method and Description |
|---|---|
ReturnedType |
getReturnedType()
Returns the
ReturnedType. |
<T> T |
processResult(Object source)
Post-processes the given query result.
|
<T> T |
processResult(Object source,
Converter<Object,Object> preparingConverter)
Post-processes the given query result using the given preparing
Converter to potentially prepare collection
elements. |
ResultProcessor |
withDynamicProjection(ParameterAccessor accessor)
Returns a new
ResultProcessor with a new projection type obtained from the given ParameterAccessor. |
public ResultProcessor withDynamicProjection(ParameterAccessor accessor)
ResultProcessor with a new projection type obtained from the given ParameterAccessor.accessor - must not be null.public ReturnedType getReturnedType()
ReturnedType.@Nullable public <T> T processResult(@Nullable Object source)
source - can be null.@Nullable public <T> T processResult(@Nullable Object source, Converter<Object,Object> preparingConverter)
Converter to potentially prepare collection
elements.source - can be null.preparingConverter - must not be null.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.