Class CollectionBinder
java.lang.Object
org.hibernate.boot.model.internal.CollectionBinder
- Direct Known Subclasses:
BagBinder,ListBinder,MapBinder,SetBinder
Base class for stateful binders responsible for producing mapping model objects of type
Collection.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Collectionprotected org.hibernate.models.spi.ClassDetailsprotected AnnotatedJoinColumnsprotected booleanprotected IndexColumnprotected Map<org.hibernate.models.spi.ClassDetails, InheritanceState> protected AnnotatedJoinColumnsprotected booleanprotected Map<String, IdentifierGeneratorDefinition> protected AnnotatedColumnsprotected AnnotatedJoinColumnsprotected Stringprotected NotFoundActionprotected OnDeleteActionprotected org.hibernate.models.spi.MemberDetailsprotected PropertyHolderprotected String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCollectionBinder(Supplier<ManagedBean<? extends UserCollectionType>> customTypeBeanResolver, boolean isSortedCollection, MetadataBuildingContext buildingContext) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbindCollection(PropertyHolder propertyHolder, Nullability nullability, PropertyData inferredData, EntityBinder entityBinder, boolean isIdentifierMapper, MetadataBuildingContext context, Map<org.hibernate.models.spi.ClassDetails, InheritanceState> inheritanceStatePerClass, AnnotatedJoinColumns joinColumns) The first pass at binding a collection.voidbindManyToManyInverseForeignKey(PersistentClass targetEntity, AnnotatedJoinColumns joinColumns, SimpleValue value, boolean unique) Bind the inverse foreign key of aManyToMany, that is, the columns specified by@JoinTable(inverseJoinColumns=...), which are the columns that reference the target entity of the many-to-many association.protected voidbindOneToManySecondPass(Map<String, PersistentClass> persistentClasses) Bind aOneToManyassociation.protected booleanbindStarToManySecondPass(Map<String, PersistentClass> persistentClasses) protected abstract CollectioncreateCollection(PersistentClass persistentClass) protected MetadataBuildingContextprotected booleanprotected booleanmappingDefinedAttributeOverrideOnElement(org.hibernate.models.spi.MemberDetails property) protected voidsetIsHibernateExtensionMapping(boolean hibernateExtensionMapping)
-
Field Details
-
collection
-
propertyName
-
propertyHolder
-
declaringClass
protected org.hibernate.models.spi.ClassDetails declaringClass -
property
protected org.hibernate.models.spi.MemberDetails property -
indexColumn
-
onDeleteAction
-
hasMapKeyProperty
protected boolean hasMapKeyProperty -
mapKeyPropertyName
-
inverseJoinColumns
-
foreignJoinColumns
-
isEmbedded
protected boolean isEmbedded -
notFoundAction
-
mapKeyColumns
-
mapKeyManyToManyColumns
-
localGenerators
-
inheritanceStatePerClass
-
-
Constructor Details
-
CollectionBinder
protected CollectionBinder(Supplier<ManagedBean<? extends UserCollectionType>> customTypeBeanResolver, boolean isSortedCollection, MetadataBuildingContext buildingContext)
-
-
Method Details
-
bindCollection
public static void bindCollection(PropertyHolder propertyHolder, Nullability nullability, PropertyData inferredData, EntityBinder entityBinder, boolean isIdentifierMapper, MetadataBuildingContext context, Map<org.hibernate.models.spi.ClassDetails, InheritanceState> inheritanceStatePerClass, AnnotatedJoinColumns joinColumns) The first pass at binding a collection. -
getBuildingContext
-
setIsHibernateExtensionMapping
protected void setIsHibernateExtensionMapping(boolean hibernateExtensionMapping) -
isHibernateExtensionMapping
protected boolean isHibernateExtensionMapping() -
createCollection
-
bindStarToManySecondPass
- Returns:
- true if it's a foreign key, false if it's an association table
-
bindOneToManySecondPass
Bind aOneToManyassociation. -
mappingDefinedAttributeOverrideOnElement
protected boolean mappingDefinedAttributeOverrideOnElement(org.hibernate.models.spi.MemberDetails property) -
bindManyToManyInverseForeignKey
public void bindManyToManyInverseForeignKey(PersistentClass targetEntity, AnnotatedJoinColumns joinColumns, SimpleValue value, boolean unique) Bind the inverse foreign key of aManyToMany, that is, the columns specified by@JoinTable(inverseJoinColumns=...), which are the columns that reference the target entity of the many-to-many association. If we are in amappedBycase, read the columns from the associated collection element in the target entity.
-