class sap.ui.model.analytics.odata4analytics.QueryResultRequest

UX Guidelines:
Implements:
Available since: N/A
Extends:
Module: sap/ui/model/analytics/odata4analytics
Application Component: CA-UI5-COR

Creation of URIs for fetching query results.


Constructor

Create a request object for interaction with a query result.

new sap.ui.model.analytics.odata4analytics.QueryResultRequest(oQueryResult, oParameterizationRequest?)
Param Type Default Value Description
oQueryResult sap.ui.model.analytics.odata4analytics.QueryResult

Description of a query parameterization

oParameterizationRequest? sap.ui.model.analytics.odata4analytics.ParameterizationRequest

Request object for interactions with the parameterization of this query. Only required if the query service includes parameters.


Methods Overview

Method Description
addRecursiveHierarchy

Adds a recursive hierarchy to the aggregation level.

addToAggregationLevel

Add one or more dimensions to the aggregation level

getAggregationLevel

Get the names of the dimensions included in the aggregation level

getAggregationLevelDetails

Get details about a dimensions included in the aggregation level

getFilterExpression

Get the filter expression for this request.

Expressions are represented by separate objects. If none exists so far, a new expression object gets created.

getMeasureNames

Get the names of the measures included in the query result request

getParameterizationRequest

Retrieves the current parametrization request

getQueryResult

Get the description of the query result on which this request operates on

getResultPageBoundaries

Returns the current page boundaries as object with properties start and end. If the end of the page is unbounded, end is null.

getSortExpression

Get the sort expression for this request.

Expressions are represented by separate objects. If none exists so far, a new expression object gets created.

getURIQueryOptionValue

Get the value of a query option for the OData request URI corresponding to this request.

getURIToQueryResultEntitySet

Get the URI to locate the entity set for the query result.

getURIToQueryResultEntries

Get the unescaped URI to fetch the query result.

includeDimensionKeyTextAttributes

Specify which dimension components shall be included in the query result. The settings get applied to the currently defined aggregation level.

includeMeasureRawFormattedValueUnit

Specify which measure components shall be included in the query result. The settings get applied to the currently set measures.

removeFromAggregationLevel

Remove one or more dimensions from the aggregation level. The method also removed a potential sort expression on the dimension.

setAggregationLevel

Set the aggregation level for the query result request. By default, the query result will include the properties holding the keys of the given dimensions. This setting can be changed using includeDimensionKeyTextAttributes.

setFilterExpression

Set the filter expression for this request.

Expressions are represented by separate objects. Calling this method replaces the filter object maintained by this request.

setMeasures

Set the measures to be included in the query result request. By default, the query result will include the properties holding the raw values of the given measures. This setting can be changed using includeMeasureRawFormattedValueUnit.

setParameterizationRequest

Set the parameterization request required for interactions with the query result of parameterized queries. This method provides an alternative way to assign a parameterization request to a query result request.

setRequestOptions

Set further options to be applied for the OData request to fetch the query result

setResourcePath

Set the resource path to be considered for the OData request URI of this query request object. This method provides an alternative way to assign a path comprising a parameterization. If a path is provided, it overwrites any parameterization object that might have been specified separately.

setResultPageBoundaries

Specify that only a page of the query result shall be returned. A page is described by its boundaries, that are row numbers for the first and last rows in the query result to be returned.

setSortExpression

Set the sort expression for this request.

Expressions are represented by separate objects. Calling this method replaces the sort object maintained by this request.

addRecursiveHierarchy

Adds a recursive hierarchy to the aggregation level.

Param Type DefaultValue Description
sHierarchyDimensionName string

Name of dimension whose hierarchy shall be part of the aggregation level

bIncludeExternalKey boolean

Indicator whether or not to include the external node key (if available) in the query result

bIncludeText boolean

Indicator whether or not to include the node text (if available) in the query result

addToAggregationLevel

Add one or more dimensions to the aggregation level

Param Type DefaultValue Description
aDimensionName undefined

Array of dimension names to be added to the already defined aggregation level.

getAggregationLevel

Get the names of the dimensions included in the aggregation level

getAggregationLevelDetails

Get details about a dimensions included in the aggregation level

Param Type DefaultValue Description
sDImensionName undefined

Name of a dimension included in the aggregation level of this request, for which details shall be returned

getFilterExpression

Get the filter expression for this request.

Expressions are represented by separate objects. If none exists so far, a new expression object gets created.

getMeasureNames

Get the names of the measures included in the query result request

getParameterizationRequest

Retrieves the current parametrization request

getQueryResult

Get the description of the query result on which this request operates on

getResultPageBoundaries

Returns the current page boundaries as object with properties start and end. If the end of the page is unbounded, end is null.

getSortExpression

Get the sort expression for this request.

Expressions are represented by separate objects. If none exists so far, a new expression object gets created.

getURIQueryOptionValue

Get the value of a query option for the OData request URI corresponding to this request.

Param Type DefaultValue Description
sQueryOptionName string

