primaryKeyFields
Returns the primary key field accessors for this table.
- Returns:
- The list of primary key field accessors, or an empty list if the table has no primary key.
This class maintains metadata and mappings between object field accessors and database expressions. It tracks changes made to objects and their associated database states for ORM operations.
OrmTable(Class<?> dtoClass,
@Nullable Class<?> contextDtoClass,
TableMetaData metaData,
Map<FieldAccessor,MappedFieldTarget> fieldAccessorTargetMap,
ChangeTracker changeTracker,
ClassFieldAccessorCache classFieldAccessorCache) OrmTable instance, initializing table metadata, field-to-column mappings,
and a change tracker for managing object state.OrmTable(Class<?> dtoClass,
TableMetaData metaData,
Map<FieldAccessor,MappedFieldTarget> fieldAccessorTargetMap,
ChangeTracker changeTracker,
ClassFieldAccessorCache classFieldAccessorCache) OrmTable instance, initializing table metadata, field-to-column mappings,
and a change tracker for managing object state.voidaddOneToManyReverseMapping(FieldAccessor fieldAccessor) columnMetaDataForField(String fieldName) columnMetaDataForField(FieldAccessor fieldAccessor) @Nullable Class<?> Class<?> dtoClass()Class<?> <DTO> TrackedDto<DTO> ensureTrackedDto(DTO dto) fieldForColumnName(String columnName) @Nullable FieldAccessorfieldForColumnNameOrNull(String columnName) getColumnMetaData(String columnName) final List<MappedManyToMany> final List<MappedOneToMany> @Nullable List<FieldAccessor> <DTO> TrackedDto<DTO> getTrackedDto(DTO dto) booleanbooleanisFieldPartOfPrimaryKey(String fieldName) booleanbooleanisPersistedDto(Object dto) mappedFieldTargetForField(String fieldName) mappedFieldTargetForField(FieldAccessor fieldAccessor) @Nullable MappedFieldTargetmappedFieldTargetForFieldOrNull(String fieldName) null if not found.@Nullable MappedFieldTargetmappedFieldTargetForFieldOrNull(FieldAccessor fieldAccessor) null if not found.metaData()voidsetDtoClassInterfaces(Set<Class<?>> dtoClassInterfaces) voidsyncPersistedDto(Object dto) voidOrmTable instance, initializing table metadata, field-to-column mappings,
and a change tracker for managing object state.dtoClass - the DTO class associated with the tablemetaData - the metadata describing the table structurefieldAccessorTargetMap - a map associating field accessors with their corresponding column metadatachangeTracker - the change tracker to monitor and track modifications made to the table's dataclassFieldAccessorCache - the cache for field accessorsOrmTable instance, initializing table metadata, field-to-column mappings,
and a change tracker for managing object state.dtoClass - the DTO class associated with the tablecontextDtoClass - Parent/context DTO class.metaData - the metadata describing the table structurefieldAccessorTargetMap - a map associating field accessors with their corresponding column metadatachangeTracker - the change tracker to monitor and track modifications made to the table's dataclassFieldAccessorCache - the cache for field accessorsfieldName - The DTO field name to check.fieldName - the field name to retrieve the column metadata forfieldAccessor - the field accessor to retrieve the column metadata forcolumnName - the column name to retrieve the metadata forDTO - the type of the DTOdto - the DTO to retrieve the tracked version forIllegalArgumentException - if the specified DTO is not trackedDTO - the type of the DTOdto - the DTO to retrieve the tracked version fordto - the DTO to tracknull if not found.fieldName - the field name to retrieve the mapped target fornull if not foundnull if not found.fieldAccessor - the field accessor to retrieve the mapped target fornull if not foundfieldName - the field name to retrieve the mapped target forIllegalArgumentException - if no mapping exists for the field namefieldAccessor - the field accessor to retrieve the mapped target forIllegalArgumentException - if no mapping exists for the field accessorcolumnName - the column name to retrieve the field accessor forIllegalArgumentException - if the specified column name is null or emptycolumnName - the column name to retrieve the field accessor fordto - the DTO to mark as persistedIllegalArgumentException - if the specified DTO is nulldto - the DTO to checkIllegalArgumentException - if the specified DTO is nullfield - the field accessor to retrieve the mapping forfield - the field accessor to retrieve the mapping forfieldAccessor - the field accessor to add as a reverse mappingdtoClassInterfaces - the set of DTO class interfacestrue if this table is a many-to-many join table; false otherwise