Package org.hibernate.metamodel.mapping
Interface AttributeMappingsMap
-
- All Known Implementing Classes:
EmptyAttributeMappingsMap
,ImmutableAttributeMappingsMap
@Incubating public interface AttributeMappingsMap
Similar toAttributeMappingsList
, 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 implementationImmutableAttributeMappingsMap
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 Class Summary
Nested Classes Modifier and Type Interface Description static class
AttributeMappingsMap.Builder
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static AttributeMappingsMap.Builder
builder()
void
forEachValue(Consumer<? super AttributeMapping> action)
AttributeMapping
get(String name)
int
size()
Iterable<AttributeMapping>
valueIterator()
-
-
-
Method Detail
-
forEachValue
void forEachValue(Consumer<? super AttributeMapping> action)
-
size
int size()
-
get
AttributeMapping get(String name)
-
valueIterator
Iterable<AttributeMapping> valueIterator()
-
builder
static AttributeMappingsMap.Builder builder()
-
-