public class ODataQueryResult extends ODataHttpResponseWrapper implements Iterable<com.sap.cloud.sdk.result.ResultElement>
| Constructor and Description |
|---|
ODataQueryResult(org.apache.olingo.odata2.api.edm.EdmEntitySet eset,
org.apache.http.HttpResponse httpResponse)
Constructs ODataQueryResult object
Provides support for asMap and asListOfMaps APIs along with as
|
ODataQueryResult(com.sap.cloud.sdk.result.ResultElement resultElmnt,
org.apache.http.HttpResponse httpResponse)
Deprecated.
|
ODataQueryResult(String streamData,
Map<String,List<String>> headerMap,
int statusCode,
org.apache.olingo.odata2.api.edm.EdmEntitySet eset) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
as(Class<T> objectType)
Converts ODataQueryResult into POJO
|
<T> List<T> |
asList(Class<T> objectType)
Converts ODataQueryResult into list of POJO
|
List<Map<String,Object>> |
asListOfMaps()
Converts ODataQueryResult into List
|
List<ResultData> |
asListOfResultData() |
Map<String,Object> |
asMap()
Converts ODataQueryResult into Map
|
com.sap.cloud.sdk.result.CollectedResultCollection |
collect(String elementName) |
com.google.common.base.Optional<com.sap.cloud.sdk.result.ResultElement> |
getIfPresent(String elementName) |
Integer |
getInlineCount()
Returns inlinecount if present in the response or else return null.
|
com.google.common.base.Optional<com.sap.cloud.sdk.result.ResultElement> |
getResultElement(String elementName) |
Iterable<com.sap.cloud.sdk.result.ResultElement> |
getResultElements()
Reads HttpResponse entity data to provide list of ResultElement
|
Iterator<com.sap.cloud.sdk.result.ResultElement> |
iterator() |
getHeader, getHeaderNames, getHeaders, getHttpStatusCode, setResponseequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic ODataQueryResult(String streamData, Map<String,List<String>> headerMap, int statusCode, org.apache.olingo.odata2.api.edm.EdmEntitySet eset)
public ODataQueryResult(org.apache.olingo.odata2.api.edm.EdmEntitySet eset,
org.apache.http.HttpResponse httpResponse)
throws IllegalStateException,
IOException
eset - httpResponse - IOExceptionIllegalStateException@Deprecated public ODataQueryResult(com.sap.cloud.sdk.result.ResultElement resultElmnt, org.apache.http.HttpResponse httpResponse) throws IllegalStateException, IOException
resultElmnt - HttpResponse data parsed into JSONhttpResponse - has response data
{will be removed in next version}
use edmEntitySet instead like this:
ODataQueryResult(edmEntitySet, httpResponse)
IllegalStateExceptionIOExceptionpublic List<ResultData> asListOfResultData()
public Map<String,Object> asMap()
public List<Map<String,Object>> asListOfMaps()
public <T> List<T> asList(Class<T> objectType) throws IllegalArgumentException
objectType - - type of POJOIllegalArgumentExceptionpublic <T> T as(Class<T> objectType)
objectType - - type of POJOpublic Iterable<com.sap.cloud.sdk.result.ResultElement> getResultElements()
public com.sap.cloud.sdk.result.CollectedResultCollection collect(String elementName)
public com.google.common.base.Optional<com.sap.cloud.sdk.result.ResultElement> getIfPresent(String elementName) throws IllegalArgumentException
IllegalArgumentExceptionpublic Iterator<com.sap.cloud.sdk.result.ResultElement> iterator()
public Integer getInlineCount()
public com.google.common.base.Optional<com.sap.cloud.sdk.result.ResultElement> getResultElement(String elementName) throws IllegalArgumentException
IllegalArgumentExceptionCopyright © 2020 SAP. All Rights Reserved.