Class MetadataStore

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(): MetadataStore

Returns

MetadataStore

constructor(config?: MetadataStoreOptions): MetadataStore

Parameters

Returns

MetadataStore

Properties

public namingConvention: NamingConvention

Methods

public addDataService(dataService: DataService)

Parameters

public addEntityType(structuralType: IStructuralType)

Parameters

public exportMetadata(): string

Returns

string

public fetchMetadata(dataService: string, callback?: (data: any) => void, errorCallback?: ErrorCallback): Promise

Parameters

  • dataService: string
  • callback?: (data: any) => void optional
  • errorCallback?: ErrorCallback optional

Returns

Promise

public fetchMetadata(dataService: DataService, callback?: (data: any) => void, errorCallback?: ErrorCallback): Promise

Parameters

Returns

Promise

public getDataService(serviceName: string): DataService

Parameters

  • serviceName: string

Returns

DataService

public getEntityType(entityTypeName: string, okIfNotFound?: boolean): IStructuralType

Parameters

  • entityTypeName: string
  • okIfNotFound?: boolean optional

Returns

IStructuralType

public getEntityTypeNameForResourceName(resourceName: string): string

Parameters

  • resourceName: string

Returns

string

public getEntityTypes(): IStructuralType[]

Returns

IStructuralType[]

public hasMetadataFor(serviceName: string): boolean

Parameters

  • serviceName: string

Returns

boolean

public static importMetadata(exportedString: string): MetadataStore

Parameters

  • exportedString: string

Returns

MetadataStore

public importMetadata(exportedString: string): MetadataStore

Parameters

  • exportedString: string

Returns

MetadataStore

public isEmpty(): boolean

Returns

boolean

public registerEntityTypeCtor(entityTypeName: string, entityCtor: Function, initializationFn?: (entity: breeze.Entity) => void)

Parameters

  • entityTypeName: string
  • entityCtor: Function
  • initializationFn?: (entity: breeze.Entity) => void optional

public setEntityTypeForResourceName(resourceName: string, entityType: EntityType)

Parameters

public setEntityTypeForResourceName(resourceName: string, entityTypeName: string)

Parameters

  • resourceName: string
  • entityTypeName: string

public trackUnmappedType(entityCtor: Function, interceptor?: Function)

Parameters

  • entityCtor: Function
  • interceptor?: Function optional