@Beta
public interface ODataRequestResult
Modifier and Type | Method and Description |
---|---|
<T> T |
as(Class<T> objectType)
Converts ODataRequestResult into POJO
|
<T> List<T> |
asList(Class<T> objectType)
Converts ODataRequestResult into list of POJOs
|
List<Map<String,Object>> |
asListOfMaps()
Construct and get a list of key-value maps from the OData response.
|
Map<String,Object> |
asMap()
Construct and get a key-value map from the OData response.
|
Iterable<String> |
getHeaderNames()
Get the iterable list of HTTP response header names.
|
Iterable<String> |
getHeaderValues(String headerName)
Get the iterable HTTP header values for a specific header name.
|
org.apache.http.HttpResponse |
getHttpResponse()
Get the original OData HttpResponse instance, which holds the HttpEntity and header information.
|
long |
getInlineCount()
Get the count of elements in the result set.
|
ODataRequestExecutable |
getODataRequest()
Get the original ODataRequestExecutable instance that was used for running the OData request.
|
void |
streamElements(Consumer<ResultElement> handler)
Run a consumer for fluent API type ResultElement to iterate over the OData response with a continuous data
stream.
|
@Nonnull ODataRequestExecutable getODataRequest()
@Nonnull org.apache.http.HttpResponse getHttpResponse()
@Nonnull <T> T as(@Nonnull Class<T> objectType)
T
- The generic type of POJOobjectType
- type of POJO@Nonnull <T> List<T> asList(@Nonnull Class<T> objectType)
T
- Generic type of the POJOobjectType
- type of POJOvoid streamElements(@Nonnull Consumer<ResultElement> handler)
handler
- The consumer for generic ResultElement.ODataDeserializationException
- When deserialization process failed for the OData response object.long getInlineCount()
@Nonnull Map<String,Object> asMap()
ODataDeserializationException
- When deserialization process failed for the OData response object.@Nonnull List<Map<String,Object>> asListOfMaps()
ODataDeserializationException
- When deserialization process failed for the OData response object.@Nonnull Iterable<String> getHeaderNames()
Copyright © 2020 SAP SE. All rights reserved.