Query Result
Holds a data query and its result value. Allows conversion of the result to optional/required/list values for basic, complex and entity types.
Properties
Functions
See check(Int).
Check if the {@link com.sap.cloud.mobile.kotlin.odata.QueryResult#result QueryResult.result} is valid with respect to the {@link com.sap.cloud.mobile.kotlin.odata.QueryResult#query QueryResult.query}. A result will be considered invalid if it is missing properties that were expected according to the use of {@link com.sap.cloud.mobile.kotlin.odata.DataQuery#select(com.sap.cloud.mobile.kotlin.odata.PropertyPath...) DataQuery.select} or {@link com.sap.cloud.mobile.kotlin.odata.DataQuery#expand(com.sap.cloud.mobile.kotlin.odata.PropertyPath...) DataQuery.expand} in the {@link com.sap.cloud.mobile.kotlin.odata.QueryResult#query QueryResult.query}.
- Throws:
-
{@link com.sap.cloud.mobile.kotlin.odata.QueryResultException} if the result is definitely not valid.
Return the basic list for this result.
- Throws:
-
{@link com.sap.cloud.mobile.kotlin.odata.QueryResultException} if the result does not have the expected type.
Return the byte stream for this result.
- Throws:
-
{@link com.sap.cloud.mobile.kotlin.odata.QueryResultException} if the result does not have the expected type.
Return the character stream for this result.
- Throws:
-
{@link com.sap.cloud.mobile.kotlin.odata.QueryResultException} if the result does not have the expected type.
Return (nullable) The expected {@link com.sap.cloud.mobile.kotlin.odata.QueryResult#result QueryResult.result}, or throw {@link com.sap.cloud.mobile.kotlin.odata.QueryResult#error QueryResult.error} if it is non-null.
Return the complex list for this result.
- Throws:
-
{@link com.sap.cloud.mobile.kotlin.odata.QueryResultException} if the result does not have the expected type.
Return the "count" for this result.
- Throws:
-
{@link com.sap.cloud.mobile.kotlin.odata.QueryResultException} if the result does not have the expected type.
- See Also:
-
{@link com.sap.cloud.mobile.kotlin.odata.DataQuery#count() DataQuery.count}, Requesting the Number of Items in a Collection.
Return (nullable) The "delta link" for this result.
- Throws:
-
{@link com.sap.cloud.mobile.kotlin.odata.QueryResultException} if the result does not have the expected type.
- See Also:
-
{@link com.sap.cloud.mobile.kotlin.odata.EntityValueList#deltaLink EntityValueList.deltaLink}.
Return the delta stream for this result.
- Throws:
-
{@link com.sap.cloud.mobile.kotlin.odata.QueryResultException} if the result does not have the expected type.
Return the entity list for this result.
- Throws:
-
{@link com.sap.cloud.mobile.kotlin.odata.QueryResultException} if the result does not have the expected type.
Return the entity stream for this result.
- Throws:
-
{@link com.sap.cloud.mobile.kotlin.odata.QueryResultException} if the result does not have the expected type.
Return the inline "total count" for this result.
- Throws:
-
{@link com.sap.cloud.mobile.kotlin.odata.QueryResultException} if the result does not have an inline "total count".
- See Also:
-
{@link com.sap.cloud.mobile.kotlin.odata.DataQuery#inlineCount() DataQuery.inlineCount}, System Query Option $count.
Return (nullable) The "next link" for this result.
- Throws:
-
{@link com.sap.cloud.mobile.kotlin.odata.QueryResultException} if the result does not have the expected type.
- See Also:
-
{@link com.sap.cloud.mobile.kotlin.odata.EntityValueList#nextLink EntityValueList.nextLink}.
Return the "next query" for this result. The query will have a non-null URL if this result includes a nextLink.
- Throws:
-
{@link com.sap.cloud.mobile.kotlin.odata.QueryResultException} if the result does not have the expected type.
- See Also:
-
{@link com.sap.cloud.mobile.kotlin.odata.EntityValueList#nextLink EntityValueList.nextLink}.
Return (nullable) The optional basic value of this result.
- Throws:
-
{@link com.sap.cloud.mobile.kotlin.odata.QueryResultException} if the result does not have the expected type.
Return (nullable) The optional complex value of this result.
- Throws:
-
{@link com.sap.cloud.mobile.kotlin.odata.QueryResultException} if the result does not have the expected type.
Return (nullable) The optional entity value of this result.
- Throws:
-
{@link com.sap.cloud.mobile.kotlin.odata.QueryResultException} if the result does not have the expected type.
Return the required basic value of this result.
- Throws:
-
{@link com.sap.cloud.mobile.kotlin.odata.QueryResultException} if the result does not have the expected type.
Return the required complex value of this result.
- Throws:
-
{@link com.sap.cloud.mobile.kotlin.odata.QueryResultException} if the result does not have the expected type.
Return the required entity value of this result.
- Throws:
-
{@link com.sap.cloud.mobile.kotlin.odata.QueryResultException} if the result does not have the expected type.
Resolve the {@link com.sap.cloud.mobile.kotlin.odata.StructureBase#dataPath StructureBase.dataPath} for each structure in the graph of this query result.
Return this query result, after calling {@link com.sap.cloud.mobile.kotlin.odata.StructureBase#setDefaultValues(kotlin.Boolean, kotlin.Boolean, kotlin.Boolean, kotlin.Boolean, kotlin.Boolean) StructureBase.setDefaultValues} on all structures within the {@link com.sap.cloud.mobile.kotlin.odata.QueryResult#result QueryResult.result}.