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 TypeMethodDescriptionvoidclose()Closes the underlying HTTP response entity.Get the multi-part segments as raw HTTP response object.org.apache.http.HttpResponseGet the original ODataHttpResponseinstance, which holds the HttpEntity and header information.Get the originalbatch requestthat was used for running the OData request.getResult(ODataRequestGeneric request) Gets theODataRequestResultGenericfor the givenrequest.org.apache.http.StatusLineGet the HTTP response object status line.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sap.cloud.sdk.datamodel.odata.client.request.ODataRequestResult
getAllHeaderValues, getHeaderNames, getHeaderValues
-
Method Details
-
getStatusLine
@Nullable public org.apache.http.StatusLine getStatusLine()Description copied from interface:ODataRequestResultGet the HTTP response object status line.- Specified by:
getStatusLinein interfaceODataRequestResult- Returns:
- the StatusLine.
-
getODataRequest
Get the originalbatch requestthat was used for running the OData request.- Specified by:
getODataRequestin interfaceODataRequestResult- Returns:
- The batch request this
-
getResult
@Nonnull public ODataRequestResultGeneric getResult(@Nonnull ODataRequestGeneric request) throws ODataResponseException, IllegalArgumentException Gets theODataRequestResultGenericfor the givenrequest.- Specified by:
getResultin 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:
closein interfaceAutoCloseable- Since:
- 5.5.0
-
getHttpResponse
@Nonnull public org.apache.http.HttpResponse getHttpResponse()Description copied from interface:ODataRequestResultGet the original ODataHttpResponseinstance, which holds the HttpEntity and header information.- Specified by:
getHttpResponsein interfaceODataRequestResult- Returns:
- The HttpResponse.
-