public final class SQLMapping<T, TId> extends MappingDescriptor<T, TId> implements SQLMappingRegistration:
Validated SQL mapping for one concrete entity/key pair.
Reflection is performed once when the repository is created, never in the per-row query translation loop. The descriptor can later be replaced by a compiler-generated equivalent without changing provider contracts.
mapping = SQLMapping<User, Int>() print(mapping.tableName)
| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | identityidentity as SQLPropertyMapping: |
Effective simple identity mapping. |
| public readonly property | mappedEntitymappedEntity as SQLMappedEntity: |
Effective immutable physical mapping used by factory services. |
| public override readonly property | mappingHashmappingHash as String: |
Stable fingerprint of every effective SQL mapping component. |
| public readonly property | propertiesproperties as ArrayList<SQLPropertyMapping>: |
Ordered persistent property mappings. |
| public readonly property | schemaNameschemaName as String: |
Effective SQL schema name, or an empty string. |
| public readonly property | tableNametableName as String: |
Effective SQL table name. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | SQLMappingSQLMapping(
mappedEntity as SQLMappedEntity,
name as String = "default",
defaultMapping as Boolean = true
): |
Creates a concrete generic descriptor from a factory-cached mapping. |
| public | SQLMappingSQLMapping(name as String = "default", defaultMapping as Boolean = true): |
Resolves and validates the mapping once. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | materialize | Creates and hydrates one entity from the current SQL result row. |
| public | propertyForPathpropertyForPath(path as String) as SQLPropertyMapping: |
Returns one mapped property or fails before provider execution. |