BankAccountBalanceDO.kt| Field | Type | JPA | Hibernate Search | Jackson | UI |
|---|---|---|---|---|---|
bankAccount |
BankAccountDO? |
@ManyToOne(LAZY), @JoinColumn |
@IndexedEmbedded(depth=1), SHALLOW reindex |
@JsonSerialize(IdOnlySerializer) |
@PropertyInfo(i18nKey="plugins.banking.account") |
amount |
BigDecimal? |
@Column(scale=2, precision=12) |
— | — | @PropertyInfo(type=CURRENCY) |
date |
LocalDate? |
@Column(name="date_col") |
@GenericField |
— | @PropertyInfo |
comment |
String? |
@Column(length=LENGTH_TEXT) |
@FullTextField |
— | @PropertyInfo(i18nKey="comment") |
| Element | Value | Convention |
|---|---|---|
| Table | T_PLUGIN_BANKING_ACCOUNT_BALANCE | T_ prefix for all ProjectForge tables, PLUGIN_ for plugin entities |
| FK column | banking_account_fk | _fk suffix for foreign key columns |
| Date column | date_col | Explicit naming to avoid reserved-word conflicts with date |
| Named query ID | BankAccountBalanceDO_FindByBankAccount | {ClassName}_{Purpose} pattern |
@Indexed + @FullTextField on comment enables full-text search across all balance records. @IndexedEmbedded(includeDepth = 1) on bankAccount indexes the bank account's fields one level deep — searching for "IBAN" in the full-text index would find the parent BankAccountDO. ReindexOnUpdate.SHALLOW means changing a BankAccountDO reindexes its balance records automatically.
FIND_BY_BANK_ACCOUNT is referenced by BankAccountBalanceDao.kt (#45) line 79 via the companion object constant.amount field has scale=2, precision=12 — up to 9,999,999,999.99 in any currency, suitable for corporate bank accounts.
The JPA entity for bank account balances — a record of an account's balance at a specific date. Extends
DefaultBaseDO(ProjectForge's base entity class providingid,created,lastUpdate,deleted). Uses 4 layers of annotation: JPA (persistence), Hibernate Search (full-text indexing), Jackson (JSON serialization), and ProjectForge custom annotations (@PropertyInfofor UI metadata).