Interface ODataRequestResultDeserializable
- All Known Implementing Classes:
ODataRequestResultGeneric,ODataRequestResultResource
public interface ODataRequestResultDeserializable
Generic type of an OData request result.
-
Method Summary
Modifier and TypeMethodDescription<T> TConverts ODataRequestResult into POJO.<T> List<T>Converts ODataRequestResult into list of POJOs.Construct and get a list of key-value maps from the OData response.asMap()Construct and get a key-value map from the OData response.longGet the count of elements in the result set.voidstreamElements(Consumer<ResultElement> handler) Run a consumer for fluent API type ResultElement to iterate over the OData response with a continuous data stream.
-
Method Details
-
as
Converts ODataRequestResult into POJO.- Type Parameters:
T- The generic type of POJO- Parameters:
objectType- type of POJO- Returns:
- T - POJO
- Throws:
ODataResponseException- When the HTTP status indicates an erroneous response.ODataDeserializationException- When deserialization process failed for the OData response object.
-
asList
Converts ODataRequestResult into list of POJOs.- Type Parameters:
T- Generic type of the POJO- Parameters:
objectType- type of POJO- Returns:
- List
- list of POJOs - Throws:
ODataResponseException- When the HTTP status indicates an erroneous response.ODataDeserializationException- When deserialization process failed for the OData response objects.
-
streamElements
Run a consumer for fluent API type ResultElement to iterate over the OData response with a continuous data stream. The HttpEntity will be consumed.- Parameters:
handler- The consumer for generic ResultElement.- Throws:
ODataResponseException- When the HTTP status indicates an erroneous response.ODataDeserializationException- When deserialization process failed for the OData response objects.
-
getInlineCount
long getInlineCount()Get the count of elements in the result set.- Returns:
- The number of elements.
- Throws:
ODataResponseException- When the HTTP status indicates an erroneous response.
-
asMap
Construct and get a key-value map from the OData response. The HttpEntity will be consumed.- Returns:
- The key-value map.
- Throws:
ODataResponseException- When the HTTP status indicates an erroneous response.ODataDeserializationException- When deserialization process failed for the OData response object.
-
asListOfMaps
Construct and get a list of key-value maps from the OData response. The HttpEntity will be consumed.- Returns:
- The list of key-value maps.
- Throws:
ODataResponseException- When the HTTP status indicates an erroneous response.ODataDeserializationException- When deserialization process failed for the OData response objects.
-