org.springframework.data.repository.query

## Class ResultProcessor

- java.lang.Object
- - org.springframework.data.repository.query.ResultProcessor

    public class ResultProcessor
    extends Object

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

All Methods Instance Methods Concrete Methods
`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`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### withDynamicProjection

    public ResultProcessor withDynamicProjection(ParameterAccessor accessor)

Returns a new `ResultProcessor` with a new projection type obtained from the given `ParameterAccessor`.

Parameters:
  `accessor` - must not be null.
Returns:

#### getReturnedType

    public ReturnedType getReturnedType()

Returns the `ReturnedType`.

Returns:

#### processResult

    @Nullable
    public <T> T processResult(@Nullable
                                         Object source)

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 preparing `Converter` to potentially prepare collection elements.

Parameters:
  `source` - can be null.
  `preparingConverter` - must not be null.
Returns: