1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.isFilterLink = exports.FilterLink = void 0;
|
4 | /**
|
5 | * Data structure to represent filter on properties of a navigation property (link).
|
6 | * In OData v2 filtering for navigation properties is ONLY supported for properties with a one-to-one cardinality ([[OneToOneLink]]).
|
7 | *
|
8 | * Example:
|
9 | * In the following filter statement `Entity.requestBuilder().filter(Entity.to_NavProperty.filter(LinkedEntity.property.equals(value)))`,
|
10 | * `Entity.to_NavProperty.filter(LinkedEntity.property.equals(value))` is a `FilterLink`.
|
11 | *
|
12 | * In OData v4 filtering is also possible on one-to-many links. See [[OneToManyLink]].
|
13 | * @typeparam EntityT - Type of the entity to be filtered.
|
14 | * @typeparam LinkedEntityT - Type of the linked entity which is used in the filter.
|
15 | */
|
16 | var FilterLink = /** @class */ (function () {
|
17 | /**
|
18 | * Creates an instance of `FilterLink`.
|
19 | * @param link - Linked entity to be used in the filter.
|
20 | * @param filters - List of filterables for the linked entity.
|
21 | */
|
22 | function FilterLink(link, filters) {
|
23 | this.link = link;
|
24 | this.filters = filters;
|
25 | }
|
26 | return FilterLink;
|
27 | }());
|
28 | exports.FilterLink = FilterLink;
|
29 | function isFilterLink(filterable) {
|
30 | return (typeof filterable['link'] !== 'undefined' &&
|
31 | typeof filterable['filters'] !== 'undefined');
|
32 | }
|
33 | exports.isFilterLink = isFilterLink;
|
34 | //# sourceMappingURL=filter-link.js.map |
\ | No newline at end of file |