Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.cfg.annotations
Class CollectionBinder

    java.lang.Object
      org.hibernate.cfg.annotations.CollectionBinder

Direct Known Subclasses:
  BagBinder, ListBinder, MapBinder, SetBinder

    public abstract class CollectionBinder

extends Object

Collection binder

Author:
  inger, Emmanuel Bernard

Field Summary
`protected boolean` | `cascadeDeleteEnabled`
`protected org.hibernate.mapping.Collection` | `collection`
`protected String` | `hqlOrderBy`
`protected IndexColumn` | `indexColumn`
`protected HashMap<String,IdGenerator>` | `localGenerators`
`protected String` | `mapKeyPropertyName`
`protected String` | `propertyName`

Constructor Summary
`protected` | `CollectionBinder()`
`protected` | `CollectionBinder(boolean sorted)`

Method Summary
`void` | `bind()`
`static void` | `bindManytoManyInverseFk(org.hibernate.mapping.PersistentClass referencedEntity, Ejb3JoinColumn[] columns, org.hibernate.mapping.SimpleValue value, boolean unique, ExtendedMappings mappings)` bind the inverse FK of a ManyToMany If we are in a mappedBy case, read the columns from the associated colletion element Otherwise delegates to the usual algorithm
`protected void` | `bindManyToManySecondPass(org.hibernate.mapping.Collection collValue, Map persistentClasses, Ejb3JoinColumn[] joinColumns, Ejb3JoinColumn[] inverseJoinColumns, Ejb3Column[] elementColumns, boolean isEmbedded, org.hibernate.annotations.common.reflection.XClass collType, boolean ignoreNotFound, boolean unique, boolean cascadeDeleteEnabled, TableBinder associationTableBinder, org.hibernate.annotations.common.reflection.XProperty property, PropertyHolder parentPropertyHolder, String hqlOrderBy, ExtendedMappings mappings)`
`protected void` | `bindOneToManySecondPass(org.hibernate.mapping.Collection collection, Map persistentClasses, Ejb3JoinColumn[] fkJoinColumns, org.hibernate.annotations.common.reflection.XClass collectionType, boolean cascadeDeleteEnabled, boolean ignoreNotFound, String hqlOrderBy, ExtendedMappings extendedMappings)`
`protected boolean` | `bindStarToManySecondPass(Map persistentClasses, org.hibernate.annotations.common.reflection.XClass collType, Ejb3JoinColumn[] fkJoinColumns, Ejb3JoinColumn[] keyColumns, Ejb3JoinColumn[] inverseColumns, Ejb3Column[] elementColumns, boolean isEmbedded, org.hibernate.annotations.common.reflection.XProperty property, boolean unique, TableBinder associationTableBinder, boolean ignoreNotFound, ExtendedMappings mappings)` return true if it's a Fk, false if it's an association table
`protected abstract org.hibernate.mapping.Collection` | `createCollection(org.hibernate.mapping.PersistentClass persistentClass)`
`org.hibernate.mapping.Collection` | `getCollection()`
`static CollectionBinder` | `getCollectionBinder(String entityName, org.hibernate.annotations.common.reflection.XProperty property, boolean isIndexed)` collection binder factory
`org.hibernate.cfg.SecondPass` | `getSecondPass(Ejb3JoinColumn[] fkJoinColumns, Ejb3JoinColumn[] keyColumns, Ejb3JoinColumn[] inverseColumns, Ejb3Column[] elementColumns, Ejb3Column[] mapKeyColumns, Ejb3JoinColumn[] mapKeyManyToManyColumns, boolean isEmbedded, org.hibernate.annotations.common.reflection.XProperty property, org.hibernate.annotations.common.reflection.XClass collType, boolean ignoreNotFound, boolean unique, TableBinder assocTableBinder, ExtendedMappings mappings)`
`void` | `setBatchSize(BatchSize batchSize)`
`void` | `setCache(Cache cacheAnn)`
`void` | `setCascadeDeleteEnabled(boolean onDeleteCascade)`
`void` | `setCascadeStrategy(String cascadeStrategy)`
`void` | `setCollectionType(org.hibernate.annotations.common.reflection.XClass collectionType)`
`void` | `setEjb3OrderBy(javax.persistence.OrderBy orderByAnn)`
`void` | `setElementColumns(Ejb3Column[] elementColumns)`
`void` | `setEmbedded(boolean annotationPresent)`
`void` | `setExplicitAssociationTable(boolean explicitAssocTable)`
`void` | `setFkJoinColumns(Ejb3JoinColumn[] ejb3JoinColumns)`
`void` | `setIgnoreNotFound(boolean ignoreNotFound)`
`void` | `setIndexColumn(IndexColumn indexColumn)`
`void` | `setInsertable(boolean insertable)`
`void` | `setInverseJoinColumns(Ejb3JoinColumn[] inverseJoinColumns)`
`void` | `setJoinColumns(Ejb3JoinColumn[] joinColumns)`
`void` | `setLocalGenerators(HashMap<String,IdGenerator> localGenerators)`
`void` | `setMapKey(javax.persistence.MapKey key)`
`void` | `setMapKeyColumns(Ejb3Column[] mapKeyColumns)`
`void` | `setMapKeyManyToManyColumns(Ejb3JoinColumn[] mapJoinColumns)`
`void` | `setMappedBy(String mappedBy)`
`void` | `setMappings(ExtendedMappings mappings)`
`void` | `setOneToMany(boolean oneToMany)`
`void` | `setProperty(org.hibernate.annotations.common.reflection.XProperty property)`
`void` | `setPropertyAccessorName(String propertyAccessorName)`
`void` | `setPropertyHolder(PropertyHolder propertyHolder)`
`void` | `setPropertyName(String propertyName)`
`void` | `setSort(Sort sortAnn)`
`void` | `setSqlOrderBy(OrderBy orderByAnn)`
`void` | `setTableBinder(TableBinder tableBinder)`
`void` | `setTargetEntity(org.hibernate.annotations.common.reflection.XClass targetEntity)`
`void` | `setUpdatable(boolean updatable)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### collection

    protected org.hibernate.mapping.Collection collection

### propertyName

    protected String propertyName

### indexColumn

    protected IndexColumn indexColumn

### hqlOrderBy

    protected String hqlOrderBy

### cascadeDeleteEnabled

    protected boolean cascadeDeleteEnabled

### mapKeyPropertyName

    protected String mapKeyPropertyName

### localGenerators

    protected HashMap<String,IdGenerator> localGenerators

Constructor Detail

### CollectionBinder

    protected CollectionBinder()

### CollectionBinder

    protected CollectionBinder(boolean sorted)

Method Detail

### setUpdatable

    public void setUpdatable(boolean updatable)

### setInsertable

    public void setInsertable(boolean insertable)

### setCascadeStrategy

    public void setCascadeStrategy(String cascadeStrategy)

### setPropertyAccessorName

    public void setPropertyAccessorName(String propertyAccessorName)

### setInverseJoinColumns

    public void setInverseJoinColumns(Ejb3JoinColumn[] inverseJoinColumns)

### setJoinColumns

    public void setJoinColumns(Ejb3JoinColumn[] joinColumns)

### setPropertyHolder

    public void setPropertyHolder(PropertyHolder propertyHolder)

### setBatchSize

    public void setBatchSize(BatchSize batchSize)

### setEjb3OrderBy

    public void setEjb3OrderBy(javax.persistence.OrderBy orderByAnn)

### setSqlOrderBy

    public void setSqlOrderBy(OrderBy orderByAnn)

### setSort

    public void setSort(Sort sortAnn)

### getCollectionBinder

    public static CollectionBinder getCollectionBinder(String entityName,
                                                       org.hibernate.annotations.common.reflection.XProperty property,
                                                       boolean isIndexed)

  collection binder factory

### setMappedBy

    public void setMappedBy(String mappedBy)

### setTableBinder

    public void setTableBinder(TableBinder tableBinder)

### setCollectionType

    public void setCollectionType(org.hibernate.annotations.common.reflection.XClass collectionType)

### setTargetEntity

    public void setTargetEntity(org.hibernate.annotations.common.reflection.XClass targetEntity)

### setMappings

    public void setMappings(ExtendedMappings mappings)

### createCollection

    protected abstract org.hibernate.mapping.Collection createCollection(org.hibernate.mapping.PersistentClass persistentClass)

### getCollection

    public org.hibernate.mapping.Collection getCollection()

### setPropertyName

    public void setPropertyName(String propertyName)

### bind

    public void bind()

### getSecondPass

    public org.hibernate.cfg.SecondPass getSecondPass(Ejb3JoinColumn[] fkJoinColumns,
                                                      Ejb3JoinColumn[] keyColumns,
                                                      Ejb3JoinColumn[] inverseColumns,
                                                      Ejb3Column[] elementColumns,
                                                      Ejb3Column[] mapKeyColumns,
                                                      Ejb3JoinColumn[] mapKeyManyToManyColumns,
                                                      boolean isEmbedded,
                                                      org.hibernate.annotations.common.reflection.XProperty property,
                                                      org.hibernate.annotations.common.reflection.XClass collType,
                                                      boolean ignoreNotFound,
                                                      boolean unique,
                                                      TableBinder assocTableBinder,
                                                      ExtendedMappings mappings)

### bindStarToManySecondPass

    protected boolean bindStarToManySecondPass(Map persistentClasses,
                                               org.hibernate.annotations.common.reflection.XClass collType,
                                               Ejb3JoinColumn[] fkJoinColumns,
                                               Ejb3JoinColumn[] keyColumns,
                                               Ejb3JoinColumn[] inverseColumns,
                                               Ejb3Column[] elementColumns,
                                               boolean isEmbedded,
                                               org.hibernate.annotations.common.reflection.XProperty property,
                                               boolean unique,
                                               TableBinder associationTableBinder,
                                               boolean ignoreNotFound,
                                               ExtendedMappings mappings)

  return true if it's a Fk, false if it's an association table

### bindOneToManySecondPass

    protected void bindOneToManySecondPass(org.hibernate.mapping.Collection collection,
                                           Map persistentClasses,
                                           Ejb3JoinColumn[] fkJoinColumns,
                                           org.hibernate.annotations.common.reflection.XClass collectionType,
                                           boolean cascadeDeleteEnabled,
                                           boolean ignoreNotFound,
                                           String hqlOrderBy,
                                           ExtendedMappings extendedMappings)

### setCache

    public void setCache(Cache cacheAnn)

### setOneToMany

    public void setOneToMany(boolean oneToMany)

### setIndexColumn

    public void setIndexColumn(IndexColumn indexColumn)

### setMapKey

    public void setMapKey(javax.persistence.MapKey key)

### bindManyToManySecondPass

    protected void bindManyToManySecondPass(org.hibernate.mapping.Collection collValue,
                                            Map persistentClasses,
                                            Ejb3JoinColumn[] joinColumns,
                                            Ejb3JoinColumn[] inverseJoinColumns,
                                            Ejb3Column[] elementColumns,
                                            boolean isEmbedded,
                                            org.hibernate.annotations.common.reflection.XClass collType,
                                            boolean ignoreNotFound,
                                            boolean unique,
                                            boolean cascadeDeleteEnabled,
                                            TableBinder associationTableBinder,
                                            org.hibernate.annotations.common.reflection.XProperty property,
                                            PropertyHolder parentPropertyHolder,
                                            String hqlOrderBy,
                                            ExtendedMappings mappings)
                                     throws org.hibernate.MappingException

  Throws:
    `org.hibernate.MappingException`

### setCascadeDeleteEnabled

    public void setCascadeDeleteEnabled(boolean onDeleteCascade)

### bindManytoManyInverseFk

    public static void bindManytoManyInverseFk(org.hibernate.mapping.PersistentClass referencedEntity,
                                               Ejb3JoinColumn[] columns,
                                               org.hibernate.mapping.SimpleValue value,
                                               boolean unique,
                                               ExtendedMappings mappings)

  bind the inverse FK of a ManyToMany If we are in a mappedBy case, read the columns from the associated colletion element Otherwise delegates to the usual algorithm

### setFkJoinColumns

    public void setFkJoinColumns(Ejb3JoinColumn[] ejb3JoinColumns)

### setExplicitAssociationTable

    public void setExplicitAssociationTable(boolean explicitAssocTable)

### setElementColumns

    public void setElementColumns(Ejb3Column[] elementColumns)

### setEmbedded

    public void setEmbedded(boolean annotationPresent)

### setProperty

    public void setProperty(org.hibernate.annotations.common.reflection.XProperty property)

### setIgnoreNotFound

    public void setIgnoreNotFound(boolean ignoreNotFound)

### setMapKeyColumns

    public void setMapKeyColumns(Ejb3Column[] mapKeyColumns)

### setMapKeyManyToManyColumns

    public void setMapKeyManyToManyColumns(Ejb3JoinColumn[] mapJoinColumns)

### setLocalGenerators

    public void setLocalGenerators(HashMap<String,IdGenerator> localGenerators)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD