Class AbstractTypeMapping
- 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 Summary
Fields Modifier and Type Field Description protected Map<String,PropertyMapping>propertiesMust be null when we don't want to include it in JSON serialization.
-
Constructor Summary
Constructors Constructor Description AbstractTypeMapping()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProperty(String name, PropertyMapping mapping)DynamicTypegetDynamic()Map<String,com.google.gson.JsonElement>getExtraAttributes()Map<String,PropertyMapping>getProperties()voidmerge(AbstractTypeMapping other)Merge this mapping with another mapping generated by Hibernate Search: The value for thedynamicmapping parameter will be taken from theotherunlessthisprovides a non-null value. The mapping parameterpropertieswill be merged, using properties defined in boththisandother. Mapping parameters other thandynamicandpropertieswill be those fromthis; those fromotherwill be ignored. If a property is defined on both sides, it will be merged recursively as described above.voidremoveProperty(String name)voidsetDynamic(DynamicType dynamic)voidsetExtraAttributes(Map<String,com.google.gson.JsonElement> extraAttributes)StringtoString()
-
-
-
Field Detail
-
properties
protected Map<String,PropertyMapping> properties
Must be null when we don't want to include it in JSON serialization.
-
-
Method Detail
-
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)
-
setExtraAttributes
public void setExtraAttributes(Map<String,com.google.gson.JsonElement> extraAttributes)
-
merge
public void merge(AbstractTypeMapping other)
Merge this mapping with another mapping generated by Hibernate Search:- The value for the
dynamicmapping parameter will be taken from theotherunlessthisprovides a non-null value. - The mapping parameter
propertieswill be merged, using properties defined in boththisandother. - Mapping parameters other than
dynamicandpropertieswill be those fromthis; those fromotherwill be ignored. - If a property is defined on both sides, it will be merged recursively as described above.
- Parameters:
other- The other mapping.
- The value for the
-
-