import { DataType } from '../types/data_type'; import { EntityAttrKind } from '../types/entity_attr_kind'; import { MetaEntityDTO, MetaEntityAttrDTO } from './dto/meta_entity_dto'; import { MetaData } from './meta_data'; import { ValueEditor } from './value_editor'; /** * Represents one entity. */ export declare class MetaEntity { /** * The parent. */ parent: MetaEntity; /** The id. */ id: string; /** The name of entity. */ name: string; /** The caption of entity attr. */ caption: string; /** The caption of entity attr in plural form. */ captionPlural: string; /** The description of entity. */ description: string; /** Returns false if this entity is read-only */ isEditable: boolean; /** * List of Attributes that belong to this entity. */ attributes: MetaEntityAttr[]; /** * List of sub entities that belong to this entity. */ subEntities: MetaEntity[]; /** The default constructor. */ constructor(parent?: MetaEntity); /** * Loads entity from its JSON representation object. * @param model The Data Model. * @param dto The JSON representation object. */ loadFromData(model: MetaData, dto: MetaEntityDTO): void; scan(processAttribute?: (attr: MetaEntityAttr, opts: any) => void, processEntity?: (entity: MetaEntity, opts: any) => void): void; getFirstPrimaryAttr(): MetaEntityAttr | null; getPrimaryAttrs(): MetaEntityAttr[]; } export declare class MetaEntityAttr { /** The id. */ id: string; /** The lookupAttr. */ lookupAttr: string; dataAttr: string; lookupEntity: string; lookupDataAttr: string; /** The caption. */ caption: string; /** The caption in plural form. */ captionPlural: string; /** The description. */ description: string; dataType: DataType; size: number; /** * The value indicating wether the attribute is a primary key. */ isPrimaryKey: boolean; /** * The value indicating wether the attribute is a primary key. */ isForeignKey: boolean; /** * The value indicating wether the attribute is editable. */ isEditable: boolean; /** * The value indicating wether the attribute is shown on view page. */ showOnView: boolean; /** * The value indicating wether the attribute is shown create page. */ showOnCreate: boolean; /** * The value indicating wether the attribute is shown edit page. */ showOnEdit: boolean; /** * The value indicating wether the attribute can be null key. */ isNullable: boolean; /** * The value indicating wether the attribute is shown in Lookup Editor. */ showInLookup: boolean; /** * The attribute expression. */ expr: string; /** The kind. */ kind: EntityAttrKind; /** * The default editor. */ defaultEditor: ValueEditor; /** * The default value */ defaultValue?: any; /** * The parent */ entity: MetaEntity; /** * User data */ userData?: string; /** * The display format for the attribute */ displayFormat?: string; /** The default constructor. */ constructor(entity: MetaEntity); /** * Loads entity attribute from JSON representation object. * @param model The Data Model. * @param dto The JSON representation object. */ loadFromData(model: MetaData, dto: MetaEntityAttrDTO): void; }