Top Description Inners Methods
org.hibernate.metamodel.mapping

public Interface AttributeMappingsMap

Known Direct Implementers
org.hibernate.metamodel.mapping.internal.ImmutableAttributeMappingsMap, org.hibernate.metamodel.mapping.internal.EmptyAttributeMappingsMap
Annotations
@Incubating
Imports
java.util.LinkedHashMap, .Objects, java.util.function.Consumer, org.hibernate.Incubating, org.hibernate.metamodel.mapping.internal.EmptyAttributeMappingsMap, .ImmutableAttributeMappingsMap

Similar to AttributeMappingsList, this is essentially an immutable Map of AttributeMapping(s), allowing iteration of all mappings but also retrieval by name (a String key). Exposing a custom interface is more suitable to our needs than reusing the stock Map API; it expresses the immutable nature of this structure, and might allow us to extend it with additional convenience methods such as needs evolve. And additional reason for the custom interface is to allow custom implementations which can be highly optimised as necessary for our specific needs; for example the implementation ImmutableAttributeMappingsMap is able to avoid caching problems related to JDK-8180450, which would not have been possible with a standard generic container.
Since
6.2

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Method Summary

Modifier and TypeMethod and Description
public static AttributeMappingsMap.Builder
public void
public AttributeMapping
get(String name)

public int
size()

public Iterable<AttributeMapping>

Method Detail

builderback to summary
public static AttributeMappingsMap.Builder builder()
forEachValueback to summary
public void forEachValue(Consumer<? super AttributeMapping> action)
getback to summary
public AttributeMapping get(String name)
sizeback to summary
public int size()
valueIteratorback to summary
public Iterable<AttributeMapping> valueIterator()
org.hibernate.metamodel.mapping back to summary

public final Class AttributeMappingsMap.Builder

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private LinkedHashMap<String, AttributeMapping>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public AttributeMappingsMap
public void
put(final String name, final AttributeMapping mapping)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

storageback to summary
private LinkedHashMap<String, AttributeMapping> storage

Constructor Detail

Builderback to summary
private Builder()

Method Detail

buildback to summary
public AttributeMappingsMap build()
putback to summary
public void put(final String name, final AttributeMapping mapping)