import { DbSet } from "./DbSet"; import { IRelationChangeEventParam } from "../MetaData/Interface/IChangeEventParam"; import { EntityState } from "./EntityState"; import { IEntityEntryOption } from "./Interface/IEntityEntry"; import { RelationEntry } from "./RelationEntry"; import { IEntityMetaData } from "../MetaData/Interface/IEntityMetaData"; export declare class EntityEntry implements IEntityEntryOption { readonly dbSet: DbSet; entity: T; key: string; private _state; state: EntityState; delete(): void; add(): void; enableTrackChanges: boolean; readonly metaData: IEntityMetaData; relationMap: { [relationName: string]: Map | RelationEntry>; }; constructor(dbSet: DbSet, entity: T, key: string); readonly isCompletelyLoaded: boolean; originalValues: Map; isPropertyModified(prop: keyof T): boolean; getOriginalValue(prop: keyof T): any; protected onRelationChanged(entity: T, param: IRelationChangeEventParam): void; getRelation(relationName: string, relatedEntry: EntityEntry): RelationEntry; removeRelation(relationEntry: RelationEntry | RelationEntry): void; updateRelationKey(relationEntry: RelationEntry | RelationEntry, oldEntityKey: string): void; resetChanges(...properties: Array): void; acceptChanges(...properties: Array): void; setOriginalValues(originalValues: { [key: string]: any; }): void; setOriginalValue(property: keyof T, value: any): void; getModifiedProperties(): (keyof T)[]; getPrimaryValues(): any; /** * Reloads the entity from the database overwriting any property values with values from the database. * For modified properties, then the original value will be overwrite with vallue from the database. * Note: To clean entity from database, call resetChanges after reload. */ reload(): Promise; /** * Load relation to this entity. */ loadRelation(...relations: ((entity: T) => any)[]): Promise; } import "./EntityEntry.partial";