BuchungssatzImpl.javaProxy/adapter for BuchungssatzDO — the JPA entity representing an accounting entry in org.projectforge.business.fibu.kost. Implements the Buchungssatz reporting interface from org.projectforge.reporting. Javadoc: "Proxy for BuchungssatzDO".
This is the classic Adapter pattern: a JPA entity cannot directly implement a reporting interface (they live in separate modules with different dependency graphs), so a wrapper delegates all calls to the DO. At 143 lines, it is the largest Impl wrapper in the reporting package.
In its constructor, it accepts a BuchungssatzDO, extracts related objects (Konto, GegenKonto, Kost1, Kost2), and wraps each into its corresponding Impl class: KontoImpl (#795), Kost1Impl, Kost2Impl. All fields are cached as final — created once during construction and never recomputed.
BuchungssatzDO implements Buchungssatz?The JPA entity lives in the projectforge-business module, while the reporting interface is consumed by the financial reporting module. A direct dependency would create a circular dependency. The Adapter solves this: the DO knows nothing about reporting, and reporting obtains data through the wrapper. Additionally, the Impl can transform data (e.g. getFormattedMonth() calling StringHelper.format2DigitNumber()) without polluting the DO with reporting-specific formatting logic.
Every getter simply delegates to the underlying BuchungssatzDO:
| Method | Returns | Source |
|---|---|---|
getId() | Long | Direct delegate |
getBeleg() | Document number | Direct delegate |
getBetrag() | BigDecimal amount | Direct delegate |
getComment() | String | Direct delegate |
getDatum() | LocalDate | Direct delegate |
getGegenKonto() | Konto | Cached Impl proxy |
getKonto() | Konto | Cached Impl proxy |
getKost1() | Kost1 | Cached Impl proxy |
getKost2() | Kost2 | Cached Impl proxy |
getMenge() | Quantity string | Direct delegate |
getMonth() | Integer | Direct delegate |
getFormattedMonth() | 2-digit string | Formatted via StringHelper |
getSatznr() | Integer | Direct delegate |
getSh() | SHType (debit/credit) | Direct delegate |
getText() | String | Direct delegate |
getYear() | Integer | Direct delegate |
The ID was migrated from Integer to Long in commit 4c04cfd65. Date fields use java.time.LocalDate (migrated from java.util.Date in 78b436d9e).
868d6abb7 2025 -> 2026 63081666f Source file headers: 2024-> 2025. 4c04cfd65 MAJOR-CHANGE! Migration of integer id's to Long id's (including fk's etc.) b6092df09 Copyright 2023 -> 2024 ab45d51fa Copyright 2001-2022 -> 2001-2023. 5f7ef41b8 Copyright 2021 -> 2022 ceb63e8a1 Source code header: (C) 2001-2021. a6a7aece4 Optimize Imports 78b436d9e Replace instances of java.util.date and java.sql.Date with java.time.LocalDate 7c79f1922 Copyright of source header -> 2020.