public abstract class CollectionBinder extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
cascadeDeleteEnabled |
protected Collection |
collection |
protected String |
hqlOrderBy |
protected IndexColumn |
indexColumn |
protected Map<XClass,InheritanceState> |
inheritanceStatePerClass |
protected HashMap<String,IdGenerator> |
localGenerators |
protected String |
mapKeyPropertyName |
protected String |
propertyName |
Modifier | Constructor and Description |
---|---|
protected |
CollectionBinder() |
protected |
CollectionBinder(boolean sorted) |
Modifier and Type | Method and Description |
---|---|
void |
bind() |
static void |
bindManytoManyInverseFk(PersistentClass referencedEntity,
Ejb3JoinColumn[] columns,
SimpleValue value,
boolean unique,
Mappings mappings)
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,
String hqlOrderBy,
Mappings mappings) |
protected void |
bindOneToManySecondPass(Collection collection,
Map persistentClasses,
Ejb3JoinColumn[] fkJoinColumns,
XClass collectionType,
boolean cascadeDeleteEnabled,
boolean ignoreNotFound,
String hqlOrderBy,
Mappings mappings,
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,
Mappings mappings)
return true if it's a Fk, false if it's an association table
|
protected abstract Collection |
createCollection(PersistentClass persistentClass) |
Collection |
getCollection() |
static CollectionBinder |
getCollectionBinder(String entityName,
XProperty property,
boolean isIndexed,
boolean isHibernateExtensionMapping,
Mappings mappings)
collection binder factory
|
protected Mappings |
getMappings() |
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,
Mappings mappings) |
protected boolean |
isHibernateExtensionMapping() |
boolean |
isMap() |
void |
setAccessType(AccessType accessType) |
void |
setBatchSize(BatchSize batchSize) |
void |
setCache(Cache cacheAnn) |
void |
setCascadeDeleteEnabled(boolean onDeleteCascade) |
void |
setCascadeStrategy(String cascadeStrategy) |
void |
setCollectionType(XClass collectionType) |
void |
setDeclaringClass(XClass declaringClass) |
void |
setEjb3OrderBy(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 |
setInheritanceStatePerClass(Map<XClass,InheritanceState> inheritanceStatePerClass) |
void |
setInsertable(boolean insertable) |
void |
setInverseJoinColumns(Ejb3JoinColumn[] inverseJoinColumns) |
void |
setIsHibernateExtensionMapping(boolean hibernateExtensionMapping) |
void |
setJoinColumns(Ejb3JoinColumn[] joinColumns) |
void |
setLocalGenerators(HashMap<String,IdGenerator> localGenerators) |
void |
setMapKey(MapKey key) |
void |
setMapKeyColumns(Ejb3Column[] mapKeyColumns) |
void |
setMapKeyManyToManyColumns(Ejb3JoinColumn[] mapJoinColumns) |
void |
setMappedBy(String mappedBy) |
void |
setMappings(Mappings mappings) |
void |
setOneToMany(boolean oneToMany) |
void |
setProperty(XProperty property) |
void |
setPropertyHolder(PropertyHolder propertyHolder) |
void |
setPropertyName(String propertyName) |
void |
setSort(Sort sortAnn) |
void |
setSqlOrderBy(OrderBy orderByAnn) |
void |
setTableBinder(TableBinder tableBinder) |
void |
setTargetEntity(XClass targetEntity) |
void |
setUpdatable(boolean updatable) |
protected Collection collection
protected String propertyName
protected IndexColumn indexColumn
protected String hqlOrderBy
protected boolean cascadeDeleteEnabled
protected String mapKeyPropertyName
protected HashMap<String,IdGenerator> localGenerators
protected Map<XClass,InheritanceState> inheritanceStatePerClass
protected CollectionBinder()
protected CollectionBinder(boolean sorted)
protected Mappings getMappings()
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 setEjb3OrderBy(OrderBy orderByAnn)
public void setSqlOrderBy(OrderBy orderByAnn)
public void setSort(Sort sortAnn)
public static CollectionBinder getCollectionBinder(String entityName, XProperty property, boolean isIndexed, boolean isHibernateExtensionMapping, Mappings mappings)
public void setMappedBy(String mappedBy)
public void setTableBinder(TableBinder tableBinder)
public void setCollectionType(XClass collectionType)
public void setTargetEntity(XClass targetEntity)
public void setMappings(Mappings mappings)
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, Mappings mappings)
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, Mappings mappings)
protected void bindOneToManySecondPass(Collection collection, Map persistentClasses, Ejb3JoinColumn[] fkJoinColumns, XClass collectionType, boolean cascadeDeleteEnabled, boolean ignoreNotFound, String hqlOrderBy, Mappings mappings, 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, String hqlOrderBy, Mappings mappings) throws MappingException
MappingException
public void setCascadeDeleteEnabled(boolean onDeleteCascade)
public static void bindManytoManyInverseFk(PersistentClass referencedEntity, Ejb3JoinColumn[] columns, SimpleValue value, boolean unique, Mappings mappings)
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,IdGenerator> localGenerators)
Copyright © 2018 JBoss by Red Hat. All rights reserved.