#1031: VisitorbookService.kt

projectforge-business/src/main/kotlin/org/projectforge/business/orga/VisitorbookService.kt Service (Visitorbook), projectforge-business/src/main/kotlin/org/projectforge/business/orga/VisitorbookService.kt 246 lines · 176 code · 47 comments · 23 blank
Service layer for visitorbook entry CRUD operations. Implements IDao, providing insert/update/delete/undelete for visit entries with access control. Integrates with VisitorbookCache for cache invalidation after mutations.

Architecture

Dual Layer

Delegates listing and access checks to VisitorbookDao (which injects itself via @PostConstruct into visitorbookDao). Handles entry-level operations directly using BaseDOPersistenceService and PfPersistenceService.

Cache Integration

Every mutation method (insert, updateVisitorbookEntry, markVisitorbookEntryAsDeleted, undeleteVisitorbookEntry) calls visitorbookCache.setExpired(visitorbook.id) to trigger selective cache refresh of the affected visitorbook's aggregate data.

Entry Management Methods

Git History

868d6abb7 2025 -> 2026
63081666f Source file headers: 2024-> 2025.
27a5e6cad Visitorbook: bugfix on contactPersons.
18bf92219 WIP: History entries handling. VisitorBookDao.
b5dc26e24 Migration stuff in progress...
1b50060c3 BaseDao: renamed: get -> find, save -> insert, getList -> select, load -> select
3aeda5ef5 Big change: all save|update|...InTrans renamed.
b095e6f7d !!!!! Big change of Transaction handling.
4c04cfd65 MAJOR-CHANGE! Migration of integer id's to Long id's.