Entity class

Represents one entity.

Extends

MetaEntity

Index

Constructors

Public Properties

Public Methods

Constructors


constructor

The default constructor. ⊕ new Entity(parent?: Entity): Entity

Parameters:


Public Properties


attributes

● attributes: Array<EntityAttr>


caption

The caption of entity attr.

● caption: string


captionPlural

The caption of entity attr in plural form.

● captionPlural: string


description

The description of entity.

● description: string


endpoint

The endpoint of entity. It is used for odata or graphql brokers

● endpoint?: string


id

The id.

● id: string


name

The name of entity.

● name: string


parent

The parent.

● parent: MetaEntity


subEntities

● subEntities: Array<Entity>


useInConditions

The value indicating whether the attribute can be used in query conditions.

● useInConditions: boolean


useInResult

The value indicating whether the attribute can be used in result columns (SELECT clause).

● useInResult: boolean


useInSorting

The value indicating whether the attribute can be used in sorting.

● useInSorting: boolean


Public Methods


loadFromData

Loads entity from its JSON representation object.

▸ loadFromData(model: DataModel,data: EntityData): void

Parameters:

Returns void


scan

▸ scan(processAttribute?: (attr: EntityAttr, opts: any) => void,processEntity?: (entity: Entity, opts: any) => void): void

Parameters:

  • processAttribute: (attr: EntityAttr, opts: any) => void, Optional
  • processEntity: (entity: Entity, opts: any) => void, Optional

Returns void