Representation of a $orderby expression for an OData entity type.
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.
new sap.ui.model.analytics.odata4analytics.SortExpression(oModel, oSchema, oEntityType)
Param | Type | Default Value | Description |
---|---|---|---|
oModel | object | datajs object for the OData model containing this entity type |
|
oSchema | object | datajs object for the schema containing this entity type |
|
oEntityType | sap.ui.model.analytics.odata4analytics.EntityType | object for the entity type |
Method | Description |
---|---|
addSorter |
Add a condition to the order by expression. It replaces any previously specified sort order for the property. |
clear |
Clear expression from any sort conditions that may have been set previously |
getEntityType |
Get description for this entity type |
getExpressionAsUI5Sorter |
Get the first SAPUI5 Sorter object. |
getExpressionsAsUI5SorterArray |
Get an array of SAPUI5 Sorter objects corresponding to this expression. |
getURIOrderByOptionValue |
Get the value for the OData system query option $orderby corresponding to this expression. |
removeSorter |
Removes the order by expression for the given property name from the list of order by expression. If no order by expression with this property name exists the method does nothing. |
Add a condition to the order by expression. It replaces any previously specified sort order for the property.
Param | Type | DefaultValue | Description |
---|---|---|---|
sPropertyName | string |
The name of the property bound in the condition |
|
sSortOrder | sap.ui.model.analytics.odata4analytics.SortOrder |
sorting order used for the condition |
Get an array of SAPUI5 Sorter objects corresponding to this expression.
Get the value for the OData system query option $orderby corresponding to this expression.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSelectedPropertyNames | object |
Object with properties requested for $select |
Removes the order by expression for the given property name from the list of order by expression. If no order by expression with this property name exists the method does nothing.
Param | Type | DefaultValue | Description |
---|---|---|---|
sPropertyName | string |
The name of the property to be removed from the condition |