Class ODataResponse
- java.lang.Object
-
- de.hybris.platform.odata2services.odata.ODataResponse
-
public class ODataResponse extends java.lang.ObjectA helper class for exploring and evaluating content of anODataResponse
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ODataResponsecreateFrom(org.apache.olingo.odata2.api.processor.ODataResponse r)ODataSchemagetSchema(java.lang.String namespace)Searches for the specified schema in the content of this response.java.util.Collection<java.lang.String>getSchemaNames()Returns namespaces of the schemas present in the response.
-
-
-
Method Detail
-
createFrom
public static ODataResponse createFrom(org.apache.olingo.odata2.api.processor.ODataResponse r) throws org.apache.olingo.odata2.api.exception.ODataException
- Throws:
org.apache.olingo.odata2.api.exception.ODataException
-
getSchemaNames
public java.util.Collection<java.lang.String> getSchemaNames() throws org.apache.olingo.odata2.api.exception.ODataExceptionReturns namespaces of the schemas present in the response.- Returns:
- a collection of all schema names in this response or an empty collection, if this response contains no schemas.
- Throws:
org.apache.olingo.odata2.api.exception.ODataException- if failed to obtain schemas from the response.
-
getSchema
public ODataSchema getSchema(java.lang.String namespace) throws org.apache.olingo.odata2.api.exception.ODataException
Searches for the specified schema in the content of this response.- Parameters:
namespace- namespace of the EDMX schema to select.- Returns:
- the schema in the content of this response, which the namespace matching the specified value.
- Throws:
org.apache.olingo.odata2.api.exception.ODataException- if schemas could not be accessed in the response.java.lang.IllegalArgumentException- if the schema does not exist
-
-