Interface BatchResponse
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
DefaultBatchResponseResult
Interface to access the OData batch response.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the underlying HTTP response entity.io.vavr.control.Try<BatchResponseChangeSet>
get
(int index) Get the result for a single changeset.default <ResultT> List<ResultT>
getReadResult
(CollectionValuedFluentHelperFunction<?, ResultT, ?> helper) Convenience method to get the result for a function import request that returns a collection of primitive values or entities on the OData batch response.default <EntityT extends VdmEntity<?>>
EntityTgetReadResult
(FluentHelperByKey<?, EntityT, ?> helper) Convenience method to get the result for a read-by-key request on the OData batch response.getReadResult
(FluentHelperRead<?, EntityT, ?> helper) Convenience method to get the result for a read request on the OData batch response.default <ResultT> ResultT
getReadResult
(SingleValuedFluentHelperFunction<?, ResultT, ?> helper) Convenience method to get the result for a function import request that returns a single primitive value or entity on the OData batch response.
-
Method Details
-
get
Get the result for a single changeset.- Parameters:
index
- The zero-based index of the selected changeset.- Returns:
- A wrapper of the changeset result. It can be checked for errors upon evaluation.
-
getReadResult
@Nonnull default <EntityT extends VdmEntity<?>> List<EntityT> getReadResult(@Nonnull FluentHelperRead<?, EntityT, ?> helper) Convenience method to get the result for a read request on the OData batch response.- Type Parameters:
EntityT
- The generic entity type.- Parameters:
helper
- The original fluent helper instance that was used to create the request.- Returns:
- A list of entities according to the original request.
-
getReadResult
@Nonnull default <EntityT extends VdmEntity<?>> EntityT getReadResult(@Nonnull FluentHelperByKey<?, EntityT, ?> helper) Convenience method to get the result for a read-by-key request on the OData batch response.- Type Parameters:
EntityT
- The generic entity type.- Parameters:
helper
- The original fluent helper instance that was used to create the request.- Returns:
- A single entity according to the original request.
-
getReadResult
@Nonnull default <ResultT> ResultT getReadResult(@Nonnull SingleValuedFluentHelperFunction<?, ResultT, ?> helper) Convenience method to get the result for a function import request that returns a single primitive value or entity on the OData batch response.- Type Parameters:
ResultT
- The result type of the function import request- Parameters:
helper
- The original fluent helper instance that was used to create the request.- Returns:
- A single primitive value or entity according to the original request
-
getReadResult
@Nonnull default <ResultT> List<ResultT> getReadResult(@Nonnull CollectionValuedFluentHelperFunction<?, ResultT, ?> helper) Convenience method to get the result for a function import request that returns a collection of primitive values or entities on the OData batch response.- Type Parameters:
ResultT
- The result type of the function import request- Parameters:
helper
- The original fluent helper instance that was used to create the request.- Returns:
- A collection of primitive values or entities according to the original request
-
close
void close()Closes the underlying HTTP response entity.- Specified by:
close
in interfaceAutoCloseable
- Since:
- 4.15.0
-