Class AbstractFieldAnnotationProcessor<T extends Annotation>

java.lang.Object
io.jmix.search.index.mapping.processor.AbstractFieldAnnotationProcessor<T>
Type Parameters:
T - specific annotation class
All Implemented Interfaces:
FieldAnnotationProcessor<T>
Direct Known Subclasses:
AutoMappedFieldAnnotationProcessor

public abstract class AbstractFieldAnnotationProcessor<T extends Annotation> extends Object implements FieldAnnotationProcessor<T>
Class with basic functionality for processor of some field-mapping annotation.
  • Constructor Details

    • AbstractFieldAnnotationProcessor

      public AbstractFieldAnnotationProcessor()
  • Method Details

    • process

      public void process(MappingDefinition.MappingDefinitionBuilder builder, MetaClass rootEntityMetaClass, Annotation annotation)
      Description copied from interface: FieldAnnotationProcessor
      Processes field-mapping annotation and adds new Mapping Definition element to builder.
      Specified by:
      process in interface FieldAnnotationProcessor<T extends Annotation>
      Parameters:
      builder - Mapping Definition builder
      rootEntityMetaClass - entity holds indexed properties
      annotation - processed annotation
    • createParameters

      protected abstract Map<String,Object> createParameters(T specificAnnotation)
      Extracts parameters from annotation.
      Parameters:
      specificAnnotation - processed annotation
      Returns:
      map with parameters
    • processSpecificAnnotation

      protected abstract void processSpecificAnnotation(MappingDefinition.MappingDefinitionBuilder builder, MetaClass rootEntityMetaClass, T annotation)
      Processes specific field-mapping annotation and adds new Mapping definition element to builder.
      Parameters:
      builder - Mapping Definition builder
      rootEntityMetaClass - entity holds indexed properties
      annotation - processed annotation
    • getFieldMappingStrategyClass

      protected abstract Class<? extends FieldMappingStrategy> getFieldMappingStrategyClass()
      Provides class of FieldMappingStrategy specific for this annotation.
      Returns:
      mapping strategy