SQLMappedEntity
class in package klyn.data.sql.internal

    public final class SQLMappedEntity:

SQLMappedEntity

Type-erased immutable SQL metadata shared by repositories and schema tools.

Parsing mapping annotations in this single class prevents query materialization and DDL generation from interpreting an entity differently. Reflection runs once per factory/repository construction, never per row.

    mapped = SQLMappedEntity(User.type)
    print(mapped.tableName)

Properties

Modifier and Type | Member | Description
--- | --- | ---
public readonly property | entityType `entityType as Type` | No summary.
public readonly property | identity `identity as SQLPropertyMapping` | No summary.
public readonly property | identityType `identityType as Type` | No summary.
public readonly property | mappingHash `mappingHash as String` | No summary.
public readonly property | properties `properties as ArrayList<SQLPropertyMapping>` | No summary.
public readonly property | schemaName `schemaName as String` | No summary.
public readonly property | tableName `tableName as String` | No summary.

Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | SQLMappedEntity `SQLMappedEntity(entityType as Type):` | Resolves and validates all effective SQL annotations for one entity.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | changedProperties `changedProperties( entity as Object, snapshot as IList<Object> ) as ArrayList<SQLPropertyMapping>:` | Returns mapped properties changed since a snapshot.
public | copyState `copyState(source as Object, target as Object) as Void:` | Copies every persistent property between compatible entity instances.
public | generatedIdentityUnset `generatedIdentityUnset(entity as Object) as Boolean:` | Tests whether a generated identity still has its language default value.
public | identityValue `identityValue(entity as Object) as Object:` | Reads the mapped identity from one entity.
public | materialize `materialize(rows as ResultSet, startIndex as Int = 1) as Object:` | Hydrates one entity from the current SQL row in mapping order.
public | newInstance `newInstance() as Object:` | Creates one entity through its public zero-argument constructor.
public | propertyForPath `propertyForPath(path as String) as SQLPropertyMapping:` | Returns one mapped property by its Klyn property path.
public | snapshot `snapshot(entity as Object) as ArrayList<Object>:` | Captures mapped scalar values for change tracking.