#1262: CandHContext.kt
projectforge-business/src/main/kotlin/org/projectforge/framework/persistence/candh/CandHContext.kt Copy-and-History Context, projectforge-business/src/main/kotlin/org/projectforge/framework/persistence/candh/CandHContext.kt 99 lines · 55 code · 33 comments · 11 blank
Context object carrying state through a Copy-and-History operation. Tracks the EntityCopyStatus, optionally creates a HistoryContext (if entityOpType is provided), and accumulates history entries. Provides methods to add history entries, wrappers, and to combine copy statuses.
Architecture
Constructor Parameters
| Parameter | Type | Description |
entity | BaseDO<*> | The entity being copied/historized |
currentCopyStatus | EntityCopyStatus | Initial status (default: NONE) |
entityOpType | EntityOpType? | If non-null, history entries are created |
Key Methods
| Method | Description |
preparedHistoryEntries(mergedObj, srcObj) | Gets finalized history entries from HistoryContext |
addHistoryEntry(...) | Adds a property-level history entry |
addHistoryEntryWrapper(...) | Adds an entity-level history entry wrapper |
combine(status) | Combines and logs status changes |
clone() | Creates a copy with same entity and history context entityOpType |
Git History
868d6abb7 2025 -> 2026
63081666f Source file headers: 2024-> 2025.
9e3c523c7 Migration stuff in progress... (all tests of all packages: OK).
5989b32fd BaseDao: mechanism of onChangeLister refactored.
2fd83d9af Migration stuff in progress... (all tests of all packages: OK).