FactuGES_ERP/packages/rdx-criteria/src/codelytv/Order.js

22 lines
634 B
JavaScript

import { OrderBy } from "./OrderBy";
import { OrderType, OrderTypes } from "./OrderType";
export class Order {
orderBy;
orderType;
constructor(orderBy, orderType) {
this.orderBy = orderBy;
this.orderType = orderType;
}
static none() {
return new Order(new OrderBy(""), new OrderType(OrderTypes.NONE));
}
static fromPrimitives(orderBy, orderType) {
return orderBy !== null
? new Order(new OrderBy(orderBy), new OrderType(orderType))
: Order.none();
}
isNone() {
return this.orderType.isNone();
}
}
//# sourceMappingURL=Order.js.map