public abstract class CollectionBinder extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
cascadeDeleteEnabled |
protected Collection |
collection |
protected IndexColumn |
indexColumn |
protected Map<XClass,InheritanceState> |
inheritanceStatePerClass |
protected HashMap<String,IdentifierGeneratorDefinition> |
localGenerators |
protected String |
mapKeyPropertyName |
protected String |
propertyName |
Modifier | Constructor and Description |
---|---|
protected |
CollectionBinder(boolean isSortedCollection) |
Modifier and Type | Method and Description |
---|---|
void |
bind() |
static void |
bindManytoManyInverseFk(PersistentClass referencedEntity,
Ejb3JoinColumn[] columns,
SimpleValue value,
boolean unique,
MetadataBuildingContext buildingContext)
bind the inverse FK of a ManyToMany
If we are in a mappedBy case, read the columns from the associated
collection element
Otherwise delegates to the usual algorithm
|
protected void |
bindManyToManySecondPass(Collection collValue,
Map persistentClasses,
Ejb3JoinColumn[] joinColumns,
Ejb3JoinColumn[] inverseJoinColumns,
Ejb3Column[] elementColumns,
boolean isEmbedded,
XClass collType,
boolean ignoreNotFound,
boolean unique,
boolean cascadeDeleteEnabled,
TableBinder associationTableBinder,
XProperty property,
PropertyHolder parentPropertyHolder,
MetadataBuildingContext buildingContext) |
protected void |
bindOneToManySecondPass(Collection collection,
Map persistentClasses,
Ejb3JoinColumn[] fkJoinColumns,
XClass collectionType,
boolean cascadeDeleteEnabled,
boolean ignoreNotFound,
MetadataBuildingContext buildingContext,
Map<XClass,InheritanceState> inheritanceStatePerClass) |
protected boolean |
bindStarToManySecondPass(Map persistentClasses,
XClass collType,
Ejb3JoinColumn[] fkJoinColumns,
Ejb3JoinColumn[] keyColumns,
Ejb3JoinColumn[] inverseColumns,
Ejb3Column[] elementColumns,
boolean isEmbedded,
XProperty property,
boolean unique,
TableBinder associationTableBinder,
boolean ignoreNotFound,
MetadataBuildingContext buildingContext)
return true if it's a Fk, false if it's an association table
|
protected abstract Collection |
createCollection(PersistentClass persistentClass) |
protected MetadataBuildingContext |
getBuildingContext() |
Collection |
getCollection() |
static CollectionBinder |
getCollectionBinder(String entityName,
XProperty property,
boolean isIndexed,
boolean isHibernateExtensionMapping,
MetadataBuildingContext buildingContext)
collection binder factory
|
SecondPass |
getSecondPass(Ejb3JoinColumn[] fkJoinColumns,
Ejb3JoinColumn[] keyColumns,
Ejb3JoinColumn[] inverseColumns,
Ejb3Column[] elementColumns,
Ejb3Column[] mapKeyColumns,
Ejb3JoinColumn[] mapKeyManyToManyColumns,
boolean isEmbedded,
XProperty property,
XClass collType,
boolean ignoreNotFound,
boolean unique,
TableBinder assocTableBinder,
MetadataBuildingContext buildingContext) |
protected boolean |
isHibernateExtensionMapping() |
boolean |
isMap() |
void |
setAccessType(AccessType accessType) |
void |
setBatchSize(BatchSize batchSize) |
void |
setBuildingContext(MetadataBuildingContext buildingContext) |
void |
setCache(Cache cacheAnn) |
void |
setCascadeDeleteEnabled(boolean onDeleteCascade) |
void |
setCascadeStrategy(String cascadeStrategy) |
void |
setCollectionType(XClass collectionType) |
void |
setComparatorSort(SortComparator comparatorSort) |
void |
setDeclaringClass(XClass declaringClass) |
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 |
setInheritanceStatePerClass(Map<XClass,InheritanceState> inheritanceStatePerClass) |
void |
setInsertable(boolean insertable) |
void |
setInverseJoinColumns(Ejb3JoinColumn[] inverseJoinColumns) |
void |
setIsHibernateExtensionMapping(boolean hibernateExtensionMapping) |
void |
setJoinColumns(Ejb3JoinColumn[] joinColumns) |
void |
setJpaOrderBy(OrderBy jpaOrderBy) |
void |
setLocalGenerators(HashMap<String,IdentifierGeneratorDefinition> localGenerators) |
void |
setMapKey(MapKey key) |
void |
setMapKeyColumns(Ejb3Column[] mapKeyColumns) |
void |
setMapKeyManyToManyColumns(Ejb3JoinColumn[] mapJoinColumns) |
void |
setMappedBy(String mappedBy) |
void |
setNaturalSort(SortNatural naturalSort) |
void |
setOneToMany(boolean oneToMany) |
void |
setProperty(XProperty property) |
void |
setPropertyHolder(PropertyHolder propertyHolder) |
void |
setPropertyName(String propertyName) |
void |
setSort(Sort deprecatedSort) |
void |
setSqlOrderBy(OrderBy sqlOrderBy) |
void |
setTableBinder(TableBinder tableBinder) |
void |
setTargetEntity(XClass targetEntity) |
void |
setUpdatable(boolean updatable) |
protected Collection collection
protected String propertyName
protected IndexColumn indexColumn
protected boolean cascadeDeleteEnabled
protected String mapKeyPropertyName
protected HashMap<String,IdentifierGeneratorDefinition> localGenerators
protected Map<XClass,InheritanceState> inheritanceStatePerClass
protected MetadataBuildingContext getBuildingContext()
public void setBuildingContext(MetadataBuildingContext buildingContext)
public boolean isMap()
public void setIsHibernateExtensionMapping(boolean hibernateExtensionMapping)
protected boolean isHibernateExtensionMapping()
public void setUpdatable(boolean updatable)
public void setInheritanceStatePerClass(Map<XClass,InheritanceState> inheritanceStatePerClass)
public void setInsertable(boolean insertable)
public void setCascadeStrategy(String cascadeStrategy)
public void setAccessType(AccessType accessType)
public void setInverseJoinColumns(Ejb3JoinColumn[] inverseJoinColumns)
public void setJoinColumns(Ejb3JoinColumn[] joinColumns)
public void setPropertyHolder(PropertyHolder propertyHolder)
public void setBatchSize(BatchSize batchSize)
public void setJpaOrderBy(OrderBy jpaOrderBy)
public void setSqlOrderBy(OrderBy sqlOrderBy)
public void setSort(Sort deprecatedSort)
public void setNaturalSort(SortNatural naturalSort)
public void setComparatorSort(SortComparator comparatorSort)
public static CollectionBinder getCollectionBinder(String entityName, XProperty property, boolean isIndexed, boolean isHibernateExtensionMapping, MetadataBuildingContext buildingContext)
public void setMappedBy(String mappedBy)
public void setTableBinder(TableBinder tableBinder)
public void setCollectionType(XClass collectionType)
public void setTargetEntity(XClass targetEntity)
protected abstract Collection createCollection(PersistentClass persistentClass)
public Collection getCollection()
public void setPropertyName(String propertyName)
public void setDeclaringClass(XClass declaringClass)
public void bind()
public SecondPass getSecondPass(Ejb3JoinColumn[] fkJoinColumns, Ejb3JoinColumn[] keyColumns, Ejb3JoinColumn[] inverseColumns, Ejb3Column[] elementColumns, Ejb3Column[] mapKeyColumns, Ejb3JoinColumn[] mapKeyManyToManyColumns, boolean isEmbedded, XProperty property, XClass collType, boolean ignoreNotFound, boolean unique, TableBinder assocTableBinder, MetadataBuildingContext buildingContext)
protected boolean bindStarToManySecondPass(Map persistentClasses, XClass collType, Ejb3JoinColumn[] fkJoinColumns, Ejb3JoinColumn[] keyColumns, Ejb3JoinColumn[] inverseColumns, Ejb3Column[] elementColumns, boolean isEmbedded, XProperty property, boolean unique, TableBinder associationTableBinder, boolean ignoreNotFound, MetadataBuildingContext buildingContext)
protected void bindOneToManySecondPass(Collection collection, Map persistentClasses, Ejb3JoinColumn[] fkJoinColumns, XClass collectionType, boolean cascadeDeleteEnabled, boolean ignoreNotFound, MetadataBuildingContext buildingContext, Map<XClass,InheritanceState> inheritanceStatePerClass)
public void setCache(Cache cacheAnn)
public void setOneToMany(boolean oneToMany)
public void setIndexColumn(IndexColumn indexColumn)
public void setMapKey(MapKey key)
protected void bindManyToManySecondPass(Collection collValue, Map persistentClasses, Ejb3JoinColumn[] joinColumns, Ejb3JoinColumn[] inverseJoinColumns, Ejb3Column[] elementColumns, boolean isEmbedded, XClass collType, boolean ignoreNotFound, boolean unique, boolean cascadeDeleteEnabled, TableBinder associationTableBinder, XProperty property, PropertyHolder parentPropertyHolder, MetadataBuildingContext buildingContext) throws MappingException
MappingException
public void setCascadeDeleteEnabled(boolean onDeleteCascade)
public static void bindManytoManyInverseFk(PersistentClass referencedEntity, Ejb3JoinColumn[] columns, SimpleValue value, boolean unique, MetadataBuildingContext buildingContext)
public void setFkJoinColumns(Ejb3JoinColumn[] ejb3JoinColumns)
public void setExplicitAssociationTable(boolean explicitAssocTable)
public void setElementColumns(Ejb3Column[] elementColumns)
public void setEmbedded(boolean annotationPresent)
public void setProperty(XProperty property)
public void setIgnoreNotFound(boolean ignoreNotFound)
public void setMapKeyColumns(Ejb3Column[] mapKeyColumns)
public void setMapKeyManyToManyColumns(Ejb3JoinColumn[] mapJoinColumns)
public void setLocalGenerators(HashMap<String,IdentifierGeneratorDefinition> localGenerators)
Copyright © 2017 JBoss by Red Hat. All rights reserved.