Class CollectionBinder

java.lang.Object
org.hibernate.boot.model.internal.CollectionBinder
Direct Known Subclasses:
BagBinder, ListBinder, MapBinder, SetBinder

public abstract class CollectionBinder extends Object
Base class for stateful binders responsible for producing mapping model objects of type Collection.
  • Field Details

    • collection

      protected Collection collection
    • propertyName

      protected String propertyName
    • propertyHolder

      protected PropertyHolder propertyHolder
    • declaringClass

      protected org.hibernate.models.spi.ClassDetails declaringClass
    • property

      protected org.hibernate.models.spi.MemberDetails property
    • indexColumn

      protected IndexColumn indexColumn
    • onDeleteAction

      protected OnDeleteAction onDeleteAction
    • hasMapKeyProperty

      protected boolean hasMapKeyProperty
    • mapKeyPropertyName

      protected String mapKeyPropertyName
    • inverseJoinColumns

      protected AnnotatedJoinColumns inverseJoinColumns
    • foreignJoinColumns

      protected AnnotatedJoinColumns foreignJoinColumns
    • isEmbedded

      protected boolean isEmbedded
    • notFoundAction

      protected NotFoundAction notFoundAction
    • mapKeyColumns

      protected AnnotatedColumns mapKeyColumns
    • mapKeyManyToManyColumns

      protected AnnotatedJoinColumns mapKeyManyToManyColumns
    • localGenerators

      protected Map<String,IdentifierGeneratorDefinition> localGenerators
    • inheritanceStatePerClass

      protected Map<org.hibernate.models.spi.ClassDetails,InheritanceState> inheritanceStatePerClass
  • Constructor Details

  • 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

      protected MetadataBuildingContext getBuildingContext()
    • getCustomTypeBeanResolver

      public Supplier<ManagedBean<? extends UserCollectionType>> getCustomTypeBeanResolver()
    • isMap

      public boolean isMap()
    • setIsHibernateExtensionMapping

      protected void setIsHibernateExtensionMapping(boolean hibernateExtensionMapping)
    • isHibernateExtensionMapping

      protected boolean isHibernateExtensionMapping()
    • setUpdatable

      public void setUpdatable(boolean updatable)
    • setInheritanceStatePerClass

      public void setInheritanceStatePerClass(Map<org.hibernate.models.spi.ClassDetails,InheritanceState> inheritanceStatePerClass)
    • setInsertable

      public void setInsertable(boolean insertable)
    • setCascadeStrategy

      public void setCascadeStrategy(String cascadeStrategy)
    • setAccessType

      public void setAccessType(AccessType accessType)
    • setInverseJoinColumns

      public void setInverseJoinColumns(AnnotatedJoinColumns inverseJoinColumns)
    • setJoinColumns

      public void setJoinColumns(AnnotatedJoinColumns joinColumns)
    • setPropertyHolder

      public void setPropertyHolder(PropertyHolder propertyHolder)
    • setJpaOrderBy

      public void setJpaOrderBy(OrderBy jpaOrderBy)
    • setSqlOrder

      public void setSqlOrder(SQLOrder sqlOrder)
    • setNaturalSort

      public void setNaturalSort(SortNatural naturalSort)
    • setComparatorSort

      public void setComparatorSort(SortComparator comparatorSort)
    • getCollectionBinder

      public static CollectionBinder getCollectionBinder(org.hibernate.models.spi.MemberDetails property, boolean isHibernateExtensionMapping, MetadataBuildingContext buildingContext)
      collection binder factory
    • resolveCustomType

      public static ManagedBean<? extends UserCollectionType> resolveCustomType(org.hibernate.models.spi.MemberDetails property, CollectionType typeAnnotation, MetadataBuildingContext context)
    • setMappedBy

      public void setMappedBy(String mappedBy)
    • setTableBinder

      public void setTableBinder(TableBinder tableBinder)
    • setElementType

      public void setElementType(org.hibernate.models.spi.TypeDetails collectionElementType)
    • setTargetEntity

      public void setTargetEntity(Class<?> targetEntity)
    • setTargetEntity

      public void setTargetEntity(org.hibernate.models.spi.ClassDetails targetEntity)
    • setTargetEntity

      public void setTargetEntity(org.hibernate.models.spi.TypeDetails targetEntity)
    • createCollection

      protected abstract Collection createCollection(PersistentClass persistentClass)
    • getCollection

      public Collection getCollection()
    • setPropertyName

      public void setPropertyName(String propertyName)
    • setDeclaringClass

      public void setDeclaringClass(org.hibernate.models.spi.ClassDetails declaringClass)
    • bind

      public void bind()
    • bindStarToManySecondPass

      protected boolean bindStarToManySecondPass(Map<String,PersistentClass> persistentClasses)
      return true if it's a Fk, false if it's an association table
    • bindOneToManySecondPass

      protected void bindOneToManySecondPass(Map<String,PersistentClass> persistentClasses)
      Bind a OneToMany association.
    • setCache

      public void setCache(Cache cache)
    • setQueryCacheLayout

      public void setQueryCacheLayout(QueryCacheLayout queryCacheLayout)
    • setOneToMany

      public void setOneToMany(boolean oneToMany)
    • setIndexColumn

      public void setIndexColumn(IndexColumn indexColumn)
    • setMapKey

      public void setMapKey(MapKey key)
    • adjustUserSuppliedValueCollectionOrderingFragment

      public static String adjustUserSuppliedValueCollectionOrderingFragment(String orderByFragment)
    • mappingDefinedAttributeOverrideOnElement

      protected boolean mappingDefinedAttributeOverrideOnElement(org.hibernate.models.spi.MemberDetails property)
    • setOnDeleteActionAction

      public void setOnDeleteActionAction(OnDeleteAction onDeleteAction)
    • bindManyToManyInverseForeignKey

      public void bindManyToManyInverseForeignKey(PersistentClass targetEntity, AnnotatedJoinColumns joinColumns, SimpleValue value, boolean unique)
      Bind the inverse foreign key of a ManyToMany, 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 a mappedBy case, read the columns from the associated collection element in the target entity.
    • setFkJoinColumns

      public void setFkJoinColumns(AnnotatedJoinColumns annotatedJoinColumns)
    • setExplicitAssociationTable

      public void setExplicitAssociationTable(boolean isExplicitAssociationTable)
    • setElementColumns

      public void setElementColumns(AnnotatedColumns elementColumns)
    • setEmbedded

      public void setEmbedded(boolean annotationPresent)
    • setProperty

      public void setProperty(org.hibernate.models.spi.MemberDetails property)
    • getNotFoundAction

      public NotFoundAction getNotFoundAction()
    • setNotFoundAction

      public void setNotFoundAction(NotFoundAction notFoundAction)
    • setMapKeyColumns

      public void setMapKeyColumns(AnnotatedColumns mapKeyColumns)
    • setMapKeyManyToManyColumns

      public void setMapKeyManyToManyColumns(AnnotatedJoinColumns mapJoinColumns)
    • setLocalGenerators

      public void setLocalGenerators(Map<String,IdentifierGeneratorDefinition> localGenerators)