Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AbstractUnit<TModel>

Base class for implementations of IAbstractUnit.

Type parameters

Hierarchy

Implements

Index

Constructors

Properties

id: string
structureTypeName: string

Accessors

  • get container(): TContainer
  • The parent unit of this unit.

    Returns TContainer

  • get isLoadable(): boolean
  • Whether this unit and all of its children (recursively) can be loaded.

    Returns boolean

  • get isLoaded(): boolean
  • Checks whether all attributes are available at this instant; if false, a load is required to access these properties.

    Returns boolean

  • get isReadOnly(): boolean
  • Whether this unit and all of its children (recursively) are editable.

    Returns boolean

  • get model(): TModel

Methods

  • delete(): void
  • Deletes a model from the model. This will automatically remove the item from its model parent, and update incoming references and send server changes.

    Returns void

  • getContainerAs<T>(containerType: any): T
  • toJSON(): IStructureJSON
  • Renders the structure as plain JSON (without observables magic). This is intended for debugging and development convenience. Note that the resulting object is not of the interface type corresponding to this structure.

    Returns IStructureJSON

  • traverse(visit: (structure: IStructure) => void): void
  • Traverses this structure by calling the provided visitor function on itself and all the structures contained (as part) by it, in depth-first order, and it returns synchronously after that.

    Parameters

    Returns void

  • traverseFind<T>(visit: (structure: IStructure) => T): null | T
  • traversePublicParts(visit: (structure: IStructure) => void): void

Generated using TypeDoc