#1270: DefaultHandler.kt

projectforge-business/src/main/kotlin/org/projectforge/framework/persistence/candh/DefaultHandler.kt Copy-and-History Handler (Fallback), projectforge-business/src/main/kotlin/org/projectforge/framework/persistence/candh/DefaultHandler.kt 78 lines · 46 code · 25 comments · 7 blank
The fallback handler in the CandH handler chain. Accepts all property types and provides simple equality comparison via propertiesValuesEqual() (overrideable by subclasses). Handles null-safe String comparison (null and empty strings are treated as equal). Sets dest property to src value if different, then calls propertyWasModified() for history tracking.

Architecture

Key Methods

MethodDescription
accept(property)Always returns true — catches-all after specialized handlers
propertyValuesEqual(src, dest)Simple == comparison; overridden by BigDecimalHandler and BaseDOHandler
process(ctx, context)Compares values, sets dest if modified, triggers history via propertyWasModified()

Private propertyNullableValuesEqual() handles null-safety and String-specific null/empty equality via isEqualsTo extension.

Git History

868d6abb7 2025 -> 2026
63081666f Source file headers: 2024-> 2025.
61f05ce90 Migration stuff in progress...
a33f8f203 Migration stuff in progress... (all tests of all packages: OK).
2fd83d9af Migration stuff in progress... (all tests of all packages: OK).