Identifies the query option: $select, $filter,$orderby ... or any custom query option

getURIToQueryResultEntitySet

Get the URI to locate the entity set for the query result.

Param Type DefaultValue Description
sServiceRootURI string

(optional) Identifies the root of the OData service

getURIToQueryResultEntries

Get the unescaped URI to fetch the query result.

Param Type DefaultValue Description
sServiceRootURI string

(optional) Identifies the root of the OData service

sResourcePath string

(optional) OData resource path to be considered. If provided, it overwrites any parameterization object that might have been specified separately.

includeDimensionKeyTextAttributes

Specify which dimension components shall be included in the query result. The settings get applied to the currently defined aggregation level.

Param Type DefaultValue Description
sDimensionName string

Name of the dimension for which the settings get applied. Specify null to apply the settings to all dimensions in the aggregation level.

bIncludeKey boolean

Indicator whether or not to include the dimension key in the query result. Pass null to keep current setting.

bIncludeText boolean

Indicator whether or not to include the dimension text (if available) in the query result. Pass null to keep current setting.

aAttributeName undefined

Array of dimension attribute names to be included in the result. Pass null to keep current setting. This argument is ignored if sDimensionName is null.

includeMeasureRawFormattedValueUnit

Specify which measure components shall be included in the query result. The settings get applied to the currently set measures.

Param Type DefaultValue Description
sMeasureName string

Name of the measure for which the settings get applied. Specify null to apply the settings to all currently set measures.

bIncludeRawValue boolean

Indicator whether or not to include the raw value in the query result. Pass null to keep current setting.

bIncludeFormattedValue boolean

Indicator whether or not to include the formatted value (if available) in the query result. Pass null to keep current setting.

bIncludeUnit boolean

Indicator whether or not to include the unit (if available) in the query result. Pass null to keep current setting.

removeFromAggregationLevel

Remove one or more dimensions from the aggregation level. The method also removed a potential sort expression on the dimension.

Param Type DefaultValue Description
aDimensionName undefined

Array of dimension names to be removed from the already defined aggregation level.

setAggregationLevel

Set the aggregation level for the query result request. By default, the query result will include the properties holding the keys of the given dimensions. This setting can be changed using includeDimensionKeyTextAttributes.

Param Type DefaultValue Description
aDimensionName undefined

Array of dimension names to be part of the aggregation level. If null, the aggregation level includes all dimensions, if empty, no dimension is included.

setFilterExpression

Set the filter expression for this request.

Expressions are represented by separate objects. Calling this method replaces the filter object maintained by this request.

Param Type DefaultValue Description
oFilter sap.ui.model.analytics.odata4analytics.FilterExpression

The filter object to be associated with this request.

setMeasures

Set the measures to be included in the query result request. By default, the query result will include the properties holding the raw values of the given measures. This setting can be changed using includeMeasureRawFormattedValueUnit.

Param Type DefaultValue Description
aMeasureName undefined

Array of measure names to be part of the query result request. If null, the request includes all measures, if empty, no measure is included.

setParameterizationRequest

Set the parameterization request required for interactions with the query result of parameterized queries. This method provides an alternative way to assign a parameterization request to a query result request.

Param Type DefaultValue Description
oParameterizationRequest undefined

Request object for interactions with the parameterization of this query

setRequestOptions

Set further options to be applied for the OData request to fetch the query result

Param Type DefaultValue Description
bIncludeEntityKey boolean

Indicates whether or not the entity key should be returned for every entry in the query result. Default is not to include it. Pass null to keep current setting.

bIncludeCount boolean

Indicates whether or not the result shall include a count for the returned entities. Default is not to include it. Pass null to keep current setting.

bReturnNoEntities boolean

Indicates whether or not the result shall be empty. This will translate to $top=0 in the OData request and override any setting done with setResultPageBoundaries. The default is not to suppress entities in the result. Pass null to keep current setting. The main use case for this option is to create a request with $inlinecount returning an entity count.

setResourcePath

Set the resource path to be considered for the OData request URI of this query request object. This method provides an alternative way to assign a path comprising a parameterization. If a path is provided, it overwrites any parameterization object that might have been specified separately.

Param Type DefaultValue Description
sResourcePath string

Resource path pointing to the entity set of the query result. Must include a valid parameterization if query contains parameters.

setResultPageBoundaries

Specify that only a page of the query result shall be returned. A page is described by its boundaries, that are row numbers for the first and last rows in the query result to be returned.

Param Type DefaultValue Description
start int

The first row of the query result to be returned. Numbering starts at 1. Passing null is equivalent to start with the first row.

end int

The last row of the query result to be returned. Passing null is equivalent to get all rows up to the end of the query result.

setSortExpression

Set the sort expression for this request.

Expressions are represented by separate objects. Calling this method replaces the sort object maintained by this request.

Param Type DefaultValue Description
oSorter sap.ui.model.analytics.odata4analytics.SortExpression

The sort object to be associated with this request.