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 Collection
protected org.hibernate.models.spi.ClassDetails
protected AnnotatedJoinColumns
protected boolean
protected IndexColumn
protected Map<org.hibernate.models.spi.ClassDetails,
InheritanceState> protected AnnotatedJoinColumns
protected boolean
protected Map<String,
IdentifierGeneratorDefinition> protected AnnotatedColumns
protected AnnotatedJoinColumns
protected String
protected NotFoundAction
protected OnDeleteAction
protected org.hibernate.models.spi.MemberDetails
protected PropertyHolder
protected String
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CollectionBinder
(Supplier<ManagedBean<? extends UserCollectionType>> customTypeBeanResolver, boolean isSortedCollection, MetadataBuildingContext buildingContext) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
bindCollection
(PropertyHolder propertyHolder, Nullability nullability, PropertyData inferredData, EntityBinder entityBinder, boolean isIdentifierMapper, MetadataBuildingContext context, Map<org.hibernate.models.spi.ClassDetails, InheritanceState> inheritanceStatePerClass, org.hibernate.models.spi.MemberDetails property, AnnotatedJoinColumns joinColumns) The first pass at binding a collection.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.protected void
bindOneToManySecondPass
(Map<String, PersistentClass> persistentClasses) Bind aOneToMany
association.protected boolean
bindStarToManySecondPass
(Map<String, PersistentClass> persistentClasses) protected abstract Collection
createCollection
(PersistentClass persistentClass) protected MetadataBuildingContext
protected boolean
protected boolean
mappingDefinedAttributeOverrideOnElement
(org.hibernate.models.spi.MemberDetails property) protected void
setIsHibernateExtensionMapping
(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, org.hibernate.models.spi.MemberDetails property, 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 aOneToMany
association. -
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 amappedBy
case, read the columns from the associated collection element in the target entity.
-