Class OneToManyPersister
java.lang.Object
org.hibernate.persister.collection.AbstractCollectionPersister
org.hibernate.persister.collection.OneToManyPersister
- All Implemented Interfaces:
FetchProfileAffectee
,FilterRestrictable
,InFlightCollectionMapping
,PluralAttributeMappingImpl.Aware
,Restrictable
,WhereRestrictable
,CollectionPersister
,CollectionMutationTarget
,Joinable
,MutationTarget<CollectionTableMapping>
- See Also:
-
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
ConstructorsConstructorDescriptionOneToManyPersister
(Collection collectionBinding, CollectionDataAccess cacheAccessStrategy, RuntimeModelCreationContext creationContext) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
applyWhereFragments
(Consumer<Predicate> predicateConsumer, String alias, TableGroup tableGroup, SqlAstCreationState astCreationState) void
deleteRows
(PersistentCollection<?> collection, Object key, SharedSessionContractImplementor session) Delete the persistent state of any elements that were removed from the collectionprotected void
doProcessQueuedOps
(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session) generateDeleteAllAst
(MutatingTableReference tableReference) generateDeleteRowAst
(MutatingTableReference tableReference) protected DeleteRowsCoordinator
getFilterAliasGenerator
(String rootAlias) getFilterAliasGenerator
(TableGroup rootTableGroup) protected InsertRowsCoordinator
protected RemoveCoordinator
protected RowMutationOperations
protected UpdateRowsCoordinator
void
insertRows
(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session) Insert the persistent state of any new collection elementsboolean
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
Is this a one-to-many association?protected boolean
void
recreate
(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session) (Re)create the collection's persistent statevoid
updateRows
(PersistentCollection<?> collection, Object id, SharedSessionContractImplementor session) Update the persistent state of any elements that were modifiedMethods inherited from class org.hibernate.persister.collection.AbstractCollectionPersister
applyBaseManyToManyRestrictions, applyBaseRestrictions, applyBaseRestrictions, applyFilterRestrictions, applyKeyRestrictions, applyWhereRestrictions, buildDeleteAllOperation, createNamedQueryCollectionLoader, createSingleKeyCollectionLoader, createSubSelectLoader, determineLoaderToUse, determineTableName, elementExists, forEachMutableTable, forEachMutableTableReverse, generateDetectRowByElementString, generateDetectRowByIndexString, generateSelectSizeString, getAttributeMapping, getBatchSize, getCacheAccessStrategy, getCacheEntryStructure, getCollectionLoader, getCollectionPropertyColumnAliases, getCollectionSemantics, getCollectionSpaces, getCollectionTableMapping, getCollectionType, getDialect, getElementByIndex, getElementClass, getElementColumnAliases, getElementColumnNames, getElementPersister, getElementPersisterInternal, getElementType, getFactory, getGenerator, getIdentifierColumnAlias, getIdentifierColumnName, getIdentifierGenerator, getIdentifierTableName, getIdentifierType, getIndexColumnAliases, getIndexColumnNames, getIndexType, getKeyColumnAliases, getKeyColumnNames, getKeyType, getManyToManyFilterFragment, getMappedByProperty, getNavigableRole, getOwnerEntityName, getOwnerEntityPersister, getSize, getSortingComparator, getSQLExceptionHelper, getTargetPart, hasCache, hasIndex, hasManyToManyOrdering, hasOrdering, hasOrphanDelete, hasPhysicalIndexColumn, hasWhereRestrictions, incrementIndexByBase, indexExists, initCollectionPropertyMap, initialize, injectAttributeMapping, isAffectedByEnabledFetchProfiles, isAffectedByEnabledFilters, isAffectedByEnabledFilters, isAffectedByEnabledFilters, isAffectedByEnabledFilters, isAffectedByEntityGraph, isArray, isCascadeDeleteEnabled, isExtraLazy, isInverse, isLazy, isMutable, isPrimitiveArray, isRowInsertEnabled, isSubselectLoadable, isVersioned, logStaticSQL, needsRemove, postInstantiate, prepareMappingModel, processQueuedOps, registerAffectingFetchProfile, remove, selectFragment, toString, 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.CollectionPersister
getRole, isBatchLoadable
Methods inherited from interface org.hibernate.metamodel.mapping.FilterRestrictable
applyFilterRestrictions
Methods inherited from interface org.hibernate.sql.model.MutationTarget
getRolePath
-
Constructor Details
-
OneToManyPersister
public OneToManyPersister(Collection collectionBinding, CollectionDataAccess cacheAccessStrategy, RuntimeModelCreationContext creationContext) throws MappingException, CacheException - Throws:
MappingException
CacheException
-
-
Method Details
-
getRowMutationOperations
- Specified by:
getRowMutationOperations
in classAbstractCollectionPersister
-
getInsertRowsCoordinator
-
getUpdateRowsCoordinator
-
getDeleteRowsCoordinator
-
getRemoveCoordinator
- Specified by:
getRemoveCoordinator
in classAbstractCollectionPersister
-
isRowDeleteEnabled
protected boolean isRowDeleteEnabled()- Overrides:
isRowDeleteEnabled
in classAbstractCollectionPersister
-
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
-
getTableName
- Specified by:
getTableName
in interfaceCollectionPersister
- Overrides:
getTableName
in classAbstractCollectionPersister
-
applyWhereFragments
protected void applyWhereFragments(Consumer<Predicate> predicateConsumer, String alias, TableGroup tableGroup, SqlAstCreationState astCreationState) - Overrides:
applyWhereFragments
in classAbstractCollectionPersister
-
getFilterAliasGenerator
- Specified by:
getFilterAliasGenerator
in classAbstractCollectionPersister
-
getFilterAliasGenerator
- Specified by:
getFilterAliasGenerator
in classAbstractCollectionPersister
-
generateDeleteAllAst
public RestrictedTableMutation<JdbcMutationOperation> generateDeleteAllAst(MutatingTableReference tableReference) - Overrides:
generateDeleteAllAst
in classAbstractCollectionPersister
-
generateDeleteRowAst
public RestrictedTableMutation<JdbcMutationOperation> generateDeleteRowAst(MutatingTableReference tableReference)
-