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 Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateParameters
(T specificAnnotation) Extracts parameters from annotation.protected abstract Class<? extends FieldMappingStrategy>
Provides class ofFieldMappingStrategy
specific for this annotation.void
process
(MappingDefinition.MappingDefinitionBuilder builder, MetaClass rootEntityMetaClass, Annotation annotation) Processes field-mapping annotation and adds new Mapping Definition element to builder.protected abstract void
processSpecificAnnotation
(MappingDefinition.MappingDefinitionBuilder builder, MetaClass rootEntityMetaClass, T annotation) Processes specific field-mapping annotation and adds new Mapping definition element to builder.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.search.index.mapping.processor.FieldAnnotationProcessor
getAnnotationClass
-
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 interfaceFieldAnnotationProcessor<T extends Annotation>
- Parameters:
builder
- Mapping Definition builderrootEntityMetaClass
- entity holds indexed propertiesannotation
- processed annotation
-
createParameters
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 builderrootEntityMetaClass
- entity holds indexed propertiesannotation
- processed annotation
-
getFieldMappingStrategyClass
Provides class ofFieldMappingStrategy
specific for this annotation.- Returns:
- mapping strategy
-