Class BasicCollectionPersister
- java.lang.Object
-
- org.hibernate.persister.collection.AbstractCollectionPersister
-
- org.hibernate.persister.collection.BasicCollectionPersister
-
- All Implemented Interfaces:
CollectionMetadata
,FilterRestrictable
,PluralAttributeMappingImpl.Aware
,Restrictable
,WhereRestrictable
,CollectionPersister
,QueryableCollection
,SQLLoadableCollection
,Joinable
,PropertyMapping
public class BasicCollectionPersister extends AbstractCollectionPersister
ACollectionPersister
for collections of values and many-to-many associations.- See Also:
OneToManyPersister
-
-
Field Summary
-
Fields inherited from class org.hibernate.persister.collection.AbstractCollectionPersister
batchSize, elementColumnAliases, elementColumnIsGettable, elementColumnIsInPrimaryKey, elementColumnIsSettable, elementColumnNames, elementColumnReaders, elementColumnReaderTemplates, elementColumnWriters, elementFormulas, elementFormulaTemplates, elementIsPureFormula, elementType, hasIdentifier, hasIndex, hasWhere, identifierColumnName, indexColumnAliases, indexColumnIsGettable, indexColumnIsSettable, indexColumnNames, indexContainsFormula, indexFormulas, indexFormulaTemplates, isInverse, keyColumnAliases, keyColumnNames, qualifiedTableName, recreateBatchKey, sqlExceptionHelper, sqlWhereString
-
-
Constructor Summary
Constructors Constructor Description BasicCollectionPersister(Collection collectionBinding, CollectionDataAccess cacheAccessStrategy, RuntimeModelCreationContext creationContext)
BasicCollectionPersister(Collection collectionBinding, CollectionDataAccess cacheAccessStrategy, PersisterCreationContext creationContext)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
consumesCollectionAlias()
Very, very, very ugly...boolean
consumesEntityAlias()
Very, very, very ugly...protected void
doProcessQueuedOps(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session)
protected int
doUpdateRows(Object id, PersistentCollection<?> collection, SharedSessionContractImplementor session)
protected String
generateDeleteRowString()
Generate the SQL DELETE that deletes a particular rowprotected String
generateDeleteString()
Generate the SQL DELETE that deletes all rowsprotected String
generateInsertRowString()
Generate the SQL INSERT that creates a new rowprotected String
generateUpdateRowString()
Generate the SQL UPDATE that updates a rowFilterAliasGenerator
getFilterAliasGenerator(String rootAlias)
FilterAliasGenerator
getFilterAliasGenerator(TableGroup tableGroup)
boolean
isCascadeDeleteEnabled()
Is cascade delete handled by the database-level foreign key constraint definition?boolean
isManyToMany()
Is this a many-to-many association? Note that this is mainly a convenience feature as the single persister does not contain all the information needed to handle a many-to-many itself, as internally it is looked at as two many-to-ones.boolean
isOneToMany()
Is this a one-to-many association?-
Methods inherited from class org.hibernate.persister.collection.AbstractCollectionPersister
applyBaseManyToManyRestrictions, applyBaseRestrictions, applyFilterRestrictions, applyWhereFragments, applyWhereRestrictions, createCollectionLoader, createDelete, createInsert, createSubSelectLoader, createUpdate, decrementIndexByBase, deleteRows, determineLoaderToUse, determineTableName, elementExists, generateDetectRowByElementString, generateDetectRowByIndexString, generateSelectSizeString, getAttributeMapping, getBatchSize, getCacheAccessStrategy, getCacheEntryStructure, getCollectionMetadata, getCollectionPropertyColumnAliases, getCollectionSemantics, getCollectionSpaces, getCollectionType, getDeleteAllCheckStyle, getDeleteCheckStyle, getDialect, getElementByIndex, getElementClass, getElementColumnAliases, getElementColumnNames, getElementColumnNames, getElementConverter, getElementPersister, getElementPersisterInternal, getElementType, getFactory, getFetchMode, getIdentifierColumnAlias, getIdentifierColumnName, getIdentifierGenerator, getIdentifierType, getIndexColumnAliases, getIndexColumnNames, getIndexColumnNames, getIndexConverter, getIndexFormulas, getIndexType, getInsertCheckStyle, getKeyColumnAliases, getKeyColumnNames, getKeyType, getManyToManyFilterFragment, getManyToManyOrderByString, getMappedByProperty, getName, getNavigableRole, getOwnerEntityName, getOwnerEntityPersister, getRole, getSize, getSortingComparator, getSQLDeleteRowString, getSQLDeleteString, getSQLExceptionConverter, getSQLExceptionHelper, getSQLInsertRowString, getSQLOrderByString, getSQLUpdateRowString, getStandardCollectionLoader, getTableName, getUpdateCheckStyle, hasCache, hasIndex, hasManyToManyOrdering, hasOrdering, hasOrphanDelete, hasWhere, incrementIndexByBase, indexExists, initCollectionPropertyMap, initialize, injectAttributeMapping, insertRows, isAffectedByEnabledFetchProfiles, isAffectedByEnabledFilters, isAffectedByEnabledFilters, isAffectedByEntityGraph, isArray, isCollection, isDeleteAllCallable, isDeleteCallable, isExtraLazy, isInsertCallable, isInverse, isLazy, isMutable, isPrimitiveArray, isRowDeleteEnabled, isRowInsertEnabled, isSubselectLoadable, isUpdateCallable, isVersioned, logStaticSQL, needsRemove, postInstantiate, processQueuedOps, recreate, remove, selectFragment, toColumns, toString, toType, updateRows, writeElement, writeElementToWhere, writeIdentifier, writeIndex, writeIndexToWhere, writeKey
-
-
-
-
Constructor Detail
-
BasicCollectionPersister
@Deprecated(since="6.0") public BasicCollectionPersister(Collection collectionBinding, CollectionDataAccess cacheAccessStrategy, PersisterCreationContext creationContext) throws MappingException, CacheException
Deprecated.- Throws:
MappingException
CacheException
-
BasicCollectionPersister
public BasicCollectionPersister(Collection collectionBinding, CollectionDataAccess cacheAccessStrategy, RuntimeModelCreationContext creationContext) throws MappingException, CacheException
- Throws:
MappingException
CacheException
-
-
Method Detail
-
isCascadeDeleteEnabled
public boolean isCascadeDeleteEnabled()
Description copied from interface:CollectionPersister
Is cascade delete handled by the database-level foreign key constraint definition?
-
generateDeleteString
protected String generateDeleteString()
Generate the SQL DELETE that deletes all rows- Specified by:
generateDeleteString
in classAbstractCollectionPersister
-
generateInsertRowString
protected String generateInsertRowString()
Generate the SQL INSERT that creates a new row- Specified by:
generateInsertRowString
in classAbstractCollectionPersister
-
generateUpdateRowString
protected String generateUpdateRowString()
Generate the SQL UPDATE that updates a row- Specified by:
generateUpdateRowString
in classAbstractCollectionPersister
-
doProcessQueuedOps
protected void doProcessQueuedOps(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session)
- Specified by:
doProcessQueuedOps
in classAbstractCollectionPersister
-
generateDeleteRowString
protected String generateDeleteRowString()
Generate the SQL DELETE that deletes a particular row- Specified by:
generateDeleteRowString
in classAbstractCollectionPersister
-
consumesEntityAlias
public boolean consumesEntityAlias()
Description copied from interface:Joinable
Very, very, very ugly...- Returns:
- Does this persister "consume" entity column aliases in the result set?
-
consumesCollectionAlias
public boolean consumesCollectionAlias()
Description copied from interface:Joinable
Very, very, very ugly...- Returns:
- Does this persister "consume" collection column aliases in the result set?
-
isOneToMany
public boolean isOneToMany()
Description copied from interface:CollectionPersister
Is this a one-to-many association?
-
isManyToMany
public boolean isManyToMany()
Description copied from interface:CollectionPersister
Is this a many-to-many association? Note that this is mainly a convenience feature as the single persister does not contain all the information needed to handle a many-to-many itself, as internally it is looked at as two many-to-ones.- Specified by:
isManyToMany
in interfaceCollectionPersister
- Specified by:
isManyToMany
in classAbstractCollectionPersister
-
doUpdateRows
protected int doUpdateRows(Object id, PersistentCollection<?> collection, SharedSessionContractImplementor session) throws HibernateException
- Specified by:
doUpdateRows
in classAbstractCollectionPersister
- Throws:
HibernateException
-
getFilterAliasGenerator
public FilterAliasGenerator getFilterAliasGenerator(String rootAlias)
- Specified by:
getFilterAliasGenerator
in classAbstractCollectionPersister
-
getFilterAliasGenerator
public FilterAliasGenerator getFilterAliasGenerator(TableGroup tableGroup)
- Specified by:
getFilterAliasGenerator
in classAbstractCollectionPersister
-
-