#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

Field Discovery Process

  1. Iterates all declared fields via BeanHelper.getAllDeclaredFields(clazz)
  2. Scans public getter/setter methods for get/is/set-prefixed names
  3. Checks additionalSearchFields from the DAO, supporting dot-notation for embedded objects
  4. Scans @ClassBridge annotations on the entity class
  5. Each field is checked against HibernateMetaModel.getEntityInfo to mark persistence

Key Properties

PropertyTypeDescription
allFieldNamesArray<String>All lucene field names
stringFieldNamesArray<String>Fields supporting string search
numericFieldsArray<Pair<String, Class<*>>>Fields supporting numeric search
classBridgesArray<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).