Class BasicCollectionPersister
- java.lang.Object
-
- org.hibernate.persister.collection.AbstractCollectionPersister
-
- org.hibernate.persister.collection.BasicCollectionPersister
-
- All Implemented Interfaces:
FetchProfileAffectee,CollectionMetadata,FilterRestrictable,PluralAttributeMappingImpl.Aware,Restrictable,WhereRestrictable,CollectionPersister,DeprecatedCollectionStuff,CollectionMutationTarget,QueryableCollection,SQLLoadableCollection,Joinable,PropertyMapping,MutationTarget<CollectionTableMapping>
@Internal public class BasicCollectionPersister extends AbstractCollectionPersister
- See Also:
OneToManyPersister
-
-
Field Summary
-
Fields inherited from class org.hibernate.persister.collection.AbstractCollectionPersister
batchSize, elementColumnAliases, elementColumnIsGettable, elementColumnIsSettable, elementColumnNames, elementColumnReaders, elementColumnReaderTemplates, elementColumnWriters, elementFormulas, elementFormulaTemplates, elementIsPureFormula, elementType, hasWhere, identifierColumnName, indexColumnAliases, indexColumnIsGettable, indexColumnIsSettable, indexColumnNames, indexContainsFormula, indexFormulas, indexFormulaTemplates, isInverse, keyColumnAliases, keyColumnNames, qualifiedTableName, 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 protected RowMutationOperationsbuildRowMutationOperations()booleanconsumesCollectionAlias()Very, very, very ugly...booleanconsumesEntityAlias()Very, very, very ugly...voiddeleteRows(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session)Delete the persistent state of any elements that were removed from the collectionprotected voiddoProcessQueuedOps(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session)RestrictedTableMutation<JdbcMutationOperation>generateDeleteAllAst(MutatingTableReference tableReference)protected RestrictedTableMutation<JdbcMutationOperation>generateSoftDeleteRowsAst(MutatingTableReference tableReference)protected InsertRowsCoordinatorgetCreateEntryCoordinator()FilterAliasGeneratorgetFilterAliasGenerator(String rootAlias)FilterAliasGeneratorgetFilterAliasGenerator(TableGroup tableGroup)protected RemoveCoordinatorgetRemoveCoordinator()protected DeleteRowsCoordinatorgetRemoveEntryCoordinator()protected RowMutationOperationsgetRowMutationOperations()protected UpdateRowsCoordinatorgetUpdateEntryCoordinator()voidinsertRows(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session)Insert the persistent state of any new collection elementsbooleanisManyToMany()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.booleanisOneToMany()Is this a one-to-many association?voidrecreate(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session)(Re)create the collection's persistent statevoidupdateRows(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session)Update the persistent state of any elements that were modified-
Methods inherited from class org.hibernate.persister.collection.AbstractCollectionPersister
applyBaseManyToManyRestrictions, applyBaseRestrictions, applyBaseRestrictions, applyFilterRestrictions, applyKeyRestrictions, applyWhereFragments, applyWhereRestrictions, buildDeleteAllOperation, createNamedQueryCollectionLoader, createSingleKeyCollectionLoader, createSubSelectLoader, decrementIndexByBase, determineLoaderToUse, determineTableName, elementExists, forEachMutableTable, forEachMutableTableReverse, generateDetectRowByElementString, generateDetectRowByIndexString, generateSelectSizeString, getAttributeMapping, getBatchSize, getCacheAccessStrategy, getCacheEntryStructure, getCollectionLoader, getCollectionMetadata, getCollectionPropertyColumnAliases, getCollectionSemantics, getCollectionSpaces, getCollectionTableMapping, getCollectionType, getDialect, getElementByIndex, getElementClass, getElementColumnAliases, getElementColumnNames, getElementColumnNames, getElementPersister, getElementPersisterInternal, getElementType, getFactory, getFetchMode, getGenerator, getIdentifierColumnAlias, getIdentifierColumnName, getIdentifierGenerator, getIdentifierTableName, getIdentifierType, getIndexColumnAliases, getIndexColumnNames, getIndexColumnNames, getIndexFormulas, getIndexType, getKeyColumnAliases, getKeyColumnNames, getKeyType, getManyToManyFilterFragment, getManyToManyOrderByString, getMappedByProperty, getName, getNavigableRole, getOwnerEntityName, getOwnerEntityPersister, getSize, getSortingComparator, getSQLExceptionHelper, getSQLOrderByString, getTableName, getTargetPart, hasCache, hasIndex, hasManyToManyOrdering, hasOrdering, hasOrphanDelete, hasPhysicalIndexColumn, hasWhere, hasWhereRestrictions, incrementIndexByBase, indexExists, initCollectionPropertyMap, initialize, injectAttributeMapping, isAffectedByEnabledFetchProfiles, isAffectedByEnabledFilters, isAffectedByEnabledFilters, isAffectedByEnabledFilters, isAffectedByEnabledFilters, isAffectedByEntityGraph, isArray, isBatchLoadable, isCascadeDeleteEnabled, isCollection, isExtraLazy, isInverse, isLazy, isMutable, isPrimitiveArray, isRowDeleteEnabled, isRowInsertEnabled, isSubselectLoadable, isVersioned, logStaticSQL, needsRemove, postInstantiate, processQueuedOps, registerAffectingFetchProfile, remove, selectFragment, toColumns, toString, toType, useShallowQueryCacheLayout
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.persister.collection.mutation.CollectionMutationTarget
getIdentifierTableMapping
-
Methods inherited from interface org.hibernate.persister.collection.DeprecatedCollectionStuff
getRole
-
Methods inherited from interface org.hibernate.metamodel.mapping.FilterRestrictable
applyFilterRestrictions
-
Methods inherited from interface org.hibernate.sql.model.MutationTarget
getRolePath
-
-
-
-
Constructor Detail
-
BasicCollectionPersister
@Deprecated(since="6.0") public BasicCollectionPersister(Collection collectionBinding, CollectionDataAccess cacheAccessStrategy, PersisterCreationContext creationContext) throws MappingException, CacheException
Deprecated.- Throws:
MappingExceptionCacheException
-
BasicCollectionPersister
public BasicCollectionPersister(Collection collectionBinding, CollectionDataAccess cacheAccessStrategy, RuntimeModelCreationContext creationContext) throws MappingException, CacheException
- Throws:
MappingExceptionCacheException
-
-
Method Detail
-
getRowMutationOperations
protected RowMutationOperations getRowMutationOperations()
- Specified by:
getRowMutationOperationsin classAbstractCollectionPersister
-
getCreateEntryCoordinator
protected InsertRowsCoordinator getCreateEntryCoordinator()
-
recreate
public void recreate(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session)
Description copied from interface:CollectionPersister(Re)create the collection's persistent state
-
insertRows
public void insertRows(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session) throws HibernateException
Description copied from interface:CollectionPersisterInsert the persistent state of any new collection elements- Throws:
HibernateException
-
getUpdateEntryCoordinator
protected UpdateRowsCoordinator getUpdateEntryCoordinator()
-
updateRows
public void updateRows(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session)
Description copied from interface:CollectionPersisterUpdate the persistent state of any elements that were modified
-
getRemoveEntryCoordinator
protected DeleteRowsCoordinator getRemoveEntryCoordinator()
-
deleteRows
public void deleteRows(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session)
Description copied from interface:CollectionPersisterDelete the persistent state of any elements that were removed from the collection
-
getRemoveCoordinator
protected RemoveCoordinator getRemoveCoordinator()
- Specified by:
getRemoveCoordinatorin classAbstractCollectionPersister
-
doProcessQueuedOps
protected void doProcessQueuedOps(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session)
- Specified by:
doProcessQueuedOpsin classAbstractCollectionPersister
-
generateDeleteAllAst
public RestrictedTableMutation<JdbcMutationOperation> generateDeleteAllAst(MutatingTableReference tableReference)
- Overrides:
generateDeleteAllAstin classAbstractCollectionPersister
-
buildRowMutationOperations
protected RowMutationOperations buildRowMutationOperations()
-
generateSoftDeleteRowsAst
protected RestrictedTableMutation<JdbcMutationOperation> generateSoftDeleteRowsAst(MutatingTableReference tableReference)
-
consumesEntityAlias
public boolean consumesEntityAlias()
Description copied from interface:JoinableVery, very, very ugly...- Returns:
- Does this persister "consume" entity column aliases in the result set?
-
consumesCollectionAlias
public boolean consumesCollectionAlias()
Description copied from interface:JoinableVery, very, very ugly...- Returns:
- Does this persister "consume" collection column aliases in the result set?
-
isOneToMany
public boolean isOneToMany()
Description copied from interface:CollectionPersisterIs this a one-to-many association?
-
isManyToMany
public boolean isManyToMany()
Description copied from interface:CollectionPersisterIs 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:
isManyToManyin interfaceCollectionPersister- Specified by:
isManyToManyin classAbstractCollectionPersister
-
getFilterAliasGenerator
public FilterAliasGenerator getFilterAliasGenerator(String rootAlias)
- Specified by:
getFilterAliasGeneratorin classAbstractCollectionPersister
-
getFilterAliasGenerator
public FilterAliasGenerator getFilterAliasGenerator(TableGroup tableGroup)
- Specified by:
getFilterAliasGeneratorin classAbstractCollectionPersister
-
-