SQLMapping
class in package klyn.data.sql.internal

    public final class SQLMapping<T, TId> extends MappingDescriptor<T, TId> implements SQLMappingRegistration:

MappingDescriptor
└ SQLMapping
All Implemented Interfaces: 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.

Example

    mapping = SQLMapping<User, Int>()
    print(mapping.tableName)

Properties

Modifier and Type | Member | Description
--- | --- | ---
public readonly property | identity `identity as SQLPropertyMapping:` | Effective simple identity mapping.
public readonly property | mappedEntity `mappedEntity as SQLMappedEntity:` | Effective immutable physical mapping used by factory services.
public override readonly property | mappingHash `mappingHash as String:` | Stable fingerprint of every effective SQL mapping component.
public readonly property | properties `properties as ArrayList<SQLPropertyMapping>:` | Ordered persistent property mappings.
public readonly property | schemaName `schemaName as String:` | Effective SQL schema name, or an empty string.
public readonly property | tableName `tableName as String:` | Effective SQL table name.

Inherited Properties
property Inherited Properties from MappingDescriptor: defaultMapping, entityType, identityType, mappingHash, name, providerName
property Inherited Properties from SQLMappingRegistration: mappedEntity
property Inherited Properties from MappingRegistration: mappingHash
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | SQLMapping `SQLMapping( mappedEntity as SQLMappedEntity, name as String = "default", defaultMapping as Boolean = true ):` | Creates a concrete generic descriptor from a factory-cached mapping.
public | SQLMapping `SQLMapping(name as String = "default", defaultMapping as Boolean = true):` | Resolves and validates the mapping once.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | materialize `materialize(rows as ResultSet, startIndex as Int = 1) as T:` | Creates and hydrates one entity from the current SQL result row.
public | propertyForPath `propertyForPath(path as String) as SQLPropertyMapping:` | Returns one mapped property or fails before provider execution.