Class ResultReturnResolver
java.lang.Object
com.sap.cds.services.impl.handlerregistry.resolver.ResultReturnResolver
- All Implemented Interfaces:
ReturnResolver
Handles handler methods returning instances of
Result or Row or more generically Iterable<? extends Map<String, ?>> or Map<String, ?>
The resolver works only for CqnService events.-
Method Summary
Modifier and TypeMethodDescriptionstatic ResultReturnResolvercreateIfApplicable(Type type) True, if the class and generic type are applicable for this resolvervoidresolve(Object returnValue, EventContext context) Resolves the return value against the givenEventContext.voidverifyOrThrow(HandlerDescriptor descriptor) Verifies the resolver, based on the finalHandlerDescriptor.
-
Method Details
-
createIfApplicable
True, if the class and generic type are applicable for this resolver- Parameters:
type- the generic return type- Returns:
- true, if the class is equal to
ResultorRowor more genericallyIterable<? extends Map<String, ?>>orMap<String, ?>
-
resolve
Description copied from interface:ReturnResolverResolves the return value against the givenEventContext. The method should put the return value on theEventContextunder the expected key.- Specified by:
resolvein interfaceReturnResolver- Parameters:
returnValue- the return valuecontext- the context, which is currently being processed
-
verifyOrThrow
Description copied from interface:ReturnResolverVerifies the resolver, based on the finalHandlerDescriptor.- Specified by:
verifyOrThrowin interfaceReturnResolver- Parameters:
descriptor- theHandlerDescriptor
-