BloomModelRegistry class

Registry holding ModelMeta metadata definitions for migration generation.

BloomModelRegistry acts as a central store for @BloomModel entity metadata descriptors, grouping them by application namespace (appLabel). Used by schema generators and CLI tooling to calculate table schemas, relations, and dependency ordering.

Example:

final registry = BloomModelRegistry.instance;

// Register model metadata
registry.register(UserModelMeta);
registry.register(PostModelMeta);

// Retrieve models for an app
final blogModels = registry.getModelsForApp('blog');

// Retrieve all registered models across apps
final all = registry.allModels;

Properties

allModels List<ModelMeta>
Retrieves a flattened list of all registered ModelMeta definitions across all apps.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
Clears all registered models from the registry.
getModelsForApp(String appLabel) List<ModelMeta>
Retrieves an unmodifiable list of registered ModelMeta definitions for a specific appLabel.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register(ModelMeta meta) → void
Registers a ModelMeta definition into the registry under its ModelMeta.appLabel.
registerAll(Iterable<ModelMeta> metas) → void
Registers multiple ModelMeta definitions in bulk.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance BloomModelRegistry
The global singleton BloomModelRegistry instance.
final