#1255: HibernateSearchClassInfo.kt
projectforge-business/src/main/kotlin/org/projectforge/framework/persistence/api/impl/HibernateSearchClassInfo.kt Search Metadata (Class-level), projectforge-business/src/main/kotlin/org/projectforge/framework/persistence/api/impl/HibernateSearchClassInfo.kt 254 lines · 205 code · 26 comments · 23 blank
Introspects a DO class and its accessors to build a list of HibernateSearchFieldInfo entries. Scans @FullTextField, @GenericField, @KeywordField, and @DocumentId annotations on fields, getters, and setters. Also incorporates additionalSearchFields from the DAO and @ClassBridge annotations for embedded object search support.
Architecture
Constructor Dependencies
- baseDao
BaseDao<*> — provides DO class and additional search fields
Field Discovery Process
- Iterates all declared fields via
BeanHelper.getAllDeclaredFields(clazz)
- Scans public getter/setter methods for get/is/set-prefixed names
- Checks
additionalSearchFields from the DAO, supporting dot-notation for embedded objects
- Scans
@ClassBridge annotations on the entity class
- Each field is checked against
HibernateMetaModel.getEntityInfo to mark persistence
Key Properties
| Property | Type | Description |
allFieldNames | Array<String> | All lucene field names |
stringFieldNames | Array<String> | Fields supporting string search |
numericFields | Array<Pair<String, Class<*>>> | Fields supporting numeric search |
classBridges | Array<ClassBridge> | Registered class bridges |
Git History
868d6abb7 2025 -> 2026
63081666f Source file headers: 2024-> 2025.
7957637da Migration stuff in progress... (all tests of all packages: OK).
cf00da112 Migration stuff in progress...
9eca40c25 Migration stuff in progress... (all tests of all packages: OK).