src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function(sPropertyName, sSortOrder) {
			var oProperty = this._oEntityType.findPropertyByName(sPropertyName);
			if (oProperty == null) {
				throw "Cannot add sort condition for unknown property name " + sPropertyName; // TODO
			}
			var oExistingSorterEntry = this._containsSorter(sPropertyName);
			if (oExistingSorterEntry != null) {
				oExistingSorterEntry.sorter.order = sSortOrder;
				return this;
			}
			var aSortablePropertyNames = this._oEntityType.getSortablePropertyNames();
			if (((aSortablePropertyNames ? Array.prototype.indexOf.call(aSortablePropertyNames, sPropertyName) : -1)) === -1) {
				throw "Cannot add sort condition for not sortable property name " + sPropertyName; // TODO
			}

			this._aSortCondition.push({
				property : oProperty,
				order : sSortOrder
			});
			return this;
		}
function(sPropertyName, sSortOrder) {
			var oProperty = this._oEntityType.findPropertyByName(sPropertyName);
			if (oProperty == null) {
				throw "Cannot add sort condition for unknown property name " + sPropertyName; // TODO
			}
			var oExistingSorterEntry = this._containsSorter(sPropertyName);
			if (oExistingSorterEntry != null) {
				oExistingSorterEntry.sorter.order = sSortOrder;
				return this;
			}
			var aSortablePropertyNames = this._oEntityType.getSortablePropertyNames();
			if (((aSortablePropertyNames ? Array.prototype.indexOf.call(aSortablePropertyNames, sPropertyName) : -1)) === -1) {
				throw "Cannot add sort condition for not sortable property name " + sPropertyName; // TODO
			}

			this._aSortCondition.push({
				property : oProperty,
				order : sSortOrder
			});
			return this;
		}
function ( sPropertyName , sSortOrder ) { var oProperty = this . _oEntityType . findPropertyByName ( sPropertyName ) ; if ( oProperty == null ) { throw "Cannot add sort condition for unknown property name " + sPropertyName ; // TODO } var oExistingSorterEntry = this . _containsSorter ( sPropertyName ) ; if ( oExistingSorterEntry != null ) { oExistingSorterEntry . sorter . order = sSortOrder ; return this ; } var aSortablePropertyNames = this . _oEntityType . getSortablePropertyNames ( ) ; if ( ( ( aSortablePropertyNames ? Array . prototype . indexOf . call ( aSortablePropertyNames , sPropertyName ) : - 1 ) ) === - 1 ) { throw "Cannot add sort condition for not sortable property name " + sPropertyName ; // TODO } this . _aSortCondition . push ( { property : oProperty , order : sSortOrder } ) ; return this ; }
Add a condition to the order by expression. It replaces any previously specified
sort order for the property.

@param {string}
sPropertyName The name of the property bound in the condition
@param {sap.ui.model.analytics.odata4analytics.SortOrder}
sSortOrder sorting order used for the condition
@throws 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
@public
@function
@name sap.ui.model.analytics.odata4analytics.SortExpression#addSorter
Add a condition to the order by expression . It replaces any previously specified sort order for the property .