java.lang.Object
org.hibernate.search.backend.elasticsearch.lowlevel.index.mapping.impl.AbstractTypeMapping
Direct Known Subclasses:
PropertyMapping, RootTypeMapping

public abstract class AbstractTypeMapping extends Object
An object representing Elasticsearch type mappings.

See Mapping.

  • Field Details

    • properties

      protected Map<String,PropertyMapping> properties
      Must be null when we don't want to include it in JSON serialization.
  • Constructor Details

    • AbstractTypeMapping

      public AbstractTypeMapping()
  • Method Details

    • getDynamic

      public DynamicType getDynamic()
    • setDynamic

      public void setDynamic(DynamicType dynamic)
    • getProperties

      public Map<String,PropertyMapping> getProperties()
    • addProperty

      public void addProperty(String name, PropertyMapping mapping)
    • removeProperty

      public void removeProperty(String name)
    • getExtraAttributes

      public Map<String,com.google.gson.JsonElement> getExtraAttributes()
    • setExtraAttributes

      public void setExtraAttributes(Map<String,com.google.gson.JsonElement> extraAttributes)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • merge

      public void merge(AbstractTypeMapping other)
      Merge this mapping with another mapping generated by Hibernate Search:
      1. The value for the dynamic mapping parameter will be taken from the other unless this provides a non-null value.
      2. The mapping parameter properties will be merged, using properties defined in both this and other.
      3. Mapping parameters other than dynamic and properties will be those from this; those from other will be ignored.
      4. If a property is defined on both sides, it will be merged recursively as described above.
      Parameters:
      other - The other mapping.