#914: CurrencyPairDao.kt

projectforge-business/src/main/kotlin/org/projectforge/business/fibu/CurrencyPairDao.kt Type: DAO (Data Access Object) / Spring Service
Package: org.projectforge.business.fibu
Path: projectforge-business/src/main/kotlin/org/projectforge/business/fibu/CurrencyPairDao.kt
Author: Kai Reinhard (k.reinhard@micromata.de) 87 lines · 45 code · 30 comments · 12 blank

DAO for CurrencyPairDO entities. Extends BaseDao<CurrencyPairDO>, inheriting standard CRUD operations, access control, and search. Provides merged history by also loading history entries from child CurrencyConversionRateDO records.

Architecture

Inheritance

Dependencies

DependencyRole
CurrencyConversionServiceUsed in addOwnHistoryEntries() to load all child rates for history merging

Default Sorting

By sourceCurrency then targetCurrency.

Autocompletion

Enabled for sourceCurrency and targetCurrency fields (3-letter currency codes).

History Merging

addOwnHistoryEntries() iterates over all child CurrencyConversionRateDO entries (including deleted) and merges their history into the parent's history context. This provides a unified audit trail showing both pair-level and rate-level changes.

Access Control

Guarded by UserRightId.FIBU_CURRENCY_CONVERSION, set in init.

Factory

newInstance() returns a bare CurrencyPairDO().

Git History

868d6abb7 2025 -> 2026
75ea9dc1a WIP: currency conversion with Claude Code.
357ebee61 WIP: currency conversion with Claude Code.
bd69407de Initial revision with Claude Code.