1 | import { Constructable, Entity, EntityIdentifiable } from '../entity';
|
2 | import { Link } from '../selectable';
|
3 | import type { Filterable } from './filterable';
|
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 | export declare class FilterLink<EntityT extends Entity, LinkedEntityT extends Entity = any> implements EntityIdentifiable<EntityT> {
|
17 | link: Link<EntityT, LinkedEntityT>;
|
18 | filters: Filterable<LinkedEntityT>[];
|
19 | /**
|
20 | * Constructor type of the entity to be filtered.
|
21 | */
|
22 | readonly _entityConstructor: Constructable<EntityT>;
|
23 | /**
|
24 | * Entity type of the entity tp be filtered.
|
25 | */
|
26 | readonly _entity: EntityT;
|
27 | /**
|
28 | * Linked entity to be filtered by.
|
29 | */
|
30 | readonly _linkedEntityType: LinkedEntityT;
|
31 | /**
|
32 | * Creates an instance of `FilterLink`.
|
33 | * @param link - Linked entity to be used in the filter.
|
34 | * @param filters - List of filterables for the linked entity.
|
35 | */
|
36 | constructor(link: Link<EntityT, LinkedEntityT>, filters: Filterable<LinkedEntityT>[]);
|
37 | }
|
38 | export declare function isFilterLink<EntityT extends Entity, LinkedT extends Entity>(filterable: Filterable<EntityT>): filterable is FilterLink<EntityT, LinkedT>;
|
39 | //# sourceMappingURL=filter-link.d.ts.map |
\ | No newline at end of file |