Version: 4.3

Class: MetadataStorage

Hierarchy

  • MetadataStorage

Constructors

constructor

+ new MetadataStorage(metadata?: Dictionary<EntityMetadata>): MetadataStorage

Defined in packages/core/src/metadata/MetadataStorage.ts:12

Parameters:

NameTypeDefault value
metadataDictionary<EntityMetadata>{}

Returns: MetadataStorage

Properties

metadata

Private Readonly metadata: Dictionary<EntityMetadata>

Defined in packages/core/src/metadata/MetadataStorage.ts:12


metadata

Static Private Readonly metadata: Dictionary<EntityMetadata> = Utils.getGlobalStorage('metadata')

Defined in packages/core/src/metadata/MetadataStorage.ts:10


subscribers

Static Private Readonly subscribers: Dictionary<EventSubscriber> = Utils.getGlobalStorage('subscribers')

Defined in packages/core/src/metadata/MetadataStorage.ts:11

Methods

decorate

decorate(em: EntityManager): void

Defined in packages/core/src/metadata/MetadataStorage.ts:103

Parameters:

NameType
emEntityManager

Returns: void


find

find<T>(entity: string): EntityMetadata<T> | undefined

Defined in packages/core/src/metadata/MetadataStorage.ts:87

Type parameters:

NameTypeDefault
TAnyEntity<T>any

Parameters:

NameType
entitystring

Returns: EntityMetadata<T> | undefined


get

get<T>(entity: string, init?: boolean, validate?: boolean): EntityMetadata<T>

Defined in packages/core/src/metadata/MetadataStorage.ts:75

Type parameters:

NameTypeDefault
TAnyEntity<T>any

Parameters:

NameTypeDefault value
entitystring-
initbooleanfalse
validatebooleantrue

Returns: EntityMetadata<T>


getAll

getAll(): Dictionary<EntityMetadata>

Defined in packages/core/src/metadata/MetadataStorage.ts:59

Returns: Dictionary<EntityMetadata>


getByDiscriminatorColumn

getByDiscriminatorColumn<T>(meta: EntityMetadata<T>, data: EntityData<T>): EntityMetadata<T> | undefined

Defined in packages/core/src/metadata/MetadataStorage.ts:63

Type parameters:

Name
T

Parameters:

NameType
metaEntityMetadata<T>
dataEntityData<T>

Returns: EntityMetadata<T> | undefined


has

has(entity: string): boolean

Defined in packages/core/src/metadata/MetadataStorage.ts:91

Parameters:

NameType
entitystring

Returns: boolean


reset

reset(entity: string): void

Defined in packages/core/src/metadata/MetadataStorage.ts:99

Parameters:

NameType
entitystring

Returns: void


set

set(entity: string, meta: EntityMetadata): EntityMetadata

Defined in packages/core/src/metadata/MetadataStorage.ts:95

Parameters:

NameType
entitystring
metaEntityMetadata

Returns: EntityMetadata


clear

Staticclear(): void

Defined in packages/core/src/metadata/MetadataStorage.ts:54

Returns: void


getMetadata

StaticgetMetadata(): Dictionary<EntityMetadata>

Defined in packages/core/src/metadata/MetadataStorage.ts:18

Returns: Dictionary<EntityMetadata>

StaticgetMetadata<T>(entity: string, path: string): EntityMetadata<T>

Defined in packages/core/src/metadata/MetadataStorage.ts:19

Type parameters:

NameTypeDefault
TAnyEntity<T>any

Parameters:

NameType
entitystring
pathstring

Returns: EntityMetadata<T>


getMetadataFromDecorator

StaticgetMetadataFromDecorator<T>(target: T & Dictionary): EntityMetadata<T>

Defined in packages/core/src/metadata/MetadataStorage.ts:38

Type parameters:

NameDefault
Tany

Parameters:

NameType
targetT & Dictionary

Returns: EntityMetadata<T>


getSubscriberMetadata

StaticgetSubscriberMetadata(): Dictionary<EventSubscriber>

Defined in packages/core/src/metadata/MetadataStorage.ts:46

Returns: Dictionary<EventSubscriber>


init

Staticinit(): MetadataStorage

Defined in packages/core/src/metadata/MetadataStorage.ts:50

Returns: MetadataStorage


isKnownEntity

StaticisKnownEntity(name: string): boolean

Defined in packages/core/src/metadata/MetadataStorage.ts:34

Parameters:

NameType
namestring

Returns: boolean

Last updated on by Martin Adámek