#1263: CandHHistoryAttrWrapper.kt

projectforge-business/src/main/kotlin/org/projectforge/framework/persistence/candh/CandHHistoryAttrWrapper.kt History Attribute Wrapper, projectforge-business/src/main/kotlin/org/projectforge/framework/persistence/candh/CandHHistoryAttrWrapper.kt 91 lines · 52 code · 32 comments · 7 blank
Wraps a single history attribute change (old value → new value) within the Copy-and-History framework. Holds the property type class, property name, operation type, and old/new values. The prepareAndGetAttr() method creates a HistoryEntryAttrDO and adds it to a parent HistoryEntryDO, including optional CandHHistoryEntryICustomizer callback.

Architecture

Properties

PropertyTypeDescription
propertyTypeClassClass<*>The property's type class
propertyNameString?Name of the modified property
optypePropertyOpTypeOperation type (Insert, Update, Delete)
oldValueAny?Previous value
newValueAny?New value

Key Methods

MethodDescription
prepareAndGetAttr(parent)Creates HistoryEntryAttrDO, calls customizer, adds to parent entry

Has two create() companion factory methods: one from a KMutableProperty1 (auto-extracts type and property name) and one with explicit propertyTypeClass for collection handling.

Git History

868d6abb7 2025 -> 2026
63081666f Source file headers: 2024-> 2025.
176cb32d7 WIP: Gradle
ad91ccfa4 Migration stuff in progress...
cb03dc74f Migration stuff in progress... (all tests of all packages: OK).