Top Description Fields Constructors Methods
org.hibernate.boot.model.internal

public Class MapBinder

extends CollectionBinder
Class Inheritance
Imports
java.util.List, java.util.function.Supplier, org.hibernate.AnnotationException, .AssertionFailure, .FetchMode, .MappingException, org.hibernate.annotations.MapKeyCompositeType, org.hibernate.annotations.common.reflection.XClass, .XProperty, org.hibernate.boot.spi.AccessType, .BootstrapContext, .MetadataBuildingContext, .SecondPass, org.hibernate.engine.jdbc.Size, org.hibernate.mapping.BasicValue, .Collection, .Column, .Component, .DependantBasicValue, .Formula, .ManyToOne, .Map, .OneToMany, .PersistentClass, .Property, .Selectable, .SimpleValue, .Table, .Value, org.hibernate.resource.beans.spi.ManagedBean, org.hibernate.type.BasicType, org.hibernate.usertype.CompositeUserType, .UserCollectionType, jakarta.persistence.AttributeOverride, .AttributeOverrides, .ConstraintMode, .InheritanceType, .MapKeyClass, .MapKeyColumn, .MapKeyJoinColumn, .MapKeyJoinColumns

A CollectionBinder for maps, whose mapping model type is Map.
Author
Emmanuel Bernard

Field Summary

Inherited from org.hibernate.boot.model.internal.CollectionBinder:
buildingContextcollectionforeignJoinColumnshasMapKeyPropertyindexColumninheritanceStatePerClassinverseJoinColumnsisEmbeddedlocalGeneratorsmapKeyColumnsmapKeyManyToManyColumnsmapKeyPropertyNamenotFoundActiononDeleteActionpropertypropertyHolderpropertyName

Constructor Summary

AccessConstructor and Description
public
MapBinder(Supplier<ManagedBean<? extends UserCollectionType>> customTypeBeanResolver, boolean sorted, MetadataBuildingContext buildingContext)

Method Summary

Modifier and TypeMethod and Description
private static void
addSelectable(SimpleValue targetValue, Selectable selectable)

private AnnotatedClassType
annotatedMapKeyType(XProperty property, boolean isEmbedded, String mapKeyType, XClass keyClass)

private void
bindKeyFromAssociationTable(XClass elementType, Map<String, PersistentClass> persistentClasses, boolean hasMapKeyProperty, String mapKeyPropertyName, XProperty property, boolean isEmbedded, AnnotatedColumns mapKeyColumns, AnnotatedJoinColumns mapKeyManyToManyColumns)

private CollectionPropertyHolder
protected Collection
private DependantBasicValue
createDependantBasicValue(Table mapKeyTable, BasicValue sourceValue)

private Value
createFormulatedValue(Value value, Collection collection, PersistentClass associatedClass, PersistentClass targetPropertyPersistentClass)

private Component
createIndexComponent(Collection collection, PersistentClass associatedClass, Component component)

private SimpleValue
createTargetValue(Table mapKeyTable, SimpleValue sourceValue)

private static String
private Map
private ForeignKey
pack-priv SecondPass
private ManyToOne
private void
handleCompositeMapKey(XClass keyClass, CollectionPropertyHolder holder, AccessType accessType, Class<? extends CompositeUserType<?>> compositeUserType)

private void
private void
handleMapKey(Map<String, PersistentClass> persistentClasses, XProperty property, boolean isEmbedded, AnnotatedColumns mapKeyColumns, AnnotatedJoinColumns mapKeyManyToManyColumns)

private void
handleMapKey(XProperty property, AnnotatedColumns mapKeyColumns, String mapKeyType, XClass keyClass, AnnotatedClassType classType, CollectionPropertyHolder holder, AccessType accessType)

private void
handleMapKey(XProperty property, AnnotatedColumns mapKeyColumns, String mapKeyType, XClass keyClass, CollectionPropertyHolder holder, AccessType accessType)

private void
handleMapKeyProperty(XClass elementType, Map<String, PersistentClass> persistentClasses, String mapKeyPropertyName)

public boolean
private void
private XClass
mapKeyClass(String mapKeyType)

private boolean
private boolean
private boolean
private PropertyPreloadedData
private static Class<? extends CompositeUserType<?>>
Inherited from org.hibernate.boot.model.internal.CollectionBinder:
accessTypeadjustUserSuppliedValueCollectionOrderingFragmentbindbindCollectionbindManyToManyInverseForeignKeybindOneToManySecondPassbindStarToManySecondPasscreateElementColumnsIfNecessarygetBuildingContextgetCollectiongetCollectionBindergetCustomTypeBeanResolvergetElementTypegetNotFoundActionisHibernateExtensionMappingresolveCustomTypesafeCollectionRolesetAccessTypesetBatchSizesetCachesetCascadeStrategysetComparatorSortsetDeclaringClasssetElementColumnssetElementTypesetEmbeddedsetExplicitAssociationTablesetFkJoinColumnssetIndexColumnsetInheritanceStatePerClasssetInsertablesetInverseJoinColumnssetIsHibernateExtensionMappingsetJoinColumnssetJpaOrderBysetLocalGeneratorssetMapKeysetMapKeyColumnssetMapKeyManyToManyColumnssetMappedBysetNaturalSortsetNotFoundActionsetOnDeleteActionActionsetOneToManysetPropertysetPropertyHoldersetPropertyNamesetSqlOrdersetSqlOrderBysetTableBindersetTargetEntitysetUpdatable

Constructor Detail

MapBinderback to summary
public MapBinder(Supplier<ManagedBean<? extends UserCollectionType>> customTypeBeanResolver, boolean sorted, MetadataBuildingContext buildingContext)

Method Detail

addSelectableback to summary
private static void addSelectable(SimpleValue targetValue, Selectable selectable)
annotatedMapKeyTypeback to summary
private AnnotatedClassType annotatedMapKeyType(XProperty property, boolean isEmbedded, String mapKeyType, XClass keyClass)
bindKeyFromAssociationTableback to summary
private void bindKeyFromAssociationTable(XClass elementType, Map<String, PersistentClass> persistentClasses, boolean hasMapKeyProperty, String mapKeyPropertyName, XProperty property, boolean isEmbedded, AnnotatedColumns mapKeyColumns, AnnotatedJoinColumns mapKeyManyToManyColumns)
buildCollectionPropertyHolderback to summary
private CollectionPropertyHolder buildCollectionPropertyHolder(XProperty property, XClass keyClass)
createCollectionback to summary
protected Collection createCollection(PersistentClass owner)

Implements abstract org.hibernate.boot.model.internal.CollectionBinder.createCollection.

createDependantBasicValueback to summary
private DependantBasicValue createDependantBasicValue(Table mapKeyTable, BasicValue sourceValue)
createFormulatedValueback to summary
private Value createFormulatedValue(Value value, Collection collection, PersistentClass associatedClass, PersistentClass targetPropertyPersistentClass)
createIndexComponentback to summary
private Component createIndexComponent(Collection collection, PersistentClass associatedClass, Component component)
createTargetValueback to summary
private SimpleValue createTargetValue(Table mapKeyTable, SimpleValue sourceValue)
getKeyTypeback to summary
private static String getKeyType(XProperty property)
getMapback to summary
private Map getMap()
getMapKeyForeignKeyback to summary
private ForeignKey getMapKeyForeignKey(XProperty property)
getSecondPassback to summary
pack-priv SecondPass getSecondPass()

Overrides org.hibernate.boot.model.internal.CollectionBinder.getSecondPass.

Annotations
@Override
handleCollectionKeyedByEntitiesback to summary
private ManyToOne handleCollectionKeyedByEntities(String mapKeyType)
handleCompositeMapKeyback to summary
private void handleCompositeMapKey(XClass keyClass, CollectionPropertyHolder holder, AccessType accessType, Class<? extends CompositeUserType<?>> compositeUserType)
handleForeignKeyback to summary
private void handleForeignKey(XProperty property, ManyToOne element)
handleMapKeyback to summary
private void handleMapKey(Map<String, PersistentClass> persistentClasses, XProperty property, boolean isEmbedded, AnnotatedColumns mapKeyColumns, AnnotatedJoinColumns mapKeyManyToManyColumns)
handleMapKeyback to summary
private void handleMapKey(XProperty property, AnnotatedColumns mapKeyColumns, String mapKeyType, XClass keyClass, AnnotatedClassType classType, CollectionPropertyHolder holder, AccessType accessType)
handleMapKeyback to summary
private void handleMapKey(XProperty property, AnnotatedColumns mapKeyColumns, String mapKeyType, XClass keyClass, CollectionPropertyHolder holder, AccessType accessType)
handleMapKeyPropertyback to summary
private void handleMapKeyProperty(XClass elementType, Map<String, PersistentClass> persistentClasses, String mapKeyPropertyName)
isMapback to summary
public boolean isMap()

Overrides org.hibernate.boot.model.internal.CollectionBinder.isMap.

makeOneToManyMapKeyColumnNullableIfNotInPropertyback to summary
private void makeOneToManyMapKeyColumnNullableIfNotInProperty(final XProperty property)
mapKeyClassback to summary
private XClass mapKeyClass(String mapKeyType)
mappingDefinedAttributeOverrideOnMapKeyback to summary
private boolean mappingDefinedAttributeOverrideOnMapKey(XProperty property)
namedMapKeyback to summary
private boolean namedMapKey(AttributeOverride annotation)
propertiesContainColumnback to summary
private boolean propertiesContainColumn(List<Property> properties, Column column)
propertyPreloadedDataback to summary
private PropertyPreloadedData propertyPreloadedData(XClass keyClass)
resolveCompositeUserTypeback to summary
private static Class<? extends CompositeUserType<?>> resolveCompositeUserType(XProperty property, XClass returnedClass, MetadataBuildingContext context)

Hides org.hibernate.boot.model.internal.CollectionBinder.resolveCompositeUserType.