#1302: HistoryEntry.kt
projectforge-business/src/main/kotlin/org/projectforge/framework/persistence/history/HistoryEntry.kt Domain Interface, projectforge-business/src/main/kotlin/org/projectforge/framework/persistence/history/HistoryEntry.kt 81 lines · 12 code · 60 comments · 9 blank
Interface representing a change record for any entity. Extends IdObject<Long> and defines the contract for history entries: modification timestamp, modifier name, operation type (INSERT/UPDATE/DELETE), entity identification, optional user comment, and a set of attribute-level diff entries.
Architecture
Interface Properties
| Property | Type | Description |
id | Long? (from IdObject) | Primary key |
modifiedAt | Date? | Timestamp when the change occurred |
modifiedBy | String? | Username or display name of modifying user |
attributes | Set<HistoryEntryAttr>? | Attribute-level diffs; null if only entity-level change |
entityOpType | EntityOpType? | INSERT, UPDATE, or DELETE |
entityName | String? | Fully qualified class name or entity type identifier |
entityId | Long? | Primary key of the modified entity |
userComment | String? | Optional human-readable comment explaining the change |
Key Details
- Not generic anymore: Previously
HistoryEntry<T>, now fixed to IdObject<Long> after ID migration to Long
- User comment: Added for admin transparency — e.g., when groups/users are edited, the admin can record the reason
- Attributes:
Set<HistoryEntryAttr> — each attr represents one changed property with old/new values and property operation type
Git History
868d6abb7 2025 -> 2026
aec1e30ab History supports now user comments: If groups or users are edited, admin may enter history comment.
63081666f Source file headers: 2024-> 2025.
f408da8a8 Migration stuff in progress... (all tests OK).
6aca64431 Migration stuff in progress... (all tests OK).
68be78d38 Migration stuff in progress... (all tests OK).
fa973038e HistoryEntry is now longer generic, is now IdObject<Long>.
94852e7b2 Migration stuff in progress...
c1d14ecdb Migration stuff in progress...
067a4cbb1 Migration stuff in progress...
e33c8b9c2 Migration stuff in progress...