Class MappingFieldDescriptor

java.lang.Object
io.jmix.search.index.mapping.MappingFieldDescriptor

public class MappingFieldDescriptor extends Object
Contains details of single mapped field.
  • Field Details

    • entityPropertyFullName

      protected String entityPropertyFullName
    • indexPropertyFullName

      protected String indexPropertyFullName
    • metaPropertyPath

      protected MetaPropertyPath metaPropertyPath
    • standalone

      protected boolean standalone
    • fieldConfiguration

      protected FieldConfiguration fieldConfiguration
    • propertyValueExtractor

      protected PropertyValueExtractor propertyValueExtractor
    • order

      protected int order
    • instanceNameRelatedProperties

      protected List<MetaPropertyPath> instanceNameRelatedProperties
    • parameters

      protected Map<String,Object> parameters
  • Constructor Details

    • MappingFieldDescriptor

      public MappingFieldDescriptor()
  • Method Details

    • getEntityPropertyFullName

      public String getEntityPropertyFullName()
      Gets full property name in metamodel.
      Returns:
      property name
    • getIndexPropertyFullName

      public String getIndexPropertyFullName()
      Gets full name of field in index.
      Returns:
      index field name
    • getMetaPropertyPath

      public MetaPropertyPath getMetaPropertyPath()
      Gets metamodel property.
      Returns:
      MetaPropertyPath
    • getPropertyMetaClass

      public MetaClass getPropertyMetaClass()
      Gets meta class of metamodel property.
      Returns:
      MetaClass
    • isStandalone

      public boolean isStandalone()
      Returns:
      true if this field doesn't have metamodel property and exists within index only, false otherwise
    • setEntityPropertyFullName

      public void setEntityPropertyFullName(String entityPropertyFullName)
    • setIndexPropertyFullName

      public void setIndexPropertyFullName(String indexPropertyFullName)
    • setMetaPropertyPath

      public void setMetaPropertyPath(MetaPropertyPath metaPropertyPath)
    • setStandalone

      public void setStandalone(boolean standalone)
    • getFieldConfiguration

      public FieldConfiguration getFieldConfiguration()
      Gets field configuration
      Returns:
      FieldConfiguration
    • setFieldConfiguration

      public void setFieldConfiguration(FieldConfiguration fieldConfiguration)
    • getOrder

      public int getOrder()
      Gets descriptor order based on mapping strategy it created by. If several descriptors are related to the same field the one with the latest order will be used.
      Returns:
      order
    • setOrder

      public void setOrder(int order)
    • getValue

      public com.fasterxml.jackson.databind.JsonNode getValue(Object entity)
      Extracts value from entity instance
      Parameters:
      entity - instance
      Returns:
      value as json
    • setPropertyValueExtractor

      public void setPropertyValueExtractor(PropertyValueExtractor propertyValueExtractor)
    • getParameters

      public Map<String,Object> getParameters()
    • setParameters

      public void setParameters(Map<String,Object> parameters)
    • getInstanceNameRelatedProperties

      public List<MetaPropertyPath> getInstanceNameRelatedProperties()
      Gets all properties that used in instance name value. Makes sense only if current MappingFieldDescriptor relates to reference property
      Returns:
      list of MetaPropertyPath
    • setInstanceNameRelatedProperties

      public void setInstanceNameRelatedProperties(List<MetaPropertyPath> instanceNameRelatedProperties)
    • toString

      public String toString()
      Overrides:
      toString in class Object