Constructs a new metamodel instance which represents the complete schema of one baqend app
Defines if the Metamodel has been finalized
Indicates if there is currently no exclusive operation executed
true
If no exclusive lock is hold
Return the metamodel embeddable type representing the embeddable class.
the metamodel embeddable type or null if the class is not a managed embeddable
the type of the represented embeddable class
Return the metamodel entity type representing the entity.
the metamodel entity type or null if the class is not a managed entity
the type of the represented entity
Return the metamodel managed type representing the entity, mapped superclass, or embeddable class.
the metamodel managed type
the type of the represented managed class
Waits on the previously requested operation and calls the doneCallback if the operation is fulfilled
A promise which completes successfully, when the previously requested operation completes
Optional
doneCallback: ((this: Metamodel) => any)The callback which will be invoked when the previously operations on this object is completed.
Optional
failCallback: ((error: Error) => any)When the lock can't be released caused by a none recoverable error
Store all local schema data on the server, or the provided one
Note: The schema must be initialized, by init or load
Optional
managedType: ManagedType<any>The specific type to persist, if omitted the complete schema will be updated
Private
sendProtected
withProtected
Try to aquire an exclusive lock and executes the given callback.
A promise
If the lock can't be aquired
The exclusive operation to execute
Optional
critical: boolean = falseIndicates if the operation is critical. If the operation is critical and the operation fails, then the lock will not be released
Generated using TypeDoc
This base class provides an lock interface to execute exclusive operations