Class ODataRequestResultMultipartGeneric
java.lang.Object
com.sap.cloud.sdk.datamodel.odata.client.request.ODataRequestResultMultipartGeneric
- All Implemented Interfaces:
ODataRequestResult
,ODataRequestResultMultipart
,AutoCloseable
public class ODataRequestResultMultipartGeneric
extends Object
implements ODataRequestResultMultipart, ODataRequestResult, AutoCloseable
OData request result for reading entities.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the underlying HTTP response entity.Get the multi-part segments as raw HTTP response object.org.apache.http.HttpResponse
Get the original ODataHttpResponse
instance, which holds the HttpEntity and header information.Get the originalbatch request
that was used for running the OData request.getResult
(ODataRequestGeneric request) Gets theODataRequestResultGeneric
for the givenrequest
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sap.cloud.sdk.datamodel.odata.client.request.ODataRequestResult
getAllHeaderValues, getHeaderNames, getHeaderValues
-
Method Details
-
getODataRequest
Get the originalbatch request
that was used for running the OData request.- Specified by:
getODataRequest
in interfaceODataRequestResult
- Returns:
- The batch request this
-
getResult
@Nonnull public ODataRequestResultGeneric getResult(@Nonnull ODataRequestGeneric request) throws ODataResponseException, IllegalArgumentException Gets theODataRequestResultGeneric
for the givenrequest
.- Specified by:
getResult
in interfaceODataRequestResultMultipart
- Parameters:
request
- The request for which the result should be returned.- Returns:
- The result for the given
request
. - Throws:
ODataResponseException
- When the OData batch response cannot be parsed or HTTP response is not healthy.IllegalArgumentException
- When the provided request reference could not be found in the original batch request.ODataServiceErrorException
- When the response contains an OData error message according to specification.
-
getBatchedResponses
Get the multi-part segments as raw HTTP response object. Response objects of same changesets are grouped.Please note: The returned list is lazily evaluated. The underlying HTTP response entity is being parsed, upon list access.
- Returns:
- The virtual HTTP response objects.
-
close
public void close()Closes the underlying HTTP response entity.- Specified by:
close
in interfaceAutoCloseable
- Since:
- 5.5.0
-
getHttpResponse
@Nonnull public org.apache.http.HttpResponse getHttpResponse()Description copied from interface:ODataRequestResult
Get the original ODataHttpResponse
instance, which holds the HttpEntity and header information.- Specified by:
getHttpResponse
in interfaceODataRequestResult
- Returns:
- The HttpResponse.
-