MappingRegistry
classin packageklyn.data
public final class MappingRegistry:
MappingRegistry

Immutable registry of heterogeneous, statically typed entity mappings.

The registry performs deterministic selection only. It never scans live provider resources and never guesses between ambiguous defaults.

registry = MappingRegistry([userSQLMapping, userJSONMapping])
selected = registry.find(type(User), type(Int), "sql")
Properties
Modifier and Type Member Description
public static readonly property empty
empty as MappingRegistry:
Shared immutable empty registry.
public readonly property registrations
registrations as IList<MappingRegistration>:
Immutable snapshot of every registered mapping.
Constructors
Modifier and Type Member Description
public MappingRegistry
MappingRegistry(registrations as IList<MappingRegistration> = []):
Copies and validates mapping registrations.
Methods
Modifier and Type Member Description
public find
find( entityType as Type, identityType as Type, providerName as String, mappingName as String = "" ) as MappingRegistration:
Finds a matching registration without erasing its stored generic object.
public resolve
resolve<T, TId>( providerName as String, mappingName as String = "" ) as MappingDescriptor<T, TId>:
Resolves one exact typed descriptor or reports missing metadata.