HRPlanningDao.ktBaseDao, providing CRUD operations, Hibernate Search indexing, access control, and history integration for employee weekly resource planning entries.Implements fine-grained write access checking beyond the standard USER_RIGHT_ID check. On insert/update, verifies that the logged-in user has project-specific rights for each HR planning entry. Users must be either the project manager, head of business manager, sales manager, or a member of the project manager group to modify entries for a given project. This is enforced via afterDBWrite which iterates all entries and validates permissions before commit.
Overrides addOwnHistoryEntries to merge history entries from child HRPlanningEntryDO objects. Uses HistoryFormatUtils.setNumberAsPropertyNameForListEntries to prefix each entry's history with the project name or status, making history diffs readable.
Defines additional search fields (ADDITIONAL_SEARCH_FIELDS) for full-text search across entries' project name, customer name, and user details. Registers HRPlanningEntryDO as an additional search entity via additionalHistorySearchDOs.
Overrides prepareHibernateSearch to eagerly initialize lazy-loaded project fields (project manager group) before Hibernate Search indexing, preventing N+1 queries during search index updates.
868d6abb7 2025 -> 2026 63081666f Source file headers: 2024-> 2025. 18bf92219 WIP: History entries handling. VisitorBookDao. bbc198d03 Migration stuff in progress... (all tests of all packages: OK).