Record Class MappingPlan

java.lang.Object
java.lang.Record
org.litebridge.orm.persistence.MappingPlan
Record Components:
dtoClass - the class of the DTO being mapped
ormTable - the ORM table metadata
primaryKeyIndices - the indices of the primary key columns in the row
primaryKeyTypes - the types of the primary key columns
fieldMappings - the mappings for the DTO fields
constructor - the constructor to use for creating DTO instances
defaultConstructorUsed - whether the default constructor is used
canonicalConstructorFieldAccessors - the field accessors for the canonical constructor
joinPlans - the mapping plans for joined DTOs
nestedPlans - the mapping plans for nested DTOs
oneToManyMappings - the mappings for one-to-many relationships
manyToManyMappings - the mappings for many-to-many relationships

public record MappingPlan(Class<?> dtoClass, OrmTable ormTable, int[] primaryKeyIndices, Class<?>[] primaryKeyTypes, MappingPlan.FieldMapping[] fieldMappings, MethodHandle constructor, boolean defaultConstructorUsed, List<FieldAccessor> canonicalConstructorFieldAccessors, Map<DtoJoinSpec,MappingPlan> joinPlans, Map<FieldAccessor,MappingPlan> nestedPlans, List<MappedOneToMany> oneToManyMappings, List<MappedManyToMany> manyToManyMappings) extends Record
A "pre-compiled" mapping plan for a specific DTO class and query specification. It pre-resolves column indices, constructors, and field mappers to minimize overhead during row processing.