#923: EmployeeSalaryDO.kt
projectforge-business/src/main/kotlin/org/projectforge/business/fibu/EmployeeSalaryDO.kt Type: JPA Entity (Data Object) · Purpose: Monthly salary record for a permanent employee · Path: projectforge-business/src/main/kotlin/org/projectforge/business/fibu/EmployeeSalaryDO.kt 127 lines · 73 code · 41 comments · 13 blank
Represents a single monthly salary entry for an employee. Maps to T_FIBU_EMPLOYEE_SALARY with a unique constraint on (employee_id, year, month) — one salary record per employee per month. Hibernate-search indexed.
Architecture & Design
Fields
| Field | DB Column | Type | Notes |
employee | employee_id | EmployeeDO (ManyToOne, LAZY) | Hibernate Search indexed embedded (depth 2). Serialized as ID-only. |
year | year | Int | Billing year. |
month | month | Int (1-based) | 1=January through 12=December. Setter validates via PFDayUtils.validateMonthValue(). |
bruttoMitAgAnteil | brutto_mit_ag_anteil | BigDecimal (scale=2, precision=12) | Gross payout including employer's share of social insurance. |
type | type | EmployeeSalaryType? (enum, STRING, max 20) | Salary type classification. |
comment | comment | String | Length from Constants.COMMENT_LENGTH. |
Computed Transient Properties
employeeId — Convenience: employee?.id
formattedMonth — Two-digit month string via StringHelper.format2DigitNumber()
formattedYearAndMonth — "YYYY-MM" format
Named Queries
EmployeeSalaryDO_SelectMinMaxYear — select min(year), max(year) from EmployeeSalaryDO
EmployeeSalaryDO_SelectByMonth — from EmployeeSalaryDO where year=:year and month=:month
Git History
868d6abb7 2025 -> 2026
63081666f Source file headers: 2024-> 2025.
0237d5eba Json serialization refactored: IdOnlySerializer and IdsOnlySerializer introduced.
4c04cfd65 MAJOR-CHANGE! Migration of integer id's to Long id's
9456bbb6c WIP: Month -> 1-based Integer in EmployeeSalary*
c0ec2e784 EmployeeSalaryDO.month now 1-based!!!!
8675a1dbe Declared all Kotlin JPA entities open.
ffcc98301 EmployeeSalaryDO.java -> EmployeeSalaryDO.kt