BankAccountDO.kt| #46 (Balance) | #48 (Account) | |
|---|---|---|
| Base class | DefaultBaseDO | BaseUserGroupRightsDO |
| Access model | Group-only (FINANCE_GROUP) | Group + per-object rights |
| Interfaces | — | DisplayNameCapable |
| Indexed fields | 4 | 6 + UsersGroups bridge |
| Field | Type | DB column | Search | UI type |
|---|---|---|---|---|
name | String? | LENGTH_TITLE, not null | @FullTextField | INPUT |
description | String? | LENGTH_TEXT | @FullTextField | — |
iban | String? | LENGTH_TITLE | @FullTextField | INPUT |
bic | String? | LENGTH_TITLE | @FullTextField | INPUT |
bank | String? | LENGTH_TITLE, not null | @FullTextField | INPUT |
importSettings | String? | LENGTH=10000, COL=import_settings | @FullTextField | — |
54 open class BankAccountDO : BaseUserGroupRightsDO(), DisplayNameCapable
55 override val displayName: String
56 @Transient get() { return "$iban $title" }DisplayNameCapable provides a computed display name (IBAN + name) used in UI dropdowns and search results. displayName is @Transient — not stored in the database, computed at runtime.
72 @get:Transient override var owner: PFUserDO? = null // "Unused field"BaseUserGroupRightsDO requires an owner field but bank accounts don't have individual owners — the field is overridden as @Transient (not stored) and always null.
50 @TypeBinding(binder = TypeBinderRef(type = HibernateSearchUsersGroupsTypeBinder::class))
The Hibernate Search bridge indexes which users/groups have rights to each bank account — enabling full-text search queries like "find all bank accounts visible to user 42". Line 49 shows the old @ClassBridge syntax (commented out) replaced by the newer @TypeBinding approach.
The JPA entity for bank accounts — the parent of BankAccountBalanceDO (#46). Unlike #46 which extends
DefaultBaseDO, this extendsBaseUserGroupRightsDO— a richer base class that supports per-object user/group permission assignments. This is why BankAccountDao (#47) can callBaseUserGroupRightUtils.hasAccess()for fine-grained access control.