Class OneToManyCollectionPart
java.lang.Object
org.hibernate.metamodel.mapping.internal.AbstractEntityCollectionPart
org.hibernate.metamodel.mapping.internal.OneToManyCollectionPart
- All Implemented Interfaces:
Bindable,CollectionPart,EntityValuedModelPart,EntityCollectionPart,JdbcMappingContainer,MappingModelExpressible,ModelPart,ModelPartContainer,SelectableMappings,ValuedModelPart,ValueMapping,TableGroupJoinProducer,TableGroupProducer,EntityValuedFetchable,Fetchable,FetchableContainer,FetchOptions,FetchStyleAccess,FetchTimingAccess,JavaTypedExpressible
public class OneToManyCollectionPart
extends AbstractEntityCollectionPart
implements TableGroupJoinProducer
order( id, ... )
item( id, order_fk, ... )
`Order#items`
table : item
key : order_fk
element : id
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.Bindable
Bindable.JdbcValuesBiConsumer<X,Y>, Bindable.JdbcValuesConsumer Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.CollectionPart
CollectionPart.NatureNested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.internal.EntityCollectionPart
EntityCollectionPart.CardinalityNested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.ModelPart
ModelPart.JdbcValueBiConsumer<X,Y>, ModelPart.JdbcValueConsumer -
Field Summary
Fields inherited from class org.hibernate.metamodel.mapping.internal.AbstractEntityCollectionPart
targetKeyPropertyNames -
Constructor Summary
ConstructorsModifierConstructorDescriptionOneToManyCollectionPart(CollectionPart.Nature nature, Collection bootCollectionDescriptor, CollectionPersister collectionDescriptor, EntityMappingType elementTypeDescriptor, NotFoundAction notFoundAction, MappingModelCreationProcess creationProcess) OneToManyCollectionPart(CollectionPart.Nature nature, Collection bootCollectionDescriptor, CollectionPersister collectionDescriptor, EntityMappingType elementTypeDescriptor, MappingModelCreationProcess creationProcess) protectedFor Hibernate Reactive -
Method Summary
Modifier and TypeMethodDescription<X,Y> int breakDownJdbcValues(Object domainValue, int offset, X x, Y y, ModelPart.JdbcValueBiConsumer<X, Y> valueConsumer, SharedSessionContractImplementor session) Breaks down the domain value to its constituent JDBC values.createAssociatedTableGroup(boolean canUseInnerJoins, NavigablePath append, boolean fetched, String sourceAlias, SqlAliasBase sqlAliasBase, SqlAstCreationState creationState) createRootTableGroupJoin(NavigablePath navigablePath, TableGroup lhs, @Nullable String explicitSourceAlias, @Nullable SqlAliasBase explicitSqlAliasBase, @Nullable SqlAstJoinType sqlAstJoinType, boolean fetched, @Nullable Consumer<Predicate> predicateConsumer, SqlAstCreationState creationState) Create the "join", but return a TableGroup.createTableGroupJoin(NavigablePath navigablePath, TableGroup lhs, @Nullable String explicitSourceAlias, @Nullable SqlAliasBase explicitSqlAliasBase, @Nullable SqlAstJoinType requestedJoinType, boolean fetched, boolean addsPredicate, SqlAstCreationState creationState) Create a TableGroupJoin.booleanfinishInitialization(CollectionPersister collectionDescriptor, Collection bootValueMapping, String fkTargetModelPartName, MappingModelCreationProcess creationProcess) Perform any delayed initialization.intforEachSelectable(int offset, SelectableConsumer consumer) Visits each selectable mapping with the selectable index offset by the given value.The table which contains the columns mapped by this valuegetDefaultSqlAstJoinType(TableGroup parentTableGroup) getJdbcMapping(int index) getSelectable(int columnIndex) Get the selectable at the given positionbooleanbooleanisSimpleJoinPredicate(Predicate predicate) Returns whether the given predicate is a simple join predicate for this attribute.protected AssociationKeyMethods inherited from class org.hibernate.metamodel.mapping.internal.AbstractEntityCollectionPart
buildEagerCollectionFetch, buildEntityFetchJoined, containsTableReference, createDomainResult, createTableGroupInternal, disassemble, findContainingEntityMapping, generateFetch, getAssociatedEntityMappingType, getCollectionAttribute, getCollectionDescriptor, getFetchableKey, getFetchableName, getMappedFetchOptions, getMappedType, getNature, getNavigableRole, getNotFoundAction, getNumberOfFetchables, getSqlAliasStem, getStyle, getTiming, incrementFetchDepth, isOptional, isUnwrapProxy, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValueMethods inherited from interface org.hibernate.metamodel.mapping.CollectionPart
getInclusionCheckPart, getPartNameMethods inherited from interface org.hibernate.metamodel.mapping.internal.EntityCollectionPart
addToCacheKey, getEntityMappingType, getExpressibleJavaType, getJavaType, getJdbcTypeCount, getPartMappingTypeMethods inherited from interface org.hibernate.metamodel.mapping.EntityValuedModelPart
applySqlSelections, applySqlSelections, findSubPart, findSubPart, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachSubPart, visitSubPartsMethods inherited from interface org.hibernate.sql.results.graph.Fetchable
asAttributeMapping, isSelectable, resolveCircularFetchMethods inherited from interface org.hibernate.sql.results.graph.FetchableContainer
getFetchable, getKeyFetchable, getNumberOfFetchableKeys, getNumberOfKeyFetchables, getSelectableIndex, visitFetchables, visitFetchables, visitFetchables, visitKeyFetchables, visitKeyFetchables, visitKeyFetchablesMethods inherited from interface org.hibernate.metamodel.mapping.ModelPart
areEqual, asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, decompose, decompose, findContainingEntityMapping, getNavigableRole, isEntityIdentifierMapping, isVirtualMethods inherited from interface org.hibernate.metamodel.mapping.ModelPartContainer
findByPath, findByPath, forEachSubPartMethods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupJoinProducer
determineSqlJoinTypeMethods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupProducer
containsTableReference, getSqlAliasStemMethods inherited from interface org.hibernate.metamodel.mapping.ValuedModelPart
forEachInsertable, forEachNonFormula, forEachSelectable, forEachUpdatable, getSingleJdbcMappingMethods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
treatAs
-
Constructor Details
-
OneToManyCollectionPart
public OneToManyCollectionPart(CollectionPart.Nature nature, Collection bootCollectionDescriptor, CollectionPersister collectionDescriptor, EntityMappingType elementTypeDescriptor, MappingModelCreationProcess creationProcess) -
OneToManyCollectionPart
public OneToManyCollectionPart(CollectionPart.Nature nature, Collection bootCollectionDescriptor, CollectionPersister collectionDescriptor, EntityMappingType elementTypeDescriptor, NotFoundAction notFoundAction, MappingModelCreationProcess creationProcess) -
OneToManyCollectionPart
For Hibernate Reactive
-
-
Method Details
-
getCardinality
- Specified by:
getCardinalityin interfaceEntityCollectionPart
-
getContainingTableExpression
Description copied from interface:ValuedModelPartThe table which contains the columns mapped by this value- Specified by:
getContainingTableExpressionin interfaceValuedModelPart
-
getSelectable
Description copied from interface:SelectableMappingsGet the selectable at the given position- Specified by:
getSelectablein interfaceSelectableMappings
-
forEachSelectable
Description copied from interface:ModelPartVisits each selectable mapping with the selectable index offset by the given value. Returns the amount of jdbc types that have been visited.- Specified by:
forEachSelectablein interfaceModelPart- Specified by:
forEachSelectablein interfaceSelectableMappings- Specified by:
forEachSelectablein interfaceValuedModelPart- See Also:
-
resolveFetchAssociationKey
- Specified by:
resolveFetchAssociationKeyin classAbstractEntityCollectionPart
-
hasPartitionedSelectionMapping
public boolean hasPartitionedSelectionMapping()- Specified by:
hasPartitionedSelectionMappingin interfaceModelPart
-
getDefaultSqlAstJoinType
- Specified by:
getDefaultSqlAstJoinTypein interfaceTableGroupJoinProducer
-
isSimpleJoinPredicate
Description copied from interface:TableGroupJoinProducerReturns whether the given predicate is a simple join predicate for this attribute. This is useful to understand if a predicate has additional conjunctions other than the FK related predicate.- Specified by:
isSimpleJoinPredicatein interfaceTableGroupJoinProducer
-
finishInitialization
public boolean finishInitialization(CollectionPersister collectionDescriptor, Collection bootValueMapping, String fkTargetModelPartName, MappingModelCreationProcess creationProcess) Description copied from interface:EntityCollectionPartPerform any delayed initialization.The initialization is considered successful if the result is
true. It is considered unsuccessful if the result isfalseor an exception is thrown. Unsuccessful initializations are generally retried "later", to allow waiting for model-parts being available e.g.If the exception is something that will just never succeed, consider throwing an exception with the
NonTransientExceptionmarker to allow the creation process to stop immediately- Specified by:
finishInitializationin interfaceEntityCollectionPart
-
getJdbcMapping
- Specified by:
getJdbcMappingin interfaceJdbcMappingContainer
-