Member Junction
    Preparing search index...

    Factory seam for creating strongly-typed entity objects. Wraps Metadata.GetEntityObject in production; tests inject a fake returning in-memory entity stand-ins.

    interface IEntityFactory {
        getEntityObject<T extends BaseEntity<unknown>>(
            entityName: string,
            contextUser?: UserInfo,
        ): Promise<T>;
    }

    Implemented by

    Index

    Methods

    • Create a new, unsaved entity object for the named entity. Mirrors Metadata.GetEntityObject<T>(entityName, contextUser).

      Type Parameters

      Parameters

      • entityName: string

        MJ entity name (e.g. MJ: ML Models)

      • OptionalcontextUser: UserInfo

        request user — required on the server for isolation/audit

      Returns Promise<T>