UNPKG

@sap/odata-v4

Version:

OData V4.0 server library

38 lines (31 loc) 795 B
'use strict'; const Transformation = require('./Transformation'); /** * Sorting transformation. * @extends Transformation * @hideconstructor */ class OrderByTransformation extends Transformation { constructor() { super(Transformation.TransformationKind.ORDER_BY); this._items = []; } /** * Returns the sorting items. * @returns {OrderByItem[]} a non-empty list of order-by items */ getOrderByItems() { return this._items; } /** * Sets the orderby itmes. * @param {OrderByItem[]} orderBy the orderby items * @returns {OrderByTransformation} this transformation * @package */ setOrderBy(orderBy) { this._items = orderBy; return this; } } module.exports = OrderByTransformation;