Class sap.ui.model.analytics.odata4analytics.SortExpressionModule: sap/ui/model/analytics/odata4analytics
Representation of a $orderby expression for an OData entity type.
Constructor Summary
new sap.ui.model.analytics.odata4analytics.SortExpression(oModel, oSchema, oEntityType)Create a representation of an order by expression for a given entity type.
Method Summary
getExpressionsAsUI5SorterArray()Get an array of SAPUI5 Sorter objects corresponding to this expression.
getURIOrderByOptionValue(oSelectedPropertyNames)Get the value for the OData system query option $orderby corresponding to this expression.
removeSorter(sPropertyName)Removes the order by expression for the given property name from the list of order by expression.
Constructor Detail
new sap.ui.model.analytics.odata4analytics.SortExpression(oModel, oSchema, oEntityType)
Create a representation of an order by expression for a given entity type. It can be rendered as value for the $orderby system query option.
Parameters:
{object} | oModel | DataJS object for the OData model containing this entity type |
{object} | oSchema | DataJS object for the schema containing this entity type |
{sap.ui.model.analytics.odata4analytics.EntityType} | oEntityType | object for the entity type |
Method Detail
addSorter(sPropertyName, sSortOrder): sap.ui.model.analytics.odata4analytics.SortExpression
Add a condition to the order by expression. It replaces any previously specified sort order for the property.
Parameters:
{string} | sPropertyName | The name of the property bound in the condition |
{sap.ui.model.analytics.odata4analytics.SortOrder} | sSortOrder | sorting order used for the condition |
Exceptions:
Exception if the property is unknown, not sortable or already added as sorter |
Returns:
{sap.ui.model.analytics.odata4analytics.SortExpression} | This object for method chaining |
getEntityType(): sap.ui.model.analytics.odata4analytics.EntityType
Get description for this entity type
Returns:
{sap.ui.model.analytics.odata4analytics.EntityType} | The object representing the entity type |
getExpressionAsUI5Sorter(): sap.ui.model.Sorter
Get the first SAPUI5 Sorter object.
Returns:
{sap.ui.model.Sorter} | first sorter object or null if empty |
getExpressionsAsUI5SorterArray(): array(sap.ui.model.Sorter)
Get an array of SAPUI5 Sorter objects corresponding to this expression.
Returns:
{array(sap.ui.model.Sorter)} | List of sorter objects representing this expression |