public class SimpleIterableResultAdapter extends AbstractIterableResultAdapter<Object>
This adapter accepts all invocations wherein the original value is an Iterable object and
the requested method type is a simple value. Simple types are types that are not a subtype of
Iterable, Iterator, or Future.
While adapting, the adapter will also check that the iterable yields only one item and that it is of the same type or of a child type of the type requested by the invoked method.
This adapter runs at the priority -400.
| Constructor and Description |
|---|
SimpleIterableResultAdapter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(Invocation invocation,
Object originalValue)
Called to determine whether or not this adapter can adapt the original value passed down from a data
store operation to the type required by the repository method being invoked
|
protected Object |
doAdapt(Invocation invocation,
Iterable iterable)
This is called when we want to adapt an iterable object to another type.
|
adaptcompareTo, getPrioritypublic boolean accepts(Invocation invocation, Object originalValue)
ResultAdapterinvocation - the invocationoriginalValue - the original valueprotected Object doAdapt(Invocation invocation, Iterable iterable)
AbstractIterableResultAdapterdoAdapt in class AbstractIterableResultAdapter<Object>invocation - the invocation which called for this adaptationiterable - the iterable to be adapted to the appropriate result typeCopyright © 2014–2016. All rights reserved